/* called by: entrance ctrl of the object 'track'
+ g% s/ L! [# P" b) T; I*// k9 I! a% F z9 U$ f
is
6 [( ?, b& e G3 f& F2 L part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 b" T6 d( K' E# C: g+ jdo
- w) N/ Z( x3 C2 z X8 [+ { Lan := rootfolder.Internal.Tools.AOLlanguage;3 @6 ?* x# P, Q& V- F
if current = @.Destination -- else return
8 j1 X2 V9 e& N8 f( g7 ^$ l0 m7 L then
# k) s& K7 n. e' u0 b; r; Q @.Destination := void;7 @. H* K8 y" K2 l- n$ g
if @.occupied then
; E2 z6 R, x& d$ u" o/ e part := @.cont;
2 Q! N; |( |3 R$ l( {8 ` @.transpOrder := void;; k3 }( K' K% Q: B: x, K9 ~# i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: l9 i' f1 C* u0 @
@,root.eventcontroller.simTime);
. {+ }. v5 ?( |; p y) [ @.HasOrder := false;& E O# g, b/ A, u& o/ G( T
@.DrivingHome := true;
( W8 K9 Y: s) _" U& M) x6 H( c rgManager.tryToStartTransOrder;
% j) Q4 f, d* S0 {% e if @.Destination = void
]8 n* N0 q M7 h' ], ^$ |+ ~/ p; z then -- no transport order for vehicle @
1 O1 y3 j2 [, g; a) C0 r# W0 l @.Destination :=
, _2 ], Z# M8 ] rgManager.nearestFreeStation(@,track.~);# e0 V, h8 P7 R, y% w& V
newDirection(@); 2 P8 {7 k$ J/ q k6 a1 i0 n
if @.Destination /= void then2 p- A% a0 S5 ]% E
@.Destination.NumReservation :=
5 k& F% m" ~8 ]9 t" D0 _- W! C1 R @.Destination.NumReservation + 1;; a4 w( c. x' n( L3 F
end;
' R1 D! a- C% f, {+ i" ]( {8 i. s, M2 b2 v @.CurrIcon := "drivingHome";
% x+ i0 j5 V$ }5 q' A: X @.DrivingHome := true;; T' @' z) r1 A2 w5 b' |. R5 S
end;$ m3 U' B& c% d0 _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: U1 g( g! e- k9 d# s* l3 R2 W, K part := @.transpOrder;. `, T. v/ c: Z% i6 \
part.move(@);-- load part
6 b* L# O+ Z" U$ X. ] @.CurrIcon := "load"; Y" r8 s. S# N- V
GlobalDistObj := part.globDestination;6 c6 ^, ]/ N1 g
assignLObj := rgmanager.rgAssignL;
7 E& G9 {* _0 a& u% Y row := assignLObj.getRowNo(GlobalDistObj);
7 \) v0 R; ]7 w5 j if Row = -1 then -- since 707 a: q ?) q0 t% A5 R; O5 U' e
if lan=1 then
+ o# A" ^; ^- I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 S$ N( v1 n1 j% z% [% H6 g to_str("in der Andockstation: \"",?.~.name,"\""));
, w& g& S' I l. c8 }; n else: `, M5 g4 T% Y) j. H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% }: C$ B( y" Y to_str("in docking station: \"",?.~.name,"\"")); 4 y: N7 f( g( b2 C2 q2 q* E
end;
& J, n2 A. k% q8 ]( ~9 X# G else
. J4 s+ C, r" _: Z0 U# ^ @.Destination := assignLObj[1,row];. s! R+ o: S+ f, E; S
end; 0 _( L5 ?0 q7 z6 T1 b
newDirection(@);
0 A' i7 r3 O" z1 F# Q @.HasOrder := true;
+ Q' p2 g# i8 ]1 |' N! m, q& L end;5 j1 ^& m: a. J/ r [* d
end;" ^0 Y/ z) T+ L& Z/ @3 p O# @
end; -- of the method
& K0 m+ |7 Z+ D6 D7 e5 d) V |