/* called by: entrance ctrl of the object 'track'
' m7 J3 d" z4 }4 A- y/ o( ~*/7 f4 _6 g! w" t2 b/ Q
is
. P! O' p! G) t" f part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 }, I! U! T" z* v1 tdo: a8 n% S* g1 F/ R3 h( R# l4 y
Lan := rootfolder.Internal.Tools.AOLlanguage;. {; w, [% `: Q
if current = @.Destination -- else return
4 y# `: @" ?8 ?* a5 M4 H then' E, |: g; r5 a8 b; Z
@.Destination := void;" S& |5 f! G/ K/ H3 d9 n
if @.occupied then- V" e. T4 D* p
part := @.cont;2 J3 A6 R, P; V
@.transpOrder := void;/ i# n9 s, q q' T, Z2 o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" m1 [" v. K+ v @,root.eventcontroller.simTime);
t% r1 k- o1 \" g8 r) U @.HasOrder := false;
. r4 L% b8 |3 i9 h9 A @.DrivingHome := true;
. O; n9 k$ ~( O) M rgManager.tryToStartTransOrder;) f7 b. u! v3 T& P
if @.Destination = void
" C; p) `5 w& S& w& }' ^) S4 O then -- no transport order for vehicle @ k9 @+ Y' c5 G% W! I' z" ^1 M8 e
@.Destination :=4 i7 y% M5 k6 n" X5 Z# a0 _
rgManager.nearestFreeStation(@,track.~);
; A; v* U. @; c/ s newDirection(@); . U( z, E( v9 E
if @.Destination /= void then0 S( {7 H4 x& T' o% ]0 {- w5 k
@.Destination.NumReservation :=
) A7 }' P4 P/ o% H @.Destination.NumReservation + 1;
U% w D+ _: O6 v- p end;
$ n, ~1 e4 l7 r3 V7 k) B @.CurrIcon := "drivingHome";
8 H. C, A9 I/ \/ _% T. t @.DrivingHome := true;' a& A6 u! l5 B$ g# }. @" ?
end;: e( ]5 B. K5 ~! Z `8 l& P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& V0 L! T* g( ?) j/ {
part := @.transpOrder;
8 r2 u" o, ~: q7 X3 H. t& f+ d: P part.move(@);-- load part
) y: z) b$ u9 ~ ^1 N* @0 _5 c @.CurrIcon := "load";
9 T" d0 M1 {% F GlobalDistObj := part.globDestination;: l1 {8 |; }; p% b0 m$ C7 f
assignLObj := rgmanager.rgAssignL;
, H( Y8 b$ W! k4 }$ Q0 |8 B row := assignLObj.getRowNo(GlobalDistObj);
- y- r* p0 Y1 z) L1 f if Row = -1 then -- since 70
! D, M" A8 Y# v1 k if lan=1 then
7 b9 H: a7 C S promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 e9 q4 a8 C( c1 V* r4 O+ {
to_str("in der Andockstation: \"",?.~.name,"\""));
) X# w7 x; g7 b6 h else
+ N4 N+ o* d1 H% H4 h, T5 R promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, V" v6 o$ |! l4 s# P' p7 v to_str("in docking station: \"",?.~.name,"\"")); , v( l* h( u9 [- b8 _$ b7 v; a
end;
1 i. Q, @7 L" G9 r& O. S! Z else* C- x0 j$ \. C( x5 }6 [% P* D- _+ n& [
@.Destination := assignLObj[1,row];
& Y* Q, Q) t7 \0 X' f9 i0 j$ p' y: \ end; 2 [" M) v) k2 t T2 G: M+ X
newDirection(@);
: R6 h @: T+ j& G% Q) f @.HasOrder := true;
3 y; a% e; |* Q- b4 K end;' v/ b( c9 } V; T: a
end;9 S. @. D; o" T
end; -- of the method7 Q+ C; g) U. r3 x) |$ n* k o& X
|