/* called by: entrance ctrl of the object 'track'
( l! P5 j$ V* N*/. o* \$ b, B$ r& d, o, [
is) A0 L4 x A2 r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( y0 r# H' y5 m7 V+ f
do
. G3 e1 A. F( X" U: D6 q* v0 j Lan := rootfolder.Internal.Tools.AOLlanguage;' d7 ?- ^1 J# q- g
if current = @.Destination -- else return
3 l- M: K- c! L5 q8 O# u then7 e+ s8 H/ D0 F: F# K* B
@.Destination := void;
8 b& `; C8 E6 W% c# ~8 M+ N if @.occupied then( R3 _: h6 O9 C6 ~8 E( U) w
part := @.cont;) O4 o" M+ s; m' [3 }; J- f
@.transpOrder := void;1 ^8 b! \! p, @, y9 T! F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 \$ H# @5 A1 _$ Y @,root.eventcontroller.simTime);8 `. F8 \$ n$ d& O
@.HasOrder := false;
% \/ s* i* _7 q @.DrivingHome := true;3 c6 P4 p O2 X! [( j7 X1 l
rgManager.tryToStartTransOrder;( C: d! h- u+ _# {; j- D
if @.Destination = void
: Q- }9 O7 ~; O$ Z5 L' ]/ } then -- no transport order for vehicle @
/ _1 B3 z& X$ E5 c: q7 @ @.Destination :=
2 h/ F0 u$ _/ M- |. A2 {7 o* R rgManager.nearestFreeStation(@,track.~);
. S/ ~: `# B' D1 o, j newDirection(@); 5 t3 |/ Z( F( C% P: F+ A& E9 I
if @.Destination /= void then
+ y+ z: v( P* P3 m4 m% k @.Destination.NumReservation :=; {! T, q+ v: N! B) |6 A0 @) d
@.Destination.NumReservation + 1;
1 D( t. f7 R r1 |/ t+ i7 } end;6 v5 g9 r6 j X/ w; B; S7 a0 s
@.CurrIcon := "drivingHome";4 b9 J8 D6 C( z9 y& p
@.DrivingHome := true;
) V6 z% Q, Y. y$ U8 T end;9 h* b, R, @( y8 O: |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; y. \( U4 j% ?+ E' m part := @.transpOrder;$ \( |$ C9 j8 w' ~2 j9 n/ {
part.move(@);-- load part
! I# P+ K4 ^; o: X2 N @.CurrIcon := "load";3 D% }% H* B6 l7 `6 ? \5 u
GlobalDistObj := part.globDestination;
' t, B( S! q) U0 W- x assignLObj := rgmanager.rgAssignL;
, w; T! T+ z& V# E: q row := assignLObj.getRowNo(GlobalDistObj);+ s" M) X9 _& k
if Row = -1 then -- since 70
" X9 o( }6 w; c+ F3 l- ~% j& G if lan=1 then1 h$ Y @# T4 Q' i3 b, X$ ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," c. b" G+ n+ e2 q1 L- [
to_str("in der Andockstation: \"",?.~.name,"\""));
+ G# ?5 V: D" p; f) N, v else
8 }' A! [2 Z) a8 z( r$ Y: p promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' h f8 N8 _$ P, u. r7 o' |
to_str("in docking station: \"",?.~.name,"\"")); + v" o1 U& I( u5 E* N
end;
3 }8 D4 Q6 @4 \6 P4 F9 n else
& ]# t4 O4 C& F# |4 i- k% J @.Destination := assignLObj[1,row];
+ s/ W h2 j9 X* }2 s' z end;
, B# \0 x; ~# M newDirection(@);
) v/ R: p; U6 P& l$ M( ^1 y @.HasOrder := true;
3 C% R! S5 W. ?: e, \ end;" w a/ g% ]. v; Y7 F( Z
end;
. g/ M3 l, P7 t. F3 G) z) U5 nend; -- of the method
5 K- M) M: u6 C1 t+ V) ^ |