/* called by: entrance ctrl of the object 'track'
0 q5 {) ?4 X& ^$ i+ G*/
- K# e1 H, f$ T) `, q& ]5 Sis2 z9 _6 t% ?7 E/ `: a( g6 C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 i y$ V5 `" u
do
% Z) B8 z9 B6 D5 O+ F Lan := rootfolder.Internal.Tools.AOLlanguage; Z, X* t" J* }! W" ? J
if current = @.Destination -- else return
5 M8 _4 j1 n) I/ L5 s! n, _4 q( c. @ then9 y! l0 }( p! I" J
@.Destination := void;
" l+ ?: R& X9 u2 N/ j0 j if @.occupied then
0 i+ L0 b, ~! C. g part := @.cont;+ c4 S) F) W* S! n8 {2 z
@.transpOrder := void;
& ?( a; |' ^; j: ]7 T u5 X& K) N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! X) N: q4 e2 B l% S, a @,root.eventcontroller.simTime);( B7 A0 @2 M: A& e! a/ h) r
@.HasOrder := false;6 {9 z4 y2 j' J4 n
@.DrivingHome := true;
( W! H# Q1 x+ i' W- S, q+ c* F rgManager.tryToStartTransOrder;
$ C8 c) x* A, A if @.Destination = void
& G: \8 D- s7 _, E; { then -- no transport order for vehicle @
! I1 ~7 P) c* R" f1 B4 ]9 e @.Destination :=6 M9 M+ y) a$ p- q& w M- G
rgManager.nearestFreeStation(@,track.~);/ C" [ ?1 h+ l5 Z, I1 n
newDirection(@); 7 E/ b$ _/ }8 m& Q' E; P
if @.Destination /= void then* @, y5 W$ J" ]$ y$ g
@.Destination.NumReservation :=
, c) @* B, A9 w @.Destination.NumReservation + 1;6 i7 Y1 ]" T1 d# B/ n1 w
end;: A! _; K! |7 w
@.CurrIcon := "drivingHome";
* Z! C, g! ^! B( R# s @.DrivingHome := true;6 K9 | L6 _. y/ a! B+ A
end;
( z' C2 g/ K! K* k- e else -- the vehicle @ is empty, both vehicle and part are in the same dock station* G8 D6 L3 N$ i) R* Q1 B/ X% X2 X
part := @.transpOrder;" E% ]' ~- v2 s+ Z! C" F
part.move(@);-- load part
, o0 r, L4 `& n O @.CurrIcon := "load";4 O2 {; q1 N; E
GlobalDistObj := part.globDestination;" \+ v2 I G2 _; I# G: v3 t
assignLObj := rgmanager.rgAssignL;! O* w; h& o) n! g" M! S1 W) A, S
row := assignLObj.getRowNo(GlobalDistObj);
d8 g, M& q0 Z( s# F2 ?) q: X if Row = -1 then -- since 708 T. n8 u: J: {" o& x9 f
if lan=1 then$ v5 E1 K# R# f' I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! a8 d, Z1 W; }( ]$ ]
to_str("in der Andockstation: \"",?.~.name,"\""));9 ~$ \0 q4 _! y
else
# \6 X, L" a" H promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ S1 S; G: e; C& X/ i2 x/ t* m
to_str("in docking station: \"",?.~.name,"\"")); 2 N: Z! i3 a+ a. g9 R& B" p
end;; i7 a2 D- a) [1 p8 y
else
8 O2 e2 A: X6 S5 W: x" ^. ]2 Q6 a @.Destination := assignLObj[1,row];
. [. q7 Y5 B, h end;
! O4 ]; f" W4 d* F newDirection(@);% i& n/ j8 p Q: I6 u) @
@.HasOrder := true;
% C" v3 G, h4 ]* B% R( ^1 r end;
/ d9 B% l) h7 Y7 q. n% C4 E) v p end;
/ G, c2 i B$ tend; -- of the method# h" I9 G3 P# W
|