/* called by: entrance ctrl of the object 'track'
% |& l' c; s A8 L8 h# ^/ D*/
4 l% b# W! a" V- E2 V* nis
0 y) h! F, k2 [$ u" G) n part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 t$ c, W: u& T8 Edo+ b+ B# S: h, X5 F
Lan := rootfolder.Internal.Tools.AOLlanguage;
: X0 F' f8 i; t. v. u if current = @.Destination -- else return
+ n A1 c8 z) s; c" S0 r1 \' q2 V' c then
4 |; D$ {* @1 k/ w/ X @.Destination := void;
6 T+ n. x o9 H if @.occupied then1 z* F/ V8 e. e9 z) J
part := @.cont;/ S' C8 k7 S! K n( t# A0 Q* V' ]
@.transpOrder := void; t8 q8 ^0 C" Q0 ]1 e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. t) j L4 N4 Q! N @,root.eventcontroller.simTime);( ]; a) W6 b: O8 H4 v4 Z! q
@.HasOrder := false;
' {6 n" V; Z& L) N @.DrivingHome := true;
& x x6 Y U& U$ l rgManager.tryToStartTransOrder;
+ b9 R3 q8 o( W* U' p if @.Destination = void2 f0 c Z& s1 Y4 d! Z* d
then -- no transport order for vehicle @
( q6 s1 v% v3 ^. X @.Destination :=$ ]( J1 R) w/ t* d$ S
rgManager.nearestFreeStation(@,track.~);
: R4 P& @7 R3 r6 \+ z9 x newDirection(@); ) r V5 K U2 I$ l9 r7 N
if @.Destination /= void then; `9 L& Z n$ z( m" N
@.Destination.NumReservation :=
. {' Q0 Z9 V9 @/ U4 p. ^9 K; P @.Destination.NumReservation + 1;
R9 u2 h/ ^# Y E/ E end;) W" @( b2 y w
@.CurrIcon := "drivingHome";# h- D9 N, d$ X7 S/ b( B: J1 I& f
@.DrivingHome := true;
. C1 B! Z( |7 h9 k4 x+ g; H' I& } end;+ {- q$ @3 n' u9 y( {8 Z5 Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 ]$ {5 D7 D* L8 i
part := @.transpOrder;3 v) U+ B! }; y9 a7 C
part.move(@);-- load part
; O5 x7 @( E9 A- O& m6 K2 m9 _5 _8 s @.CurrIcon := "load";5 m/ e* U# j- r( a4 k" H$ d
GlobalDistObj := part.globDestination;
7 ^6 k- K* D X5 M- M' }) G" p assignLObj := rgmanager.rgAssignL;4 E3 I0 z. K- \
row := assignLObj.getRowNo(GlobalDistObj);8 w( e1 Y$ W' F, i9 x
if Row = -1 then -- since 70
0 H+ [# z) f9 x$ {3 F) G( b if lan=1 then
0 U6 B7 r& l. L# {) O. @ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 V( E2 h; R1 a! a! p to_str("in der Andockstation: \"",?.~.name,"\""));
" W9 T6 N& C+ p) ^9 B8 b9 f else1 n6 {$ P6 S4 O
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# D0 N& n5 O8 i to_str("in docking station: \"",?.~.name,"\""));
# L* d g- u8 S1 e: O G. n end;( |; L7 l& Q8 m Z0 v: N! V7 U
else2 z: N- M) j. u" T0 @' O5 S
@.Destination := assignLObj[1,row];6 E! I/ u, D" g& M8 X6 d
end;
- H3 j" V& y9 h newDirection(@);$ f: \, F8 ?" ~# Y) ^/ y
@.HasOrder := true;
0 \$ z# W5 w5 o end;
' N! R, \4 a1 H8 w end;
/ l% y4 f4 e! }9 gend; -- of the method
1 u! j+ z, A& W4 x5 O+ _& P |