/* called by: entrance ctrl of the object 'track'; Y7 Q& k, ~1 G' O- n! h- n! P5 Y( Z
*/0 Q, @& H5 y8 n# o. l/ l6 `* r
is* @- B; z$ \0 H, K6 D( f0 T Y: U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 |8 {- @. b, G3 g1 j- z9 A
do) S/ ^' I# s+ n. m ]" S' o
Lan := rootfolder.Internal.Tools.AOLlanguage;
# w3 K4 s& e1 W0 W3 @ if current = @.Destination -- else return
# d' ?6 w& p4 Y then
, u' {4 I8 ?- Y2 N9 F @.Destination := void;. f* [" O3 S1 g0 g/ U
if @.occupied then: I# X+ d, g Q' g
part := @.cont;
( u3 T, O6 t) e6 N @.transpOrder := void;! C! c, Z) J* x- u& N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- v* |! d, ~$ _2 A
@,root.eventcontroller.simTime);
4 G f4 X( i8 @& I @.HasOrder := false;
$ l5 Y E' d0 q! j @.DrivingHome := true;# t5 I3 a' [+ Z @3 ^3 @8 y
rgManager.tryToStartTransOrder;" f/ U$ n' N) S7 n6 I$ i
if @.Destination = void7 B& S8 |* L( o5 z
then -- no transport order for vehicle @) V$ e' M, X; r3 X3 G
@.Destination :=! U0 f) P, Z1 v5 Z
rgManager.nearestFreeStation(@,track.~);
% n4 n) e& M- K$ G6 V/ p7 b newDirection(@);
. \9 w( e4 R4 Z3 Y9 J' W; i if @.Destination /= void then
. X% E8 F4 J2 A0 O* G @.Destination.NumReservation :=- U8 f5 C0 u R5 o, \5 G: u% O
@.Destination.NumReservation + 1;
9 q6 q: Z" p3 ^& P k: m end;+ b3 _, R* Q4 ^) |) V# u
@.CurrIcon := "drivingHome";
9 F) V9 P/ Q/ w4 n7 d+ H @.DrivingHome := true;1 f4 J' Z; d& p% {# U% L {8 Z
end;
4 M9 a& ^0 W+ n' ?- ^2 z2 r% O& ], S* ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station# C; ^- Z# _- W
part := @.transpOrder;* s- ]3 m: N$ n* z
part.move(@);-- load part
0 W" a8 G T3 o! e2 m! L @.CurrIcon := "load";- |( {3 M9 j! h! }* L( ~
GlobalDistObj := part.globDestination;
, }' h, Z. Z) D5 y+ B; s1 ^6 [ assignLObj := rgmanager.rgAssignL;5 S& b0 n1 F5 W
row := assignLObj.getRowNo(GlobalDistObj);
% C. N* ^4 d, _8 }3 S4 h% `, a if Row = -1 then -- since 700 o" {% Q& j$ f0 T# ~: h
if lan=1 then3 q) g4 x5 G( |- h6 W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 I. x: t }0 |/ x: `1 g6 |
to_str("in der Andockstation: \"",?.~.name,"\""));, x( v3 J, d" ?3 H+ y `
else
4 }% y% G3 R$ j8 f+ y! i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# v- }. R4 Y, X( \- V* C) `! T
to_str("in docking station: \"",?.~.name,"\""));
- }/ W; {! H/ K/ g, d; x/ o end;! ~' {3 l* w. L \# t
else
& e3 s( v/ _ V8 x# B+ c+ H @.Destination := assignLObj[1,row];! e5 f9 u0 h0 V2 }* W* R& b1 e! ?
end;
7 ?4 z& ~. k8 `1 o5 d, x% W newDirection(@);
2 [* F2 [1 {; r" W7 h2 R5 N @.HasOrder := true;
& A4 j, \, c/ f4 j: w end;
* B/ ^1 z( u0 z4 w8 T end;
( B# Q8 M, U9 z) Y0 hend; -- of the method
# c2 H, ?3 l, M |