/* called by: entrance ctrl of the object 'track'
; S0 ?9 `7 `7 K: j$ L*/
4 H* [4 Q7 I+ `! ]- P# tis) Z* x& [: V; z1 \' Y6 y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 D1 I; K$ Q; F+ d" d7 Q9 y
do0 }( P4 q5 `% z; J1 {- l7 o2 x3 Z
Lan := rootfolder.Internal.Tools.AOLlanguage;) @/ B$ v. }% @1 d
if current = @.Destination -- else return
* `) L5 L* f. W4 T% z2 F then
) P5 |/ n# F; v# l( f0 k @.Destination := void;6 e5 V( j0 a% [ o
if @.occupied then
4 b7 x/ V) ]7 B2 m+ P8 n part := @.cont;" \2 r% W, }& i3 e
@.transpOrder := void;3 q( w( @1 g+ H- T. }' ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* l& S H# s' }% ^; b6 `: m
@,root.eventcontroller.simTime);+ y& c/ O0 \3 S) A' M6 [
@.HasOrder := false;
: V7 _7 R3 s( Z2 `2 e* o @.DrivingHome := true;
; B; I0 T' o" k" {2 g1 ?9 h rgManager.tryToStartTransOrder;
z X9 a) Y0 ^+ d9 S if @.Destination = void- i5 `8 g' [) s2 C0 R0 l5 Q
then -- no transport order for vehicle @9 Z% M) k3 M2 s- _+ `$ r
@.Destination :=% p7 R4 K7 ^. r! W. M9 G
rgManager.nearestFreeStation(@,track.~);- P8 R% h9 O2 }
newDirection(@); 9 p' B* c/ m7 V- H( S
if @.Destination /= void then
- l( C! r, t4 m$ W8 ~ @.Destination.NumReservation :=
# ]! T. T$ v7 K V* _8 U5 B- L @.Destination.NumReservation + 1;
% a. @2 s8 ?5 |: \1 | end;
& i1 s* B& b9 u* K" O) P8 ?! l* \ @.CurrIcon := "drivingHome";5 U! N1 M, W Q* A5 j
@.DrivingHome := true;- {, m" K1 d2 O- E
end;
' i( e& r1 x% G else -- the vehicle @ is empty, both vehicle and part are in the same dock station* r: o: o c) r
part := @.transpOrder;
# ]- n6 S' n* G! ? part.move(@);-- load part3 w1 n7 n5 g# Z
@.CurrIcon := "load";$ @1 z& p" F9 D. W5 t( O
GlobalDistObj := part.globDestination;$ {5 ]6 {! a4 ]7 d
assignLObj := rgmanager.rgAssignL;5 Y+ e. z$ h* p8 J2 h
row := assignLObj.getRowNo(GlobalDistObj);
5 V0 y1 I/ \! [, N8 _+ c2 Y% Y if Row = -1 then -- since 70+ g1 _% _! j- ]$ R- r6 I% @
if lan=1 then
: O2 U& p; t. A0 p" q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 X- U* [0 a/ J7 c0 S to_str("in der Andockstation: \"",?.~.name,"\""));: R% M* |7 Q% ?& f& ~
else
6 Y' E1 N% P- h' i# I" L* ]9 ~* f promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 ^* a) Q5 L$ V$ ]( U
to_str("in docking station: \"",?.~.name,"\""));
/ S+ P# ~4 K9 l7 l) w end;
8 ?- w4 Z% G2 s0 Y else' ? [% @0 {; l! \8 R/ K3 e7 p
@.Destination := assignLObj[1,row];+ `4 M) s. V1 J7 l9 t+ U M
end; + T( Z3 X7 }* {. Q& p$ v! ^0 ^' J
newDirection(@);% k: M, F* A+ R2 x2 _9 [* P
@.HasOrder := true;
; g! o' V' J1 A0 n" W; j end;( t: @6 s9 m! G6 N4 ], K$ U
end;2 c; a4 e* v7 [. P5 ]
end; -- of the method
4 F0 ^3 _0 n7 M3 R/ W* n' f |