/* called by: entrance ctrl of the object 'track'3 r+ ?2 w7 P! t/ w6 J2 K% J
*/4 ^& e5 n- n* v0 O6 E: c
is
, `3 o8 i$ D8 L3 X) H% A# r part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 r( |; _+ q8 F3 gdo
) E }2 U/ s$ n& k Lan := rootfolder.Internal.Tools.AOLlanguage;+ Q S5 P+ g. P) }+ B& {7 a, Q
if current = @.Destination -- else return N( R2 o7 B3 G5 U: s
then# [+ q! i6 S1 _$ }% [2 x) T+ ~
@.Destination := void;
$ ]+ W* ~2 L7 V; r if @.occupied then1 Q, f6 A% K- q- L u
part := @.cont;
0 T$ O% n# `8 T' | @.transpOrder := void;& C9 A$ r$ c- M3 ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; T: U. k% E! C0 Y N! B @,root.eventcontroller.simTime);
/ \) [5 P# ~5 r& C @.HasOrder := false;
; h# q5 Z! b0 D6 |% {, }, R6 Y @.DrivingHome := true;
" S( s: `8 P' m) H; i1 c rgManager.tryToStartTransOrder;' t5 [; R& `! z8 o
if @.Destination = void
f3 P( a1 C6 Z6 n9 F then -- no transport order for vehicle @, P; ?5 [5 [2 Q% x' i, k) i
@.Destination :=
$ o0 i* M) \; g rgManager.nearestFreeStation(@,track.~);# x# Y7 i0 e) }
newDirection(@); $ _ u9 g, o2 s/ z2 h' c, f/ R2 a
if @.Destination /= void then
8 c: H9 Y) a; h, X @.Destination.NumReservation :=
. P# k: t& S( }9 e* ^9 v" ]# y @.Destination.NumReservation + 1; L2 E5 s. v2 o
end;. M6 V6 _# G0 [0 L+ z& m
@.CurrIcon := "drivingHome";" i5 V1 b5 ~& b& l
@.DrivingHome := true;6 ]( Q+ j* e2 f$ `
end;$ B& l+ b/ Q, N. X6 Y( q# g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) `# a i8 Q/ m7 o part := @.transpOrder;" J3 ~% \( I1 i! o
part.move(@);-- load part- J( E( \/ n* |% o" a
@.CurrIcon := "load";
) |7 z" o G' }0 D5 z) k) L GlobalDistObj := part.globDestination;
0 P- [+ F F* K9 o0 n$ u) j% G4 ~ assignLObj := rgmanager.rgAssignL;
$ ]/ o8 @; Z5 i1 m, m row := assignLObj.getRowNo(GlobalDistObj);
9 { @% j! v0 _1 M8 z1 { if Row = -1 then -- since 709 T# x! f9 Y+ f6 Q
if lan=1 then
: W3 G( ~ t& o8 Z9 d) r1 e promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" q) i) e) A2 Q to_str("in der Andockstation: \"",?.~.name,"\""));: [8 r6 Q9 X: j% L& X7 L+ E
else
6 K' ~, B& V' N' ~/ j; }8 p$ E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 g9 K2 m6 k3 \2 Y to_str("in docking station: \"",?.~.name,"\""));
/ W B. O2 [4 O+ \ c end;$ F4 V& [$ z n3 k! a8 a! H
else C$ l, i# i, u( k3 l
@.Destination := assignLObj[1,row];
, C! ]( U# D' J1 } end;
0 y* h. s' D0 n v! ?6 V. m. N- A newDirection(@);
3 L5 l+ ^3 z$ v @.HasOrder := true;
& e& O2 }0 [5 u: G end;; j2 E8 ]0 D2 |9 v. ?! f5 T
end;
7 _- h2 m1 ^: F9 l. R! _7 oend; -- of the method
0 A+ w1 f' v9 o9 R( r. x9 @ |