/* called by: entrance ctrl of the object 'track'8 _' d. ]' H; |5 H4 n
*/
% |9 R) g+ B7 nis
+ Y4 T6 U7 c; K2 ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: f! c, X3 ] m! Z2 Cdo u& W; U( r& w; U! t
Lan := rootfolder.Internal.Tools.AOLlanguage;! Y+ x/ E) u# k3 F2 I
if current = @.Destination -- else return" n* o2 b1 B3 ~+ M" P
then
7 K6 e e4 w6 N" K @.Destination := void;
+ G! I7 B2 x0 Z) x5 R; z if @.occupied then
: ]8 `) A# h7 z, @4 m# u. Y: b part := @.cont;
3 m$ _9 M3 S" C$ s& }+ a% @& v( U% y+ d @.transpOrder := void;
7 X% q% [% T6 R0 h: i7 @9 r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% G5 T6 P) V, q# X5 s8 S
@,root.eventcontroller.simTime);) o/ U' U5 }7 G( y$ ~' m- u! P
@.HasOrder := false;0 g" }1 M7 p' q' t. O
@.DrivingHome := true;4 D9 o+ \' Y5 @* t. q( ]+ U! e
rgManager.tryToStartTransOrder;
% u2 m2 ^# I+ B3 @, O2 f if @.Destination = void% R5 a& f% X" [+ C% i
then -- no transport order for vehicle @
" z# D6 O: w6 x; _ @.Destination :=( }7 ~1 C: s) @' ~
rgManager.nearestFreeStation(@,track.~);% `$ a: J+ a k
newDirection(@); P9 t3 q, E& X9 q( f8 z `
if @.Destination /= void then2 w7 g5 J8 W/ @" _
@.Destination.NumReservation :=
3 q/ \& r) F/ x2 A }) d$ { @.Destination.NumReservation + 1;
/ A- J4 K# M( T V N end;
. y3 |8 H8 \ G) k! r6 T7 s! l @.CurrIcon := "drivingHome";
0 ]- a$ _1 _1 q( \& D$ b9 Y @.DrivingHome := true;
( ]7 P4 G# f! {) k end;
% u/ Z/ R7 p3 U u3 q else -- the vehicle @ is empty, both vehicle and part are in the same dock station! d3 R- N; U; Y$ c% {0 K; k1 d
part := @.transpOrder;
% b% @4 W& f9 M0 b part.move(@);-- load part
% R* ~8 J" s' _: s. @ @.CurrIcon := "load";
6 v) v5 R9 W; E GlobalDistObj := part.globDestination;1 l/ J+ f2 e, r# ~8 m2 _. |
assignLObj := rgmanager.rgAssignL;- p/ D" T/ w7 f
row := assignLObj.getRowNo(GlobalDistObj);
% {0 _* S# B: o7 S; R& j if Row = -1 then -- since 70
" T' G: `& O! ]2 { if lan=1 then0 {1 d: p. d. I, H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% ^& D8 D+ y- s4 F% w% O$ W4 ~1 y
to_str("in der Andockstation: \"",?.~.name,"\""));
2 U3 ~( M$ G r2 w h else
$ v; l3 v: C9 }+ U/ _3 z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 b# x, d' J5 v
to_str("in docking station: \"",?.~.name,"\"")); 4 I$ ^5 X" V! ~ `& m4 v$ g' @
end;
( c7 F# Y6 E8 j else, D5 p n4 q4 T* X( m7 L- Z
@.Destination := assignLObj[1,row];
" B6 C; e5 f; y end;
8 p) P; L+ }6 |3 `' F newDirection(@);
( ?) t1 Y; O) {- s( j @.HasOrder := true;
6 m9 ]7 w& O& G; G end;3 a# d7 o8 ~/ p# ? Y
end;
3 E" H- T8 m4 N* M+ }end; -- of the method# Y( v# x1 _, ]0 _! j
|