/* called by: entrance ctrl of the object 'track'
2 r1 |7 O* A: s4 W" z; O& w*/
) } d5 h7 E' \is* m) Q* e) X3 \/ U6 ^! [& J
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, m7 L; ? T" o" T( fdo5 G1 q0 [. C7 Z- s* i
Lan := rootfolder.Internal.Tools.AOLlanguage;
) C1 h( M6 F" w6 M; v if current = @.Destination -- else return
' _; V/ k+ c. ?# m then
, o0 I$ I& o) `# g" D2 T @.Destination := void;
" P z5 H7 E$ @0 o* K" R if @.occupied then
^+ x+ Y* F5 a! ? part := @.cont;) l6 R1 s; p1 O, l7 v: t- O
@.transpOrder := void;
3 _+ Z) x) {4 t3 F part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 p1 }1 t+ F& |& b: z
@,root.eventcontroller.simTime);# C1 Q9 L1 {8 n4 h5 N0 E6 e: m
@.HasOrder := false;- }+ k4 b: e$ M1 M+ ^
@.DrivingHome := true;0 H, a1 m/ h5 @5 m% g
rgManager.tryToStartTransOrder;0 {: s; w& f& \+ [" \' D% X
if @.Destination = void7 ]+ F! [7 t, x x F4 b2 i2 n2 D* k
then -- no transport order for vehicle @
8 {; C3 Q& G( V: l4 F @.Destination :=4 v) w2 F* W4 B3 e$ ~; C, |7 V. E
rgManager.nearestFreeStation(@,track.~);
8 s7 T% z$ e$ H( O newDirection(@);
3 Y$ t" K& ^. u" @ if @.Destination /= void then
5 ^8 j% Y* o. J. L, j @.Destination.NumReservation :=
, `, [4 R& v; g l" p @.Destination.NumReservation + 1;
, d: U1 T9 g6 ]3 A end;5 M5 T$ Y5 ?6 s: n3 j7 f
@.CurrIcon := "drivingHome";) f$ F! F) M$ A+ q& x
@.DrivingHome := true;% S7 W1 U3 ]4 `( {. y/ G8 v
end;
% t8 B1 Q4 S; M% a: c& ? else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: ?: A3 r9 |& C7 n8 K0 x t part := @.transpOrder;
0 a% k4 n% x, S6 m9 M' N, | part.move(@);-- load part T m: h# @/ s2 U4 U
@.CurrIcon := "load";
7 k/ ^' k& A# _. ^. f, z GlobalDistObj := part.globDestination;) Z( y! d# Y4 o2 L+ j0 @; [( @7 N
assignLObj := rgmanager.rgAssignL;5 R% G9 X6 _2 H2 D) S
row := assignLObj.getRowNo(GlobalDistObj);; }- w6 k% f N: ?( L- N
if Row = -1 then -- since 701 A) ^0 B, P# d" a
if lan=1 then
* {$ }$ a+ d+ g4 p$ W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ O& V' a# A) m! N7 h# p5 G to_str("in der Andockstation: \"",?.~.name,"\""));6 f$ Q8 c8 [5 c* e) N/ Z% C- o
else
( f L& c' M7 n& H) O1 u promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: e5 F6 W( ]5 g, r" b+ T to_str("in docking station: \"",?.~.name,"\"")); 0 z7 c. P; T4 y0 p
end;0 K. r4 `2 ]) C1 o
else7 [" d5 W7 N! V+ U
@.Destination := assignLObj[1,row];
( j) K# F, M Z" p8 D( P: L end;
2 e3 b7 w% F' P4 r2 k, g& U0 w$ | newDirection(@);" S! Z; B. |: z
@.HasOrder := true;
5 s' p6 [) r5 r) s+ s8 r P end;
$ R+ i, k3 H) X' h end;% y2 H4 Y5 z6 J/ L/ x% R8 f I) g: v
end; -- of the method6 w5 J% {) o( u) B) N3 p% S
|