/* called by: entrance ctrl of the object 'track'
+ K, N0 j4 R6 y* b, [+ f* S*/
* N1 C" a i9 n. eis3 [: G2 z+ E# z! t: f9 Z h
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, U8 [) |! E8 Y3 u
do
0 { M0 l v0 N6 N Lan := rootfolder.Internal.Tools.AOLlanguage;8 J1 O4 s$ C1 X6 [6 I4 N6 H
if current = @.Destination -- else return
1 [& y; L2 O) }+ `" G then3 C% X8 V: h( Q2 X; }: S T; R( ?
@.Destination := void;4 b$ Y2 d& a4 _# Q& a, P$ u% {- c2 O
if @.occupied then
M& M1 D1 {: ^0 H) H part := @.cont;
8 [% i2 J- Y5 w, z! q @.transpOrder := void;
! U+ `4 I, V ]' u, R0 E3 g( q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ F t \* Q3 ?2 B& i0 M @,root.eventcontroller.simTime);1 h/ { K$ w& H6 m
@.HasOrder := false;
% Y+ s+ i$ D% z7 V @.DrivingHome := true;
. l o' |. C* S) h2 ~9 `- \ rgManager.tryToStartTransOrder;
1 z8 D! ]! _+ _+ j( N: S if @.Destination = void/ w8 v- x3 }' `! H7 S
then -- no transport order for vehicle @
4 o z) P/ A+ _0 s, f; W @.Destination :=
" s/ @( B0 E0 G/ N T1 Z5 P2 N rgManager.nearestFreeStation(@,track.~);) l7 R6 T. ?3 q( \
newDirection(@); ) ]$ I' N* G% j' F0 i( B7 f3 o
if @.Destination /= void then0 _5 h4 j5 D- ~ r" u0 N1 ~0 k! y
@.Destination.NumReservation :=: C8 s0 n1 z- f0 b+ n+ B7 S! l6 k
@.Destination.NumReservation + 1;, q& [9 k6 p! `. ?; h
end;
) `, W7 j/ ` u2 m4 W1 f# g5 Q @.CurrIcon := "drivingHome";
6 W0 I& u" s* P @.DrivingHome := true;
9 O3 g1 [1 {; ^) x; x! E/ N end;
/ e" w# y. F' `# W/ X$ e. ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 ~7 Z& F- N, o1 J/ I
part := @.transpOrder;
: I( p6 f5 }1 [5 `: I; i4 q part.move(@);-- load part/ D9 }" R7 o2 l! Y+ O6 ]" F
@.CurrIcon := "load";+ F$ m! U6 E8 b5 H6 n' T5 N
GlobalDistObj := part.globDestination;$ o. ?/ z' a1 ]9 z- \$ b S
assignLObj := rgmanager.rgAssignL;
( I m( J& Y7 ?6 [1 P: \ row := assignLObj.getRowNo(GlobalDistObj);8 M8 o: M. A" @! }$ G
if Row = -1 then -- since 70
G* H0 s' }* O0 [8 T. ?! q if lan=1 then
& {1 F/ R# ^ i9 H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! `' m+ Z8 _1 R; O, _ S. ?
to_str("in der Andockstation: \"",?.~.name,"\""));0 [1 Z/ h# J, V# ~4 ?
else
9 J W9 U3 F& I- @ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
m6 t" k! t2 F3 ]0 q to_str("in docking station: \"",?.~.name,"\""));
+ [3 I+ g& Y. x' F$ v& j end;* D! \/ D9 S! ^; P3 S1 I
else
4 Q/ b2 X" [: [! m @.Destination := assignLObj[1,row];
' o$ c9 h; E) G; E8 O: N; A end; / [0 g6 K# e @4 W0 C
newDirection(@); [) P# H2 c+ V( G; O0 z
@.HasOrder := true;
/ U8 J$ S, C i( o ]7 i end;2 e3 P J/ N9 r' u0 [- B
end;
6 W+ v' T7 S6 A( ^8 I5 D% W3 O L) hend; -- of the method
+ K O v+ T8 S6 Z5 i |