/* called by: entrance ctrl of the object 'track'
* J, u+ k/ F. ^4 Z*/
+ l2 F y+ L' H" q2 cis
! l6 i# B- ^9 L part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! |( l2 g- X6 W4 d! J6 v8 ~, Pdo) w# h: o9 l7 W4 V; L+ b
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 v5 L [3 X) X) j8 ]( i5 r if current = @.Destination -- else return3 F7 a5 b) F$ _2 Y$ @+ R! k
then6 k4 X! w/ Q' e5 A& i
@.Destination := void;2 A& b( z& I5 g. B5 d* e
if @.occupied then+ a! `, }" F9 p! D- G- f5 y
part := @.cont;
! k- n4 L; |/ T6 T/ v @.transpOrder := void;9 r0 o9 b. d" t5 U1 G# v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 N p0 K/ f% X; ]7 e/ r @,root.eventcontroller.simTime);
/ ]/ K5 t* I3 d# ]* G& @% V- @ @.HasOrder := false;, H# L) {; r! z$ ^- ]" X
@.DrivingHome := true;
- A4 O. }4 x' }( t6 w" M8 R rgManager.tryToStartTransOrder;" \- ]: B0 G/ @9 {$ P3 D
if @.Destination = void
" y# t3 Z2 P# j; M" R then -- no transport order for vehicle @ A7 Q$ O! l4 J8 Y0 n0 _& m
@.Destination :=
! D8 ]: A7 T0 X1 e. Q x5 G) H5 {8 z rgManager.nearestFreeStation(@,track.~);
5 q+ W- W& B7 w# w( x newDirection(@);
3 P% O* n& c4 [! \& R if @.Destination /= void then- B+ }7 l! K6 H) M
@.Destination.NumReservation :=
7 q5 C1 |5 y( Y% ?! s+ U; R8 Q, z8 N @.Destination.NumReservation + 1;
6 [3 h, Q, \) o" |1 { end;/ R( P% V `9 u! t
@.CurrIcon := "drivingHome";, K" t$ G5 W+ A. \6 j7 b
@.DrivingHome := true;
$ U2 h% y4 | W3 Y) B$ A end;
2 ?8 L9 N) h: @6 a else -- the vehicle @ is empty, both vehicle and part are in the same dock station) z: m: ^( v4 z
part := @.transpOrder;! a( j0 s2 [2 f+ c+ N
part.move(@);-- load part; C ]# \+ u; x/ M
@.CurrIcon := "load";
$ }- f3 w, a* k) D GlobalDistObj := part.globDestination;
7 h: a6 c* x1 ~" b assignLObj := rgmanager.rgAssignL;
$ D3 t4 t0 i8 n4 B/ n) k% X9 D row := assignLObj.getRowNo(GlobalDistObj);: G8 D$ k* F0 X/ `4 K" B( f
if Row = -1 then -- since 70
) h( T# B& l/ e' Y0 ~, d- s# ~ if lan=1 then( n" I: d9 \& m, l3 L* N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# F% [" \/ U; G5 @& a to_str("in der Andockstation: \"",?.~.name,"\""));+ k+ A* I/ y2 r3 z, a: p4 l/ S
else) ^/ v5 s. r& P$ F; G$ s2 L
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! C5 l" l1 O1 o- U6 E: n1 J5 c to_str("in docking station: \"",?.~.name,"\"")); : w5 O0 t9 n; G8 X% P8 c6 Y6 X3 H
end;1 K8 n* k3 S2 Y$ S
else- M1 O- |7 Z0 ] X. F5 n# l* C
@.Destination := assignLObj[1,row];, U8 ?& k! G" l( x
end; / X- n% H0 t+ U
newDirection(@);
- A! k; p @1 f1 v @.HasOrder := true;
8 N N( S) f. o; R end;5 l9 B3 q* X! \4 C$ a4 F
end;5 `0 j. R$ \' `! M0 v, i
end; -- of the method
2 L( @$ y0 `- u9 G8 q |