/* called by: entrance ctrl of the object 'track'
- M, P6 ^. B2 m- h# i7 ?*/
, @, V( v6 X8 \. v, |. r& Ois, h% L d$ B7 ^ u* U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% v1 V. }( @1 ^0 H% mdo7 @0 m8 }. D6 a* d- |* ]
Lan := rootfolder.Internal.Tools.AOLlanguage;
! [% k Y( T* b: X& `! _, Y2 X if current = @.Destination -- else return
) H. |5 ^2 c! E1 f then9 z+ s+ _+ z% }' p% V
@.Destination := void;
# U9 R) E* X9 J7 M9 V/ V4 n if @.occupied then
7 V' E1 ^9 N1 {! A" i0 w+ ~# { part := @.cont;
~6 S7 z% {' }6 s' q3 J @.transpOrder := void;
; ?; G0 R1 e4 |% D8 \1 [( T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ m% w3 J6 |3 U4 V @,root.eventcontroller.simTime);
9 [& ~5 x2 _; b) n9 g @.HasOrder := false;
) V" T' }/ k: z# ]+ v( S7 m @.DrivingHome := true;% ]2 ^3 t% Q( N2 h0 i' W5 F
rgManager.tryToStartTransOrder;
7 J3 h! G* D% B1 Z, F2 I3 ^+ | if @.Destination = void
) d! D, h4 n. } then -- no transport order for vehicle @7 V# @) r) B8 e8 D3 ^! Z, \
@.Destination :=9 N% a8 J- \; a* ]2 A1 D" J/ W0 R$ A
rgManager.nearestFreeStation(@,track.~);/ {$ Q/ }# \% W
newDirection(@); " _/ g; r; o! `! T$ q, v; Z' V. n
if @.Destination /= void then
8 ]$ p3 R; z1 r' M u0 } @.Destination.NumReservation :=
7 L3 g. M. G5 P' e1 ~( ] @.Destination.NumReservation + 1;' \5 o* d" \7 q# t+ B# T
end;8 Z" [3 Z& Q" M& ~0 B
@.CurrIcon := "drivingHome";* R0 H& Y$ @! K1 {! T8 b
@.DrivingHome := true;9 x5 Y5 P6 [6 U8 K H
end;; m/ }6 d6 Z: O/ K+ c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station: c Q* V3 d0 U- P0 _7 R0 f
part := @.transpOrder;$ ]0 C& b l1 N V% S H
part.move(@);-- load part
- ^( i$ _+ q4 n @.CurrIcon := "load";* G: `9 ]" y) s9 N- |
GlobalDistObj := part.globDestination;
4 ]. o; o. l. i4 I7 T assignLObj := rgmanager.rgAssignL;
0 m/ z/ L* {4 A& s8 b' e row := assignLObj.getRowNo(GlobalDistObj);% y4 c! o- U! F# s
if Row = -1 then -- since 70
; K0 N/ S; @ h( X8 g$ w$ g if lan=1 then
2 g/ e/ i' h) y1 A R$ { promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; e/ t* `) N# m# p to_str("in der Andockstation: \"",?.~.name,"\""));
{6 e% u3 Q5 F( [2 G* F5 [, j else
# s" _7 w' }! [9 E n* E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, g, n# i% {2 q# s% _
to_str("in docking station: \"",?.~.name,"\""));
$ C" c4 {: k( J& p4 j end;
9 m: q8 X8 G1 u' ~ else* f" ]: @8 @; I
@.Destination := assignLObj[1,row];
" {7 S* T n8 {6 y: l1 L; o$ ~ end;
& P3 V# i8 L1 W: M$ S$ s# O newDirection(@);
, |! m) p7 k, [$ y @.HasOrder := true;
4 P% }% ^2 t: E. G end;% i7 ?0 |" E; |
end;
0 d( B! g; N {# i/ p9 Fend; -- of the method' p- v6 `) b4 k. u) b% m
|