/* called by: entrance ctrl of the object 'track'+ {4 ?6 R! I* z. _- u6 F
*/' E& m) t$ s# ?
is
: I6 I- A, R8 e) f, W1 Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;" | l+ R8 W8 ?! s0 u) M- k
do
! p. q+ o1 r4 t0 g! h Lan := rootfolder.Internal.Tools.AOLlanguage;9 U& c! D" E2 Q/ W7 @* }" Y
if current = @.Destination -- else return3 r/ u, D- T* b6 o2 b) S1 O2 R
then8 [7 p4 ^; d# }( x' `3 C2 K
@.Destination := void;& a% E! @7 a& F/ C# w1 b
if @.occupied then* w$ A: Z& G; h
part := @.cont;/ s5 i, U1 F9 j3 z! C* J" Y8 P5 f i
@.transpOrder := void;' }, J' B+ Q1 J" f N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( W) V* V/ |- {1 W G8 Z
@,root.eventcontroller.simTime);
2 T5 k' q2 R# Q @.HasOrder := false;
& H% Q& j0 t+ L0 d2 ]# J3 g9 F @.DrivingHome := true;: h- _5 d( F# a
rgManager.tryToStartTransOrder;
; B S" n. ^* X3 i) s! g if @.Destination = void l0 n, g( g1 S$ ^
then -- no transport order for vehicle @% O. l$ J% r" A8 w' n# J' f5 ^
@.Destination :=* o4 X- R1 Z0 `4 P- V& v* {% p
rgManager.nearestFreeStation(@,track.~);
+ J: [6 N: j' u$ q; \% d" n newDirection(@); 7 W! R# M t) N9 b: x
if @.Destination /= void then( X2 d- M3 x$ X& J
@.Destination.NumReservation :=
$ b! T/ m4 t& V* E! d$ g @.Destination.NumReservation + 1;3 b8 T, H. h' E8 U
end;& ?1 N6 _# `6 @& }# h
@.CurrIcon := "drivingHome";
! S8 Q' p7 z& f0 W5 e2 _ @.DrivingHome := true;# E! k; E' K, R) T
end;1 t0 w" [* _/ g. O0 v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 U5 q. | `: ? part := @.transpOrder;% }' Y, o$ P5 g1 m% M' @- d2 U/ f7 g
part.move(@);-- load part
$ G1 S t1 K, n: d @.CurrIcon := "load";
7 v$ \2 o6 v3 k5 Q- G9 S& p+ s GlobalDistObj := part.globDestination;! [# m0 f; Q% H: G5 K$ {8 `* T& m
assignLObj := rgmanager.rgAssignL;2 \+ P1 i, I$ Z4 z; H5 r }3 R. g
row := assignLObj.getRowNo(GlobalDistObj);& o0 a% m o& V% l
if Row = -1 then -- since 70
# S+ {' ~9 ^$ Z; ? if lan=1 then( _+ n/ M& P( d
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ s) e. B: D; h& i$ V s& x
to_str("in der Andockstation: \"",?.~.name,"\""));+ R$ L7 U( |1 D# e- ]
else# P4 G3 x4 |) G% w0 k1 ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# i6 E+ {3 ?& N1 N
to_str("in docking station: \"",?.~.name,"\""));
6 e: j/ c( h/ x4 Q9 K! a1 V4 S1 h end;
& R% C/ s5 B2 y4 v' g" e+ O else2 D1 r& x: i; w+ z+ P! x% }. v
@.Destination := assignLObj[1,row];8 D9 H R- j6 p3 q, _6 J8 ^* Q( Z
end;
" R. D! m, @' ` newDirection(@);0 G( g, V! y* @1 ^
@.HasOrder := true;0 X) e9 q: O! J
end;
; ^/ ~1 y3 _8 _& c end;0 V4 Y. ^' z+ t
end; -- of the method/ c) a1 K% g" \) ?# [9 t
|