/* called by: entrance ctrl of the object 'track'
2 a% V1 k) C) u" s5 \; a*/5 h. e& P9 o$ A* ?$ h1 p- H
is
1 r3 ^- T, w% P9 F part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, u5 [+ Q6 s0 B* f5 Edo
" F/ f1 W6 h8 T6 b% h7 z/ f Lan := rootfolder.Internal.Tools.AOLlanguage;4 J0 x: X2 Z! J0 B8 P2 f
if current = @.Destination -- else return- M" Y& I- T: |7 J
then
' K, g' `" Y3 Q; Q0 b4 B5 T, w6 | @.Destination := void;7 {! e1 o# x; A/ ~! x1 {
if @.occupied then8 B! t, n5 B# D% \. o: K
part := @.cont;
& ]9 c- |" e# y8 g, d @.transpOrder := void;; t# ?( F, X) O# {- r: G/ P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. \1 ^9 T* ~& f- v. v9 u @,root.eventcontroller.simTime);1 g2 p8 c) k/ v( s: W* @
@.HasOrder := false;
# d# \* S" \+ h4 x& a! X% @ @.DrivingHome := true;
, ]) T# C E0 e" @$ U- ^9 v1 H rgManager.tryToStartTransOrder;
4 @6 ^9 X+ v ~* f6 B if @.Destination = void
; k8 a6 J% M- t3 Q5 p& Z then -- no transport order for vehicle @ O# E- z% m# J7 g% x$ v5 b
@.Destination :=+ ?5 _) r4 h3 c+ Y \
rgManager.nearestFreeStation(@,track.~);
4 L, n( n, d! k9 q- g A newDirection(@); ~# o: {" `4 X4 q0 q! D7 y
if @.Destination /= void then
5 W( o; s! S) i; p8 O @.Destination.NumReservation :=" P& k- }! {$ p% |% n
@.Destination.NumReservation + 1;# \: Y S* A& K: H. _" q7 b
end;
- J9 Y U, I3 N: j' T. b @.CurrIcon := "drivingHome";
0 Y4 B: ?" u" K: @: w @.DrivingHome := true;' W1 Z4 M3 i% @+ c! V. `
end;
! K) k/ e9 O5 b" ~' I- p else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) [; s/ S* N' z4 Y6 d part := @.transpOrder;: Q8 ?+ p! \& [ g$ U* H, g$ ^
part.move(@);-- load part% i' K1 X( V3 e* Y- h: j
@.CurrIcon := "load";# V3 w" b: y a( W
GlobalDistObj := part.globDestination;: C) Z* q8 E& p9 |( u8 ?
assignLObj := rgmanager.rgAssignL;
: u% _- d/ g/ x+ {& P row := assignLObj.getRowNo(GlobalDistObj);, N7 g0 b3 B. k) q3 g& S# {- J
if Row = -1 then -- since 70
% N5 w6 o0 X- M if lan=1 then
$ J9 u# r. c; x- J0 h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ b! Q! [$ M/ E
to_str("in der Andockstation: \"",?.~.name,"\""));9 {) G1 h" T! U. J2 }3 E! l B$ C
else
8 M6 n1 Z( K1 g+ _2 O6 g0 e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 w0 A$ }6 ?. R8 q5 {& ~1 O8 C to_str("in docking station: \"",?.~.name,"\"")); 6 N7 W& L3 R8 o5 W
end;
& U& p5 S9 ^- {* Y else. F; X7 D4 w2 M
@.Destination := assignLObj[1,row];
- q9 r, t* |, \ end; ) r D1 e0 r2 [6 i8 p
newDirection(@);% O1 ]3 g0 ~7 x# P3 M
@.HasOrder := true;8 }; b- G% P2 s
end;; m4 k" K* L1 X8 S9 Y7 ?. g- t
end;
& ?; T' e. [5 C. xend; -- of the method
+ u- y& R; l8 @) f) | |