/* called by: entrance ctrl of the object 'track'% b6 j% [- v* ]# y, I: K) u
*/" F( Y4 k. Z1 L9 L' ~! B8 z
is1 ?3 n% ?( `, b5 `# U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 U5 s$ y8 M& r1 B
do. W; E4 x/ w( x+ x0 Z
Lan := rootfolder.Internal.Tools.AOLlanguage;9 ~8 P- R; c( u' |! t1 l4 w4 E+ L4 D
if current = @.Destination -- else return
, a1 Q1 W; ~* ]2 h then
6 |8 l$ b2 D( ]. l8 G, H @.Destination := void;
J2 K5 U. G& W1 Z" n5 ?- P1 ?' y% ^, [ if @.occupied then/ h Z* L8 `, D _
part := @.cont;
/ V8 F4 |4 I2 p* S) n! Q% Y- x6 g8 E @.transpOrder := void;2 @. o6 b2 Q6 @2 K! S# |
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( @/ h* w+ B) `2 | @,root.eventcontroller.simTime);
1 K9 y" u7 c+ V" Y8 s @.HasOrder := false;4 X, u& H1 y" w; Z2 B9 G$ e
@.DrivingHome := true;/ b$ ]% {& i4 L6 h% ]4 b# e
rgManager.tryToStartTransOrder;
8 \7 `8 [1 t, c. z if @.Destination = void
1 o2 e1 G2 C, k0 s6 v/ H then -- no transport order for vehicle @
1 [- O; l6 j" T0 b: B @.Destination :=+ s# E: z1 x* I5 E8 p$ h8 t# g0 G
rgManager.nearestFreeStation(@,track.~);, O" X& N5 O) v& ?$ I" b
newDirection(@);
% \, x, y+ q% R. v5 Y# @, y: R+ _ j if @.Destination /= void then
2 H$ S2 L0 A/ d. } @.Destination.NumReservation :=& ^+ [ |2 t5 w
@.Destination.NumReservation + 1;) L6 }3 |" i. Z+ |/ U8 ?1 V
end;7 L* @; e# w) S$ Q
@.CurrIcon := "drivingHome";6 ~# M& X- @/ I5 T; y
@.DrivingHome := true;
" L9 D" w2 E: X6 @" s0 s end;: F( w" A8 n6 M6 Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: n3 Z% B7 [/ {, l7 z part := @.transpOrder;
) h! u i" }9 l/ D& @ part.move(@);-- load part: I' _- Q! w; a$ U% }8 d9 N
@.CurrIcon := "load";7 _& c* s" F6 K; _( {. ?2 n
GlobalDistObj := part.globDestination;
5 V! ~; a; c, b4 W/ E" U( T: |' T% ` assignLObj := rgmanager.rgAssignL;9 P- m3 Y% J* m6 j' x
row := assignLObj.getRowNo(GlobalDistObj);: X5 H7 s6 @2 w2 n: t! g
if Row = -1 then -- since 70: G" j+ W6 T7 D) s8 s
if lan=1 then
: Q+ W9 R4 x# q2 `( W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ Z% ]0 m& T, U% e9 {3 A9 S to_str("in der Andockstation: \"",?.~.name,"\""));7 _( W" X4 ]3 K; c/ T4 P% @. f
else
" k: {+ |' u- ?+ x4 Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 R3 b6 I( ]! D+ V& l) _, r to_str("in docking station: \"",?.~.name,"\""));
' f1 ^2 q; H# H! f8 A) m$ s% v/ y end;
- a- E) P& q2 v0 J) n else5 M6 B6 D; w7 ]3 x$ T
@.Destination := assignLObj[1,row];1 ?& ?* M' B( E. x# m1 D
end; 2 a9 T' B& d' j) @3 d
newDirection(@);5 h! Z6 |# Y- ^ O- Y
@.HasOrder := true;
( u7 t: f, G% B* V3 e end;9 u* R R/ }0 l2 p, V1 l: u: d
end;
4 Q$ f9 F2 U' e M/ @( oend; -- of the method
7 j1 l* n# D0 l2 q" D. ?3 z |