/* called by: entrance ctrl of the object 'track'
) p& _' m' ~; x6 n7 N2 d$ ^! J& E*/
( ]# M; e' q% Eis
4 B$ S C" h, S5 @2 i8 |8 O7 p part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ ?# }6 } D* t6 ^# l3 O; Ldo
+ q- a2 A5 k% R Lan := rootfolder.Internal.Tools.AOLlanguage;. I* j! t1 J3 e k/ ^
if current = @.Destination -- else return* J+ @: k# P! O( k' ] y1 r
then: G: K. v; C& l: V4 n
@.Destination := void;# s9 }) m1 p9 h% L3 a
if @.occupied then
# u* l: p/ J0 k9 E6 C part := @.cont;( y7 T+ r7 t6 `/ O/ Q" S
@.transpOrder := void;
+ V$ v6 o w8 f! Z3 N. R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! J6 h, ^& Q8 y! m
@,root.eventcontroller.simTime);
' P ~0 e" ~( A2 s: o4 i6 c- o+ J, f7 K @.HasOrder := false;7 r2 h# n: u8 d& ~' V% k s
@.DrivingHome := true;0 ]3 t3 W9 t, `
rgManager.tryToStartTransOrder;& H' _) E! j$ Z
if @.Destination = void+ G' T' u$ k% `2 A
then -- no transport order for vehicle @4 ?8 `6 q7 B/ v$ Z% G
@.Destination :=
/ S/ J4 j2 c. g" a6 [: w rgManager.nearestFreeStation(@,track.~);5 s* t. V; H8 T' K' }+ t
newDirection(@);
2 L% Q4 b; s! j$ A: T: S5 Q if @.Destination /= void then9 Z* f( i* X0 y; c2 |; D
@.Destination.NumReservation :=! \0 U6 E0 y2 D. @. t* k' M
@.Destination.NumReservation + 1;
5 }9 `4 G8 R) u* J" P end;
2 c; k2 z, i# m$ T3 l: v/ x6 ? Y @.CurrIcon := "drivingHome";
* Z' k* f! h% X$ d3 O @.DrivingHome := true;( }, z4 B3 {2 ^: m, u1 j( p
end;* j4 a9 m1 @3 ~, V( H- B6 o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ @( n1 L6 l& T: P part := @.transpOrder;0 D$ b5 c/ d0 r
part.move(@);-- load part. W( _4 u) Q' ]+ x
@.CurrIcon := "load";
1 S n7 V# r9 v3 S& k/ | GlobalDistObj := part.globDestination;0 {6 _2 u7 w7 r
assignLObj := rgmanager.rgAssignL;7 ?) S# \* P' e6 x
row := assignLObj.getRowNo(GlobalDistObj);: \! U* Z) s5 d# m" F8 w5 a
if Row = -1 then -- since 70
& w7 T/ e. q/ ] if lan=1 then9 P, @$ P5 b/ `
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 L9 Y+ l3 Y( k1 T& x2 W
to_str("in der Andockstation: \"",?.~.name,"\""));+ v+ `+ ~) _& \# E$ \# \5 h
else
. F6 U9 T9 G( u promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' }4 c; k/ C6 a. a' B
to_str("in docking station: \"",?.~.name,"\""));
0 z+ [' R- ~( j3 j2 w" a- b end;
2 b5 n8 U8 H" K/ t else- H+ k7 {! |4 I$ H1 m. H
@.Destination := assignLObj[1,row];" q2 X$ D, h$ i% P/ a8 o
end; 5 z5 y/ B! k% P+ Z0 A8 I
newDirection(@);
5 X5 B" O, w* ?7 `) R9 t: _ @.HasOrder := true;1 X$ w5 E3 y( k. h! t9 L
end;
" k& G7 X( F" I end;3 B3 V5 G0 P* f( Q; p, r
end; -- of the method9 p6 |9 y; y. y2 j$ }5 i
|