/* called by: entrance ctrl of the object 'track'% ]0 M/ [8 I. l9 i
*/, v3 b0 G, l3 J. S; `9 B1 z7 }
is
6 X- {( d6 f- S. |: S part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 g6 ?) i- i' L9 z2 _' Z0 q
do
" l: p C/ F% c' N Lan := rootfolder.Internal.Tools.AOLlanguage;/ C& H# ]/ t* K5 G; b4 {4 |
if current = @.Destination -- else return% f3 @7 i. |% V6 S9 D. t0 x, f- _9 w
then) Z1 ~2 J" l$ K3 v( x& @6 C% Q+ K
@.Destination := void;
' K: f- v2 b; Z% p if @.occupied then; ~* g/ X+ t" a0 M, X1 d
part := @.cont;) y. P1 R3 p+ [! ^: _
@.transpOrder := void;
5 V6 c3 S3 O( T& B" e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 O0 J) d6 `/ s5 ^, O; S% G% {
@,root.eventcontroller.simTime);- f+ n# e" Y4 U e' Z; Z# r# s5 T
@.HasOrder := false;
4 V# o4 S# P) G9 D% ] @.DrivingHome := true;
4 d% d. j2 ]8 J& k+ B. M0 o' b) n rgManager.tryToStartTransOrder;. b; ~7 t: j3 D
if @.Destination = void4 r( a# c$ \6 t- K1 l }
then -- no transport order for vehicle @
# ?; Y+ r2 j! x- i" a0 M4 W @.Destination :=
' I4 z; s: K l9 ~' H8 ` rgManager.nearestFreeStation(@,track.~);$ k! T) N7 m, R6 z
newDirection(@); 3 [- R# X2 ?* T; ~; a7 H, x8 [
if @.Destination /= void then& j, u$ |* ~1 d
@.Destination.NumReservation :=
, l( i; x9 I5 i9 Z @.Destination.NumReservation + 1;7 d5 k2 k; u! P6 B6 d7 l/ b
end;
' q1 G& Z8 L2 `0 _: s @.CurrIcon := "drivingHome";
0 x' h6 L+ @/ W6 t @.DrivingHome := true;- m$ H0 N3 Y1 R( u7 f
end;: B O" d7 ` |- n: ^
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 m- k! t( T- d( t: ~ part := @.transpOrder;8 M7 K8 l" c. ^7 M( }6 ]; A* h
part.move(@);-- load part3 L) K& V/ _# L
@.CurrIcon := "load";
% W, k! e( G8 I' b GlobalDistObj := part.globDestination;9 K6 H4 J' x; y5 _% | [7 ?
assignLObj := rgmanager.rgAssignL;
# A0 Q! c+ u# p row := assignLObj.getRowNo(GlobalDistObj);! m. U4 F- Z' d9 o: F% S& \: |, o
if Row = -1 then -- since 70
: N. }% M! T- l if lan=1 then
: s6 T+ C) c% c1 r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
Z6 S6 p* P+ Z, |% a4 y to_str("in der Andockstation: \"",?.~.name,"\""));/ s* P) B! P2 f$ v( }9 k) a
else% |, H7 R7 ?6 ~0 \7 f7 J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 T) o7 [) K, h* v7 P; T4 x to_str("in docking station: \"",?.~.name,"\""));
* |4 n7 Z' M& [- M end;
3 d1 y% @9 i+ ^8 z: r+ Y3 W else
: K" l' c( s5 }1 p* E% t1 U @.Destination := assignLObj[1,row];9 h4 L5 b* \* Y6 n8 D, c
end; / J6 A; B. c6 s: o! {9 z
newDirection(@);
# A: p2 _' t: q1 H @.HasOrder := true;9 w; L1 Y" S" G% U
end;$ V! y8 p+ s" Z1 T
end;
1 S, Y! L, D; @9 W* r/ v+ zend; -- of the method7 p e- ~! \# ~1 N9 ^
|