/* called by: entrance ctrl of the object 'track'
9 f/ G8 F* z; X* g$ v*/7 _6 r! @" ~$ C8 c/ p
is3 s1 J$ f; J# M6 Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" G9 M$ k# A; j- ^' tdo5 `9 F$ c# G1 I: K" J2 W3 T0 L
Lan := rootfolder.Internal.Tools.AOLlanguage;# m/ f7 w$ Z/ Z1 b
if current = @.Destination -- else return
" S! x% Z8 F( M; }4 f0 d: t: { then
3 h! g9 ?. p( ?1 I: n' D& J @.Destination := void;7 u+ [8 t& |: C; S2 C
if @.occupied then& T* _2 i: O/ i ?# X! D
part := @.cont;
7 U/ M: T. j* y7 Q @.transpOrder := void;; v K6 e9 O- S, g) s3 y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 P4 U- l8 P$ m- E! F
@,root.eventcontroller.simTime);
* @% y" C" y0 O2 O1 T& _" i @.HasOrder := false;
6 E; E+ r, v9 J% M5 n @.DrivingHome := true;
) @4 `* R8 I" v) h5 r. n rgManager.tryToStartTransOrder;
' ], d ]- Y8 |9 ?7 p9 E if @.Destination = void
* I$ n& R3 A) n* b then -- no transport order for vehicle @6 W5 g& c: b5 q# I8 _! X
@.Destination :=
1 Q6 d2 c$ v6 W4 p, z5 Q rgManager.nearestFreeStation(@,track.~);! B" U0 b9 A4 R# S, W" z
newDirection(@);
+ ?( ^* v% A9 O if @.Destination /= void then
" D" y& Y S% T1 P/ m L @.Destination.NumReservation :=3 S( N/ \. C) R- s' M% `
@.Destination.NumReservation + 1;, t! O3 T, t. e7 y7 U% }# j9 L3 N
end;4 Q" M' x+ [- w& |6 j J
@.CurrIcon := "drivingHome";
6 \+ @7 |. b$ j @.DrivingHome := true;
2 W0 }/ b# e) ?0 ?; c8 ~ end;5 q# ?1 ^4 R4 l4 {4 M
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ `. W; H0 s, Q
part := @.transpOrder;
/ J3 c1 @( R) p- R. D2 |2 ` part.move(@);-- load part
9 L( O3 [8 ?( K6 o# Z5 `$ V @.CurrIcon := "load";5 B9 c/ r9 o$ X( Z W/ u- R
GlobalDistObj := part.globDestination;
3 u1 q) z' h7 }) Y- F5 z0 y6 m assignLObj := rgmanager.rgAssignL;5 U* C P4 M$ A' L+ u- D8 _2 I/ O# F
row := assignLObj.getRowNo(GlobalDistObj);0 c: H9 {1 v: ~: B* o) J
if Row = -1 then -- since 70
% Z( j" T3 _' f9 O( l4 T if lan=1 then
0 ` {: ]6 b+ ^" d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) n9 R$ X& T, q9 C
to_str("in der Andockstation: \"",?.~.name,"\""));* L' V5 Y! |# U$ Q% S, x; _
else) v- q, D; e w( O
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) _3 _; g4 D/ s c+ e' q to_str("in docking station: \"",?.~.name,"\"")); - J% F l& p6 B! W
end;4 A0 e ?% l+ h$ a, F3 O
else
& I8 V% t! p% A: I! `- U @.Destination := assignLObj[1,row];
0 U: b1 M' S9 {$ o3 f end;
% j- d E$ R8 p- ~' f: C# s newDirection(@);) V" }) f) x, ^6 S
@.HasOrder := true;
& }7 z& k/ b4 R" R' f5 x end;
, c( g8 R3 Z( x end;: z$ c) N+ \2 K, y6 l
end; -- of the method4 R! j9 z; R5 f+ B, o& y6 f
|