/* called by: entrance ctrl of the object 'track'
& N# B/ q ~1 F1 Q5 s! I*/
( `0 `% D1 K z- J( h$ b' |is
" @% |. J* k! G; I! U. _3 T part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; l3 @& a4 S' ~8 J+ [* Y- r& Y- ndo
3 D( O! S" [! q, a4 N1 V7 i7 _ Lan := rootfolder.Internal.Tools.AOLlanguage;2 _8 Z- K9 x' k! e: e
if current = @.Destination -- else return# G, o! F' M& u# z
then, ^2 B/ J& ~5 }7 r+ l' V& r8 ?
@.Destination := void;
* O$ v+ |) Y4 z4 M, C; ?5 l) K) z if @.occupied then7 X6 j% L7 x4 j$ W! L3 @$ Z% ~
part := @.cont;
4 i5 w( s9 L7 V. ? @.transpOrder := void;1 U) S) E ^* Y/ ^5 V/ q6 b: W2 s' A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 x. T/ C0 ^" u7 r
@,root.eventcontroller.simTime);% s ~0 j4 q' R% P; y: [
@.HasOrder := false;
) J, j; y; |6 C/ F9 Y @.DrivingHome := true;1 A! O' \/ J( }8 O" f
rgManager.tryToStartTransOrder;5 ^$ |0 B" I# k( o+ j- g
if @.Destination = void, M. a' k7 D9 L0 {. @% b
then -- no transport order for vehicle @
8 c. k, u5 J. t2 Q+ z+ m d @.Destination :=5 c7 ?3 C+ m" I9 m, ]+ c
rgManager.nearestFreeStation(@,track.~);
9 q6 l) @2 r) v0 k% Z* q% Q newDirection(@); / k" B3 R. h0 [* I; J8 k% Z
if @.Destination /= void then
6 ^& R5 r4 |* l! u9 }4 a1 Z9 H @.Destination.NumReservation :=
4 H$ I6 D# ?, g9 N$ _* A# a @.Destination.NumReservation + 1;- w8 ~, |! t. c
end;5 f- c4 Z2 `: e/ N& c8 w" u
@.CurrIcon := "drivingHome";
# L6 _7 y% C9 B @.DrivingHome := true;, y/ u6 ?' \+ [5 \
end;1 X/ K) K! u% }& ]% n" S
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) Q/ V |, p d7 r% v- n! Z part := @.transpOrder;1 p- e8 K! P r$ G5 S1 n
part.move(@);-- load part! t* W3 _+ H# s i5 n: f: C3 Z8 }
@.CurrIcon := "load";
+ h$ U; _) A3 T/ M GlobalDistObj := part.globDestination;1 {/ S. u, Q0 D! \7 j/ `5 C* H) I
assignLObj := rgmanager.rgAssignL;, f. Z. {( \$ \8 e
row := assignLObj.getRowNo(GlobalDistObj);
8 L5 a; y' I, n) h1 c if Row = -1 then -- since 70* S. Q s$ s3 J
if lan=1 then
2 ^+ \$ E+ F/ k9 E promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ y6 M: s; ^. ?" y to_str("in der Andockstation: \"",?.~.name,"\""));# Q$ O* w% d. T* v; A
else
4 \1 D5 B+ Y. P: O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( o8 i1 E [1 b# o6 b! j T6 B
to_str("in docking station: \"",?.~.name,"\"")); % f8 R: \& S1 d: @- T# C
end;
# N0 c. q' i8 L9 C* C: F6 d else! A4 X; l8 f2 @* X
@.Destination := assignLObj[1,row];
! C" v4 O; M% X' N a4 Y1 A& _ end; # W; v! M* a# h# F
newDirection(@);3 v# C3 s' t+ c. f% Z
@.HasOrder := true;
; ^+ x/ j. h; P( c- f; U end;
' c' t+ e9 B5 F" R end;
& `* X- s0 N1 t2 ]! k" f" U, i5 dend; -- of the method
3 q9 }$ i7 }8 R% G2 B) S) H% z |