/* called by: entrance ctrl of the object 'track'% v' O. X! j; x4 P
*/* B3 J& w) V! r! |! q
is9 h6 Y- g+ b; c- U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; r9 ^/ P" b! c6 e x" P, `# U9 kdo2 D$ E7 I1 Q. B# D7 \' B7 y7 t
Lan := rootfolder.Internal.Tools.AOLlanguage;2 U& d6 @, d4 v+ \+ K0 B
if current = @.Destination -- else return
. r: C4 Q5 c' B# O. Z# o5 O2 l then- X) t" }) d+ C, |
@.Destination := void;
( D" J3 q7 W0 j6 G if @.occupied then
( h: z2 T' k; y part := @.cont;( o5 m/ }4 p0 H# h2 p' W2 O7 ~0 n
@.transpOrder := void;
0 a7 m5 k/ I* R! S1 L, b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 `- E2 @8 J* X c
@,root.eventcontroller.simTime);
& [3 n5 }% `. f& \4 J3 H @.HasOrder := false;
) b5 z4 D- l9 Y2 Z8 ]. i8 Y8 p0 p @.DrivingHome := true;) l% P$ j% G9 b( Y8 Z
rgManager.tryToStartTransOrder;
% L) d( H, M- Z' N if @.Destination = void
( y9 b5 k1 ]; l5 [, d1 C% y then -- no transport order for vehicle @
. P5 u$ u+ \ K d N9 e @.Destination :=
- j# g& J) d0 q0 L! Y% B" y/ M$ {( C rgManager.nearestFreeStation(@,track.~);
- U6 F s8 O$ V6 Q$ ]2 s5 U: P newDirection(@);
) q. f4 o" t3 y' W) l1 ?& ^ if @.Destination /= void then2 L& g+ z7 G9 X5 U( P
@.Destination.NumReservation :=8 v; n1 w4 f% N2 Q
@.Destination.NumReservation + 1;
# n6 L) _) {7 m end;) E- A) F x5 @5 s1 @0 o9 V1 x
@.CurrIcon := "drivingHome";
% C5 d! e( L- c4 B. h- k( p9 G @.DrivingHome := true;/ t! h& E. O* _, g& ], u" L. e
end;
O! q1 e& F' g5 P, i else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 s* y& Y6 O$ x# Z part := @.transpOrder;, c/ d; w" B& N5 f6 j
part.move(@);-- load part
$ A; o" H5 r0 u @.CurrIcon := "load";4 g: ~/ m5 X% j* |! m& O
GlobalDistObj := part.globDestination;
" w" K1 ]. b9 u) T. ?# s. d assignLObj := rgmanager.rgAssignL;9 ?7 b7 G l; E
row := assignLObj.getRowNo(GlobalDistObj);
8 l( x* Z5 l; z% `8 l if Row = -1 then -- since 70% E* [ x4 ^, X
if lan=1 then" f6 [5 z! k1 N& F) p* t
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# A7 Z* _# P2 k* U; `8 e; f& E3 i to_str("in der Andockstation: \"",?.~.name,"\""));
$ @4 P0 ?3 z: W& _ else
+ a! E2 X) C- r9 @5 P& m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" _" A- u! F6 ` to_str("in docking station: \"",?.~.name,"\""));
0 c" Z: p- p5 M+ m1 p) ~ end;
7 Y; A/ ]' }4 J/ j' J8 Y else
# r! ~4 b4 f2 P, D6 J @.Destination := assignLObj[1,row];; o I# L& p: H) U3 T1 G4 X! ^: A
end; 4 m- S6 X# p- v8 ?8 _4 I
newDirection(@);0 j5 l ]0 U- w5 E: L6 s
@.HasOrder := true;
1 J( Y* H5 d% Y: `2 ?" } end;3 [. t! h; J2 F& V$ P
end;8 t$ i" y) W# Z* j5 t; A' V
end; -- of the method
0 d. F8 E; G9 ^- p+ m/ W |