/* called by: entrance ctrl of the object 'track'
1 b+ f* D l6 R, I*/: V T$ l! O# R" I+ R$ p
is
$ E2 m) h* d N' m$ Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' g2 O( b: X/ ]- y1 `5 kdo9 e4 {2 A; F1 m9 T# d; H
Lan := rootfolder.Internal.Tools.AOLlanguage;
) k; A% x* Y- P% E' M4 u if current = @.Destination -- else return
) c: c5 x6 D1 P. [# b0 f3 L then. R* e4 h9 P3 F. C# z- o, o
@.Destination := void;5 p: a7 q0 @' h/ M2 \5 G: n
if @.occupied then
) s( U+ F) S1 I# w- \2 M3 { part := @.cont;
; K* ? ^ U) N/ |1 D @.transpOrder := void;
' G8 ]" U% |: R) u0 g( r/ |& q5 A part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' A0 \% O" @; c& }
@,root.eventcontroller.simTime);6 j0 f4 d1 z5 p' T8 n- b# _
@.HasOrder := false;9 n5 l4 s" P8 S: n0 x9 C* u
@.DrivingHome := true;
/ w" T7 t# f5 h# A( u8 K+ c) r; [ rgManager.tryToStartTransOrder;
/ k8 j$ X7 f+ Z if @.Destination = void9 ^; E% w3 _" K( y( W, v9 o
then -- no transport order for vehicle @8 E; G/ X+ b+ c, L' p: o
@.Destination :=
5 [8 s( u/ c9 R7 Z3 V$ B rgManager.nearestFreeStation(@,track.~); q2 ~0 v, ]* O6 w1 W$ T
newDirection(@);
" `5 i) K% G1 B6 r- Z5 O if @.Destination /= void then2 f, f3 B+ h$ o0 L9 R V B
@.Destination.NumReservation :=
% ~! B% D7 v" a7 p0 R- ?+ U @.Destination.NumReservation + 1;
8 |6 e0 {5 o5 _5 P9 ] end;
. a7 Z2 H* F1 {) n3 a @.CurrIcon := "drivingHome";7 D+ a4 R F A6 C0 N' d" }+ x
@.DrivingHome := true;
l8 s/ l4 c) H# } end;
. z5 |6 n" w3 |6 ` else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. l2 }5 V$ Q# ~) D5 k8 p2 x part := @.transpOrder;9 p2 c( |$ @) v. B, `$ X: Y+ E$ H
part.move(@);-- load part+ D7 W5 S1 [3 Z1 i8 V U1 O
@.CurrIcon := "load";
; L3 b3 h, {. q3 D GlobalDistObj := part.globDestination;
, I' }1 ^4 e7 X! M( I% T assignLObj := rgmanager.rgAssignL;
; R4 H7 O# S" \) ], I' ]6 C7 f row := assignLObj.getRowNo(GlobalDistObj);
6 v9 y! ], K' u6 {0 d$ _, b if Row = -1 then -- since 70: L( T Q. j- ]! ^+ x/ C8 @5 D% E
if lan=1 then& P, d7 V* B8 x5 p) Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- p2 H" e$ u. p9 T8 c
to_str("in der Andockstation: \"",?.~.name,"\""));
5 R1 j- Z5 O" w1 L else
& d/ Z1 J9 h# x+ i3 c z3 {( I* s" |, z0 e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ t, A8 Y1 o1 |! i& h to_str("in docking station: \"",?.~.name,"\""));
2 Q4 _" G& f$ Y: K6 R4 I& a% ^ end;8 \6 K4 n: Z) d" ^
else
( ]2 v) Z# k/ r# U9 |) ?4 n4 r @.Destination := assignLObj[1,row];6 I( Y; w2 C8 Y" r B+ ~4 k
end; " b" x2 @* X) ]
newDirection(@);
# Q# C0 M9 p# J X1 z. G% L9 u# N @.HasOrder := true;0 |' }1 L8 h6 |' o7 F T9 Q
end;
* `- K) {4 Y5 \, X. H0 [ end;1 q# P" `. u- k4 P, b l
end; -- of the method* a' V: e& W% u1 M5 A
|