/* called by: entrance ctrl of the object 'track'
* Q( l% z! ?/ U! \6 V*/
9 r8 ?% U& p3 m8 `) @8 nis
: C: h4 _) m5 S7 G part, GlobalDistObj, assignLObj:object;row,Lan:integer;# L( z; w% n. _' ]/ v/ V
do
$ L8 s0 F( ~- |5 C7 {4 ? Lan := rootfolder.Internal.Tools.AOLlanguage;$ p. m2 K/ E2 @0 i/ H; W' H
if current = @.Destination -- else return1 v( M; X% O3 E& ~
then
0 f s o' P# i- n; ^ @.Destination := void;
" H, |- H# \( }0 H5 `" _2 d if @.occupied then2 M1 N3 I6 y6 H2 _( ]
part := @.cont;
) j/ K6 h6 w( W2 ]) w& V @.transpOrder := void;
2 Y" t$ w0 c* g# X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 I+ u7 c1 y r/ X; S6 F9 l @,root.eventcontroller.simTime);
: d0 i* m3 z" {; A U; | @.HasOrder := false;7 L/ h; {$ h7 |1 I9 i6 }" {
@.DrivingHome := true;- g% y/ M' j: h% S
rgManager.tryToStartTransOrder;6 F, r- s) ?& t* @
if @.Destination = void
2 {' Q, Q8 q* H" g8 u B- z9 Q& d then -- no transport order for vehicle @' o" T+ Z6 i8 [3 u6 u8 }5 K
@.Destination :=
. F8 p0 P* L: s3 `, {8 Q rgManager.nearestFreeStation(@,track.~);
b9 \7 o6 x* e* r4 l newDirection(@); , g# H0 K4 t* V; d( H1 A4 z
if @.Destination /= void then, B- p3 m f3 F
@.Destination.NumReservation :=
+ {& N: ?8 ?1 ^ p' Y @.Destination.NumReservation + 1;
$ Z3 i0 c) n# Z& u end;
5 v) p/ t, W9 X/ h C @.CurrIcon := "drivingHome";
# _8 n4 W$ Q5 ~3 c$ y5 _ @.DrivingHome := true;
0 [8 x) A; b! E; ~0 Y end;7 M9 T2 k: r; Q2 c! K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ T' ? p7 }1 k& _3 n, K2 ?
part := @.transpOrder;
+ k9 ^" E' G/ z' m$ f part.move(@);-- load part% L' r4 q* `1 y+ H$ [! W: }7 e
@.CurrIcon := "load";
6 Q, l1 f2 E3 \% H GlobalDistObj := part.globDestination;9 u' T0 f6 x4 p4 [% c( e$ v
assignLObj := rgmanager.rgAssignL;
" I) R+ m6 b+ Q$ h5 i" { row := assignLObj.getRowNo(GlobalDistObj);
0 U: }& N7 y+ L* H5 e/ v8 s5 F if Row = -1 then -- since 70
. q( F b% M |3 w if lan=1 then
6 H+ Y" h3 {, g3 T8 L! ?* f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 }; ~( g" B1 j to_str("in der Andockstation: \"",?.~.name,"\""));
) R/ B2 Y& _2 M2 o# | else: }) H" u& p! y/ p1 @* |% l. Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- w3 q( e* n3 J/ \0 ? to_str("in docking station: \"",?.~.name,"\"")); ! O! a$ `5 Q) h9 f' v% z; Z
end;
3 D$ J2 Z7 {' `. g! C. B9 N3 J# j else, I( }/ l' A0 E0 Y
@.Destination := assignLObj[1,row];
6 W. [/ G5 K/ q0 _9 V end; $ }* f; {8 u4 e6 `. }( _ G
newDirection(@);6 @. E1 H4 ?% N3 [5 ^1 g
@.HasOrder := true;
+ I7 b1 N; u2 p( {" v. y end;
7 B, J) C9 ?0 T8 O7 i: b end;
/ `/ T2 C( Q X4 U2 bend; -- of the method
+ P5 |" N5 U+ L$ J p |