/* called by: entrance ctrl of the object 'track'' _8 Z9 m# p( f+ x- t+ p8 m# g8 N
*/
! Z, {* d5 A1 V5 L8 c" ~is
$ D ?, Z3 m" t9 @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ u% y8 v+ _# I, ?2 R
do
& `3 N' P1 O) ~ Lan := rootfolder.Internal.Tools.AOLlanguage;9 B: ~& ~+ R9 l' R; o0 {
if current = @.Destination -- else return3 p% M0 W8 J6 }1 i
then
8 M( b* P3 f& S8 L, r: C, g! \ @.Destination := void;
. ~! T: y R. @ if @.occupied then
5 R2 O$ K3 l6 H6 ` part := @.cont;
$ R; T- d$ ^8 p" @8 D/ Q/ Y @.transpOrder := void;
- ]" U" m, K% S: E part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; n, Q4 ~0 { | @,root.eventcontroller.simTime);% Y4 g% y9 b8 n2 m) T0 i9 L: s
@.HasOrder := false;
4 t' V: U v) z7 r6 }% ]1 w @.DrivingHome := true;
6 |* c: G8 M; [6 A2 x+ f$ r rgManager.tryToStartTransOrder;
# h4 O) c9 j0 Z( _0 T if @.Destination = void: b5 \0 C& d; L& P8 g% K( q2 Y" ~
then -- no transport order for vehicle @
0 {( T1 b+ ]/ ?! F& I' B& ~ S5 L @.Destination :=4 i# Y8 g( w4 d; k' v! O. q. O
rgManager.nearestFreeStation(@,track.~);
, }6 n% C" o: ?0 B; m8 ~. V' [( D newDirection(@); : A9 u: r! R6 }% |* O
if @.Destination /= void then
) t1 A* I* z* K Q @.Destination.NumReservation :=
& q' v- C0 q% _! ~; k$ I @.Destination.NumReservation + 1;. j# p. _. q; {, `
end;
0 {0 ]% U+ j& D$ x2 I @.CurrIcon := "drivingHome";
$ r* c) m" c l @.DrivingHome := true;
4 g5 \* [- D/ [& C& M end;2 p) O) @5 l: W5 h2 h* f
else -- the vehicle @ is empty, both vehicle and part are in the same dock station: K" N1 I# E( ~
part := @.transpOrder;$ I9 Y' {7 ? W) b
part.move(@);-- load part
8 B$ X4 Q% \! \+ M* O- @9 o- o @.CurrIcon := "load";- }# B/ s# s4 N3 `7 w# `
GlobalDistObj := part.globDestination;* Q* K4 C$ C1 J/ \' s$ w. I0 B0 i3 j# J
assignLObj := rgmanager.rgAssignL;9 \% K9 b5 }, \( Y9 q
row := assignLObj.getRowNo(GlobalDistObj);
5 G9 o6 B/ R% s5 ?# e if Row = -1 then -- since 706 a8 l. F, a$ }" h- g! W
if lan=1 then, e1 C( q3 Y& H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. e$ ~# Y& I, r9 _
to_str("in der Andockstation: \"",?.~.name,"\""));
4 v2 f3 j" a3 N, k: s% G4 e else
0 ?* C& Q) b# ^ Z* y6 Y# X promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
i) G! J2 o$ V3 f7 M1 c, ]% r to_str("in docking station: \"",?.~.name,"\"")); 4 \" _# s3 P9 U; O
end;5 K) I3 B5 S" i% _; W
else1 M% Y& D& O: l
@.Destination := assignLObj[1,row];9 U* `* P: F. q8 F
end;
7 `$ L2 U' N# ]# [ newDirection(@);) R9 Y3 j: T$ f" M2 k2 w- V
@.HasOrder := true;2 n/ @2 d2 f! j( X2 r5 J3 U
end;
0 v: \4 [2 N- f. s5 O5 }. z end;& q$ ~7 |% u M7 F- K
end; -- of the method2 K4 x4 B3 J; B2 G
|