/* called by: entrance ctrl of the object 'track'5 e6 t8 H( Y/ ?3 {" ?0 Z5 G
*/, q5 }, g, ^1 Y1 E, p" T
is
. x v6 U# S8 i6 t part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ K" a7 X( i. s3 Q9 `% F: W
do
h, @6 l/ G/ \ H, q. j Lan := rootfolder.Internal.Tools.AOLlanguage;6 L; V# l( n" Q# W! h, ]- y% J
if current = @.Destination -- else return
2 s4 s8 y! K, L) O then# T8 h4 O, a9 g) o5 m1 J. m
@.Destination := void;
. c1 x) [4 m9 G6 ~ if @.occupied then
# p/ m1 t" f# {% z* S part := @.cont;
) b0 y$ ^3 ~( z& c3 @- }* r O @.transpOrder := void;" |3 V$ P+ Y' {" l4 q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: o) C9 c, G! d" }8 I @,root.eventcontroller.simTime);
& ^/ q+ t( }% V# F5 B @.HasOrder := false;# y5 d7 ` b1 Q( [6 v) `* L" Z
@.DrivingHome := true;
3 b2 M2 U: A- T! z& A6 n" o( { rgManager.tryToStartTransOrder;
0 D- ?& L4 n0 f& e2 @5 l if @.Destination = void
, k+ V! N, K- d5 U then -- no transport order for vehicle @& f# b% H6 ], h, J/ V* G- `; y) R
@.Destination :=
! P! v) ?, I |, l5 m8 E: s rgManager.nearestFreeStation(@,track.~);
, N' b0 x! e" i9 G6 `: D newDirection(@);
; R% O4 q, B& s) w1 ~ i% K if @.Destination /= void then
8 J+ h* I% O% H6 j- g; R: w/ s @.Destination.NumReservation :=
' T) s3 u. {, F, ~4 F6 l @.Destination.NumReservation + 1;
7 u: @1 r0 |" R" a, D7 p# r end;1 i# f; y" C% K' g! B* C3 o
@.CurrIcon := "drivingHome";
% N# |! }( {6 ~( f6 O @.DrivingHome := true;
( G6 l) n- J0 ~9 @" l end;& E' Z& x: j% G; Q) Q: s$ Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 r7 _: w3 e7 m6 N2 f' N0 o
part := @.transpOrder;! x) u) m8 {$ {' U2 k6 A
part.move(@);-- load part0 ]" d) D1 W0 g( C# ^. r7 a2 v
@.CurrIcon := "load";
k) _& `7 C0 G& T5 F9 x$ I' c8 r GlobalDistObj := part.globDestination;1 Q. i9 t; p5 ]; C" M A6 q7 O: y
assignLObj := rgmanager.rgAssignL;
J# y D2 ?0 j: c row := assignLObj.getRowNo(GlobalDistObj);( P% h" z5 f* y3 `2 Y" T
if Row = -1 then -- since 70& S1 ^! }( N" v3 m; W `' j3 e/ n
if lan=1 then
$ ?: W! }* H& v5 r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 I2 |. |5 O( q+ U6 o3 E
to_str("in der Andockstation: \"",?.~.name,"\""));
6 A- c/ v6 v, z! a( s4 w& ? else
$ k5 _7 B7 ?% q6 I9 ?8 w8 @: Q0 y- K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' s4 Q) S7 H: ^9 j3 _ to_str("in docking station: \"",?.~.name,"\""));
" T- F* s2 C) h6 P/ M end;% m' C8 B% @- |$ Y$ w" B# ]
else
6 X( X/ ?( Q! z0 [, g+ Y @.Destination := assignLObj[1,row];
- ~: G7 f6 e; V( f end; 3 Q9 v8 B) L3 c" [7 ~: t
newDirection(@);
. V& L4 e6 r' e9 j( k @.HasOrder := true;) O d: y! `8 y% R0 x' s
end;
9 g5 E ?! j4 q end;
, Z2 b/ l" _7 W; O5 v5 N' ~end; -- of the method
; y) g* W7 B V1 H5 c' w, L' c |