/* called by: entrance ctrl of the object 'track'# u3 }; I. L8 X% Q3 I+ y
*/0 T( t" x; }9 u
is) v% s& T1 `+ z5 D% w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 H, S. R% o& Udo! J* l3 x' i6 Z+ c0 {
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 G1 r' A( X( q2 b* V3 \ if current = @.Destination -- else return
" \1 B" B/ |' ~6 S* l% L/ k then% V2 a/ I8 j/ J( ?8 d9 b& p
@.Destination := void;
; v/ V% x* ?7 W2 r; H* g( M/ E if @.occupied then; |8 y% G3 i! l7 a5 V
part := @.cont;5 _. }- F2 f- |; y1 t% c. R1 p7 O4 c
@.transpOrder := void;/ {% c- t4 Z% U/ C& F- _ M/ T# ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 N7 [0 O+ v1 P4 l8 M+ ~" r @,root.eventcontroller.simTime);
; ]2 B: Y3 ?) B: X% @ @.HasOrder := false;/ `! m6 S( S5 v. ~
@.DrivingHome := true;
, ^: t% M" v* N$ |$ i3 y# ` rgManager.tryToStartTransOrder;- |/ j) T2 E# @1 r. Y6 z
if @.Destination = void+ E7 \$ i9 p! O3 n' z2 `% @" i
then -- no transport order for vehicle @
: n5 L! B4 d: t# [7 {* k3 P @.Destination :=, w+ ?4 s4 ]9 W [" Y% j. U4 t. ~
rgManager.nearestFreeStation(@,track.~);
0 W* h6 P: `. b$ }) c e newDirection(@);
. }2 G, R5 h0 j2 X9 @ {, y6 W7 U if @.Destination /= void then
( U# W- c* q# n. G% K9 p+ C: o: ?* N @.Destination.NumReservation :=
5 S2 }: W1 j' @2 O @.Destination.NumReservation + 1;, k$ r8 `6 R7 J8 |
end;# t4 b m7 z9 G4 _8 W9 V
@.CurrIcon := "drivingHome";* A2 @( y2 s+ L
@.DrivingHome := true;
2 {4 a I* l( @* ~0 x end;
2 A7 I1 E: P" ?8 Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 F; F+ k; n) C7 g part := @.transpOrder;
; Q5 J0 x$ Y: Q6 v# D part.move(@);-- load part5 h0 E; l5 `& W4 j* ~8 a
@.CurrIcon := "load";
* Y1 D, n8 n3 e. D GlobalDistObj := part.globDestination;
0 R5 _9 N( T. ?. `! {3 T3 ?2 }$ q assignLObj := rgmanager.rgAssignL; Y( N' _* W5 F O: Y
row := assignLObj.getRowNo(GlobalDistObj);9 l" b' D: K7 K ~) A) F
if Row = -1 then -- since 70: B8 q0 h! S- m* p
if lan=1 then
' W3 g: v: d" O U* ^$ T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 s9 z: T$ d6 {1 e+ P2 N7 A to_str("in der Andockstation: \"",?.~.name,"\""));# r5 m B9 H. c: d- f
else2 B" F v( i! X6 j8 d
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& u, W8 D4 t. R8 d r5 D5 r9 [; o to_str("in docking station: \"",?.~.name,"\""));
2 |: g( e! C3 m$ Y) E) J end;6 @$ T8 n* E8 S4 d( b
else5 @5 U3 A$ V" N5 m- _' K1 G' M
@.Destination := assignLObj[1,row];5 z7 O) h; E9 f [9 S: D2 S
end; 1 }8 ]7 z+ l, A/ W3 [ I* `7 c$ D
newDirection(@);
' E0 j+ t- F8 A0 h2 a) r) k9 G @.HasOrder := true;' T9 w* C v, `: O) v, R
end;9 Z3 i4 a1 S7 a( i
end;
* d5 h5 C' u( u2 `& A, y' P0 Vend; -- of the method
% o& {0 J+ N+ S) z |