/* called by: entrance ctrl of the object 'track'
5 e6 x& u O6 ~*/; i J1 @: }# |
is7 [/ d3 d0 Q1 D% s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: E! e, U, A5 f1 O* J2 Y m# mdo* p+ [2 G3 z+ g( ^ U* x! @
Lan := rootfolder.Internal.Tools.AOLlanguage;4 l1 q/ G& f5 k; n% C. c
if current = @.Destination -- else return5 ~2 {) `( x+ m. t" k6 S: k- ^1 P
then
) ]; g2 o D" R8 | @.Destination := void;" { b- z' C6 }7 i% \ r
if @.occupied then
6 k c; p: o: Q4 U7 ` part := @.cont;. q- e7 ]3 M6 L, C
@.transpOrder := void;
! V, }9 a# R8 I8 G0 e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 q$ p! U% N+ w! U% ]2 r1 K8 K# u3 @ @,root.eventcontroller.simTime);; W W* E+ o1 s
@.HasOrder := false;
7 }) f+ W: X7 N! e @.DrivingHome := true;
: C+ S2 z; ^; G- x rgManager.tryToStartTransOrder;
# ]$ x" ^/ [. w/ n! | if @.Destination = void
! o. r7 c K3 H/ Z# `& W; }: O then -- no transport order for vehicle @: n& z# q2 M: v9 _- I: c, x' b
@.Destination :=. e7 Y; v8 i: o+ v& X! D0 ]$ N
rgManager.nearestFreeStation(@,track.~);/ }9 g; ~3 Z/ z' z d
newDirection(@);
/ C3 J! a" B% K$ ]3 @% r. @8 c if @.Destination /= void then$ Y8 r; b6 y3 M" O
@.Destination.NumReservation :=/ _6 H. C. e! y" v# u
@.Destination.NumReservation + 1;
, E% H/ m# r. N! `' Z# p end;
( ^0 U: c8 u/ j3 e* P @.CurrIcon := "drivingHome";
y) i. ~; W; s( G4 G a+ g @.DrivingHome := true;
% u% |( m( e: H8 k7 T- S+ a% U end;
1 S+ M4 n K1 X' n/ A# ?4 Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 y" c0 @" B0 o/ [ part := @.transpOrder;
: x2 A4 k" F% W; c9 @0 A7 X t- x part.move(@);-- load part8 p4 q8 ~: k" ]; u
@.CurrIcon := "load";( v# Q( e% o1 P; C4 C/ R
GlobalDistObj := part.globDestination; c0 y: `) K! A0 x0 N
assignLObj := rgmanager.rgAssignL;3 e- F6 k9 g1 {( C9 o% n
row := assignLObj.getRowNo(GlobalDistObj);
9 n s4 H- R8 L* _3 i9 b- P$ o' J( B if Row = -1 then -- since 70
3 q) O# I, q' ~. K7 Z' f0 f+ a if lan=1 then
; H. A, O) Y: n' |/ G- X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% T0 R$ p7 q6 J) ?" s3 v
to_str("in der Andockstation: \"",?.~.name,"\""));. e" a2 O; e& Q7 Q
else- f2 V/ ?1 R9 N a7 L
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" [& |7 z/ M. _9 S# A T' T to_str("in docking station: \"",?.~.name,"\""));
( x7 Z3 ]3 W4 Y6 e" t1 H end;
, {' Q2 D9 W! [, m else
3 w: k [4 a: U" x3 W @.Destination := assignLObj[1,row];
0 U+ T1 m+ T% w. t6 N end; % M6 ^' B5 l5 ^0 J8 J
newDirection(@);
/ _6 T3 G/ {& Z/ u( x @.HasOrder := true;
, ^+ {* C6 W7 m% |# v. a2 M end;2 U7 t# ?6 j; o3 \2 r8 L/ n
end;
5 s6 H9 G. ^7 R7 e' v7 w5 gend; -- of the method" S* f% Z' A: y+ ~1 ?' V8 I, j- c
|