/* called by: entrance ctrl of the object 'track'
) Y4 W9 v2 x+ W: m$ T*/- Y( h9 @' y& J" [6 D! H9 Z
is5 ^: Y! Q6 P7 R) m* J
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' v" ~/ K2 b4 R
do
% ]1 \' g+ _9 z) T5 e) [ Lan := rootfolder.Internal.Tools.AOLlanguage;
' W5 x0 B! G! d6 q' ? if current = @.Destination -- else return7 i9 ~% D5 n9 _& H
then
! s& |$ ]6 e. X) ^6 \& W8 A; B4 p @.Destination := void;
$ k" M9 G* {+ w' z& } if @.occupied then1 c8 v7 \5 t- q
part := @.cont;3 ]! ^% ]9 g7 F) x) K' U( y
@.transpOrder := void;
! y) l4 J+ z* d( H# X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; C7 [3 _+ D- [
@,root.eventcontroller.simTime);
9 h* x2 e4 ~, p( k u: r @.HasOrder := false; u% R7 P1 | [& t8 |
@.DrivingHome := true;
% l( Q7 ?2 d; O rgManager.tryToStartTransOrder;
! C7 d5 S4 }0 r8 {# ~" e: m' Y5 v if @.Destination = void
! E# q& L! y, {! ]& ? then -- no transport order for vehicle @
2 r9 c# e5 k: a5 @. Q @.Destination :=
]6 z/ L8 L& x9 U+ F8 V/ ] rgManager.nearestFreeStation(@,track.~);
$ s# P8 \% B2 `* y0 m newDirection(@);
3 z+ ^5 C$ t# F8 g3 ~ if @.Destination /= void then
, l' E/ o7 Q( K9 o% R1 ~ Z0 b, Z p4 m- J3 s @.Destination.NumReservation :=
1 ^% z+ a4 b! M& P. N @.Destination.NumReservation + 1;
8 }+ V: r1 Z/ M end;
& u& B+ k- y H. z; D; k @.CurrIcon := "drivingHome";1 ?- M8 {* x, f7 P* i9 w
@.DrivingHome := true;
# c# Y: x8 m0 \$ T end;
& P- B' ?9 @& I6 n( m else -- the vehicle @ is empty, both vehicle and part are in the same dock station, m* B+ x- N+ v' O0 L& y- E& i7 S
part := @.transpOrder;% o# U2 W0 c: }( }: K
part.move(@);-- load part
5 l: I! ~) C3 \9 R Q9 D4 ~1 v @.CurrIcon := "load";2 ~: [, C1 I4 Y1 C
GlobalDistObj := part.globDestination;' E& V* m2 a% O% b8 X: }, G, N! D2 Z
assignLObj := rgmanager.rgAssignL;
a! ]/ J' j" w* B. l H( ` row := assignLObj.getRowNo(GlobalDistObj);$ H' k! I7 X% O
if Row = -1 then -- since 70, E; u% V! ~$ m5 O1 X
if lan=1 then
7 c2 ^/ Y- ]$ E; R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 t' |3 ` {* A# w4 d% m+ o5 ^ to_str("in der Andockstation: \"",?.~.name,"\""));
5 M/ d7 e8 L4 e else) L% O( T" M. i. M& J7 v0 e: B( r# X" q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# Z, b$ ~% m! W* p to_str("in docking station: \"",?.~.name,"\""));
7 h) d% z' l3 o+ q# p4 n end;& t0 b+ y- G9 y! \) Y
else
7 z$ P+ H9 s: m* p8 q1 V9 A @.Destination := assignLObj[1,row];1 O$ d2 }7 k. U) m
end; ( Z) { ~$ a6 J" h3 ^
newDirection(@);
, p, K) Y0 ?- ? @.HasOrder := true;
) T5 d( H; V) t5 X& y& T- ~: I end;* q' F7 [& |( P% o* B4 E( b
end; B/ A" j' x0 |8 s0 L1 J
end; -- of the method
) e4 S( |! W% \; \ |