/* called by: entrance ctrl of the object 'track'. R$ |1 m4 i1 }/ Q* I
*/" u9 E$ X$ D# K# C; O
is
5 S( h* G9 k U8 n part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ w# F: l) E. i% z, y$ s
do. [ e, G% j/ q2 i9 e/ I) M/ Y. k
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 r+ ]2 W5 p! _. z if current = @.Destination -- else return
* x7 z0 [; r5 u; Q then6 j0 N$ g! {! Y4 L0 F5 ?" X
@.Destination := void;3 u h# x! I3 y! w! n
if @.occupied then: F6 ~* S& Y+ [
part := @.cont;
% n% T% r: Y: I. R @.transpOrder := void;
K' P3 p9 N: O7 O- x' o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* V& f5 j% u3 g2 {8 u6 G
@,root.eventcontroller.simTime);
) `; j9 N$ l( C9 b4 {# j1 r @.HasOrder := false;
& ]8 m2 ]" u1 I2 Y8 p1 Z4 Z @.DrivingHome := true;
# L! g) T0 n* u& X3 _' C# ?" ^: W rgManager.tryToStartTransOrder;
7 V3 Q& {/ G% i1 a1 Q if @.Destination = void
) s9 T4 W; j2 @! R3 w4 F2 n: Z: Z' \ then -- no transport order for vehicle @
0 h% u# R; ]3 {# F u @.Destination :=
9 D6 n/ ~! i4 K# O/ D* q- v! C H' c- [ rgManager.nearestFreeStation(@,track.~);
) N9 e; W( n2 N# k. G% a" h% b newDirection(@); - j" P6 z7 i+ G9 T: m; `3 A
if @.Destination /= void then
5 X3 J1 S1 F2 t: \7 R3 L$ l9 m6 | @.Destination.NumReservation :=
; y8 G7 ^( e& k+ e7 G5 W0 q @.Destination.NumReservation + 1;
4 p5 o6 L7 H) J* f end;
* k8 t3 r; U- V1 p! e3 M @.CurrIcon := "drivingHome";
; N T/ F `4 B/ G @.DrivingHome := true;1 b2 F: _/ Y7 _, @. _
end;
9 ^4 E* l% i; S" L9 U$ s/ r else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ h1 ]) f1 @+ n" U4 l2 y) { part := @.transpOrder;) ?/ Q6 ^5 \$ b9 y! f
part.move(@);-- load part, H+ b$ w4 B- p
@.CurrIcon := "load";
, l9 Z" ?/ ?- N1 E# D3 E GlobalDistObj := part.globDestination;
/ T7 T F$ K/ U w4 k" } assignLObj := rgmanager.rgAssignL;2 g) V$ o3 ^$ G) \& V4 r% D9 d) ~7 n
row := assignLObj.getRowNo(GlobalDistObj);
" b$ i4 A, X3 J4 s8 s+ N- H# {0 N- _7 | if Row = -1 then -- since 70" C, R0 t4 y. Z( W2 s) ^" f2 L4 w
if lan=1 then3 _; [% s3 p B3 r# O
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 z7 E, S% \. L" Z. L% J3 q- K2 C
to_str("in der Andockstation: \"",?.~.name,"\""));9 `$ n9 y5 a1 Y5 s% r3 A% Q0 m
else
" g/ j/ e( H6 Y: a6 x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 X. L) s, C: x6 s: f/ M to_str("in docking station: \"",?.~.name,"\""));
1 W+ @* t* U; [* Q2 k- r, z end;4 S4 k0 F& Q1 b% w( L+ n, u
else3 q$ y- C7 F3 y2 k9 A- m4 Q5 r
@.Destination := assignLObj[1,row];# w3 w. N$ W- c/ o" V' @. \
end; " t* J0 G" A% J" @7 H
newDirection(@);* B) @/ g$ U$ e/ j* X
@.HasOrder := true;
9 s1 R. }% X* Q' Z end;8 f8 M5 z B; M5 q' Q3 \- O
end;
! a1 B& a& R& _% `7 L* V9 Gend; -- of the method8 J. r5 Q5 }% r0 k4 z! o# @4 p
|