/* called by: entrance ctrl of the object 'track'- q2 [' h$ y1 Y
*/
7 B" O; }3 v% C; }is
$ }( n5 r$ I" C. T! `* ]# X part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 w }0 f! q5 |% `. d6 n$ S& R0 E
do2 p! ?. @0 @8 N" S+ c" q
Lan := rootfolder.Internal.Tools.AOLlanguage;
- _: v' n/ j1 L, B* m% R if current = @.Destination -- else return
+ u% c1 b L! N0 x5 S/ \ then2 r+ r5 g7 X0 R+ _* c5 o; Q
@.Destination := void;7 o1 P5 r, I, x4 G+ A: Y8 h; G
if @.occupied then
e+ U# H0 v/ u, j& s6 z( S part := @.cont;! q3 V P, r7 J% z6 C5 u2 G
@.transpOrder := void;
" w4 @( v, R; U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 R" ^8 y9 V% r5 J/ G0 D @,root.eventcontroller.simTime);
v8 T& k. x6 T! l3 v8 v @.HasOrder := false;
* j" N' E: O% A9 a @.DrivingHome := true;& B9 l& t0 T/ H
rgManager.tryToStartTransOrder;/ X' Z9 E5 B8 f7 e* B/ `
if @.Destination = void
$ N1 G* v6 O, W, Y5 m2 W' b5 b/ v then -- no transport order for vehicle @9 r# z8 S, p% c2 G7 @
@.Destination :=' c9 v, m+ n C1 N0 D: y: m1 \
rgManager.nearestFreeStation(@,track.~);- k. F! B% f6 f/ Y' A: h
newDirection(@);
3 I! ^/ h" J/ } K if @.Destination /= void then
! r3 b% k2 j, M5 P/ c7 I% v @.Destination.NumReservation :=
. i) g2 W: ?" d4 N @.Destination.NumReservation + 1;1 J, u8 J1 ]0 y, Z: W/ _
end;
+ `* e9 [0 B+ u1 L9 m @.CurrIcon := "drivingHome";$ j8 ~' e/ m9 Q! L7 n
@.DrivingHome := true;" D+ A" U3 x9 r5 U" w. D
end;
; R2 L2 Q/ s& P3 E# Q9 P6 [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station! ], S- ]# d& y
part := @.transpOrder;
9 i2 E0 j( X$ X+ K7 w; t part.move(@);-- load part
: M7 B5 R0 B: @0 I! |4 w @.CurrIcon := "load";7 A) a1 x6 \& I" K, J
GlobalDistObj := part.globDestination;5 y% ]7 |- O* u- k5 b9 s- B
assignLObj := rgmanager.rgAssignL;
& ]3 Z, L/ T: S% q$ } row := assignLObj.getRowNo(GlobalDistObj); C" n' Y G$ A) {; j" [" V- U
if Row = -1 then -- since 709 g6 M4 h2 H2 U% {& u- R
if lan=1 then
; ?3 E' ^# m2 F9 R0 O0 ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* P$ [0 y# l( O8 e8 q0 I
to_str("in der Andockstation: \"",?.~.name,"\""));
* S) O) J& S8 Y! m& Y6 ? else
2 a w6 ]) o; p promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 {1 W$ l" d1 L$ L: ]6 O2 G to_str("in docking station: \"",?.~.name,"\"")); y7 j/ ]/ c7 a1 `
end;
& u) D9 d' c% h7 }5 ?; u) o/ o else0 q& d+ B' l" ` g% p
@.Destination := assignLObj[1,row];
, o, N# p/ }% e f/ z, Y end; + [; B2 M6 W' E6 q4 n9 {
newDirection(@);
0 I6 C. A, |4 U @.HasOrder := true;
3 g X9 d6 p/ G end;5 p2 a# b& J) W- `; y, |$ u7 P7 @# }
end;" {' V$ \1 ^0 K3 Z, X5 o
end; -- of the method5 F$ x, P7 U- v2 A
|