/* called by: entrance ctrl of the object 'track'
) B* \3 n+ b) Z/ ?& N2 B4 x! T* b*/8 H# G7 @: R! [ U) |/ q8 j
is, s, s, T7 Q, f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- o& U8 M" i7 |+ k7 m1 W
do8 i2 L4 Q- d2 r3 \) ~8 @& |; j8 c
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 f- ]8 M/ o1 h( K1 g+ Y- b2 Y, E if current = @.Destination -- else return
! q: v5 ?# ^" f! d8 _1 S then, T4 |* X3 G% V
@.Destination := void;1 `- H4 r; g) `% }* t
if @.occupied then6 p6 m |/ Q7 x5 s9 E+ D
part := @.cont;
' [0 |; W! O* r3 r3 ]6 h9 Y @.transpOrder := void;
. O3 B# {; ], y# v, D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ F1 C1 O0 Z& l
@,root.eventcontroller.simTime);1 X( y) P- K2 T& A/ k: R6 n! C
@.HasOrder := false;3 q6 t$ g8 D @6 o/ L
@.DrivingHome := true; b! y! t! s- B+ Z
rgManager.tryToStartTransOrder;+ C2 O8 j& G# `" S
if @.Destination = void
+ }$ }! N3 F' j/ i8 |4 V then -- no transport order for vehicle @- k% x; ]% T$ r S" p4 G
@.Destination :=; R9 Y' ]; X4 l8 P# q7 b$ f
rgManager.nearestFreeStation(@,track.~);' {* `1 @. X' X5 |6 s0 R5 h6 n
newDirection(@); 3 P) A8 A* x2 D( { k3 u
if @.Destination /= void then3 M4 \& j/ U0 y& U% ^" b
@.Destination.NumReservation :=% ^3 |2 P. c; ]. }+ L7 ^
@.Destination.NumReservation + 1;
' [! h' ~: o3 `# \, }; H' f end;# _' A, q0 i, T8 V i; e- p
@.CurrIcon := "drivingHome";2 `* A+ i( h& J. x+ a. o5 T
@.DrivingHome := true;" M5 Z! C {$ q! g2 d6 A
end;& T' U. i) v G& R0 m
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ L5 C% o a7 }) ?' ~, i
part := @.transpOrder;
3 N! ]0 C% D) Z3 g part.move(@);-- load part
8 N% ?$ L z, T. |; e6 y @.CurrIcon := "load";
1 @, `# ~3 w* E* b6 j A$ Z$ H GlobalDistObj := part.globDestination;* d2 t r' C- L+ l z2 L
assignLObj := rgmanager.rgAssignL;
! G5 v0 { U' F# [ row := assignLObj.getRowNo(GlobalDistObj);* c3 ~, L* i4 `$ c6 l
if Row = -1 then -- since 70
# J) d) x0 v2 Q if lan=1 then
: d/ {) `2 T% c3 I! e4 m$ d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( N R. K% n2 W! w to_str("in der Andockstation: \"",?.~.name,"\""));3 M! [& S9 w8 H8 g) H
else, P9 S4 e% k2 \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 y z6 s9 r( ]
to_str("in docking station: \"",?.~.name,"\"")); 5 i7 f+ B2 \' q
end;1 ~3 J8 n! v2 ?0 }
else
" M# Y- v& t$ b: n" R" z; Q: O @.Destination := assignLObj[1,row];7 _, b5 M! H3 R$ m( M) i
end; 2 k7 V% g: \2 H3 Q0 M
newDirection(@);6 A7 n. I$ m0 `0 B
@.HasOrder := true;
5 W6 b* d+ @/ n, d# Y7 h+ Q: L end;
# ^" S& n: z! t' X% N end;
/ D! {; o6 r+ J) r! w8 iend; -- of the method
/ e+ h& j% o/ z, i' j" l |