/* called by: entrance ctrl of the object 'track'$ X0 O4 H. T. h: m, C' h8 I
*/4 \' U8 T* p* J3 i! e' K0 w
is8 I8 K: L: D0 `7 m" w, {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) d$ Q# e6 n( N; W% w+ G& [: Rdo
6 l, _/ a! ` R0 v& s: A4 l Lan := rootfolder.Internal.Tools.AOLlanguage;
$ m" v9 W6 Z7 r( ^ if current = @.Destination -- else return
* o2 X% G, s$ d4 F: q then
1 |' v0 x0 D$ }* \ @.Destination := void;
8 J" k3 W+ m4 b5 q0 U+ N0 P. O if @.occupied then: v1 v$ c: q/ Y) q4 v4 X
part := @.cont;3 F! D% {# M* y8 `9 R. O/ o2 K
@.transpOrder := void;
( a; x" L. X+ v/ q9 b0 j7 \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. K( G3 T5 I9 E+ F @,root.eventcontroller.simTime);
% O& x4 O) y/ ?& ^. ^* x c @.HasOrder := false;
0 k7 \4 m0 P$ v, a; C3 U7 D @.DrivingHome := true;
* u, _ M2 m2 l3 S. ] rgManager.tryToStartTransOrder;
+ d8 j) y) z( F if @.Destination = void
& A! v# @" C0 ]$ @) f% o then -- no transport order for vehicle @
. \, o" R* E7 Y' r1 a @.Destination :=3 e6 F$ f6 r4 d8 t/ ]# \. v# D3 D: D
rgManager.nearestFreeStation(@,track.~);
) ]% {1 V7 j+ c newDirection(@); 5 o7 l# M* N2 K0 F3 L
if @.Destination /= void then& Z( W) v1 h0 E2 X% M
@.Destination.NumReservation :=
) e. s; T8 j* u8 T$ _4 Q @.Destination.NumReservation + 1;, ^' A# Z9 m6 _5 i8 f, M$ `
end;/ f$ R- P1 G `7 a
@.CurrIcon := "drivingHome";
( ]: [; u5 [) \7 {4 P" ^6 t1 | @.DrivingHome := true;
1 W/ O" a) x' h7 c9 T8 B* v end;
6 C: e, {8 F0 _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* ?9 |8 s! P; {( I! J8 Z part := @.transpOrder;
+ D* b8 y" ]3 G part.move(@);-- load part% n: O3 p0 O! @# Y: }
@.CurrIcon := "load";& S) H. X) N2 \) M' c
GlobalDistObj := part.globDestination;# P( V F) G8 `: J
assignLObj := rgmanager.rgAssignL;
9 j G% f7 t. S5 ~, \% _; z* q row := assignLObj.getRowNo(GlobalDistObj);
3 Q+ [0 d' n8 ~: J2 ?+ m4 ~ if Row = -1 then -- since 70' \, s+ R( y6 i. D+ c
if lan=1 then
0 W6 n+ A; ]3 [2 i' L" b p1 J promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 f# g' _5 S6 T+ d to_str("in der Andockstation: \"",?.~.name,"\""));
: J- |' h- K+ K4 \( u( K- I) K else+ u! {! ~( K! I0 M$ k f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 G( b& h# A0 u* u; ~' n! g9 P8 L to_str("in docking station: \"",?.~.name,"\""));
" ]4 F1 Y- A7 v* w1 J0 Y end;
5 [2 n0 F" i: L3 u0 g! e else' C4 H# @7 K' V1 ]- o
@.Destination := assignLObj[1,row];
6 ?$ h5 Y/ G7 m end;
+ b; B" y& O) I newDirection(@);
. ]. g: L n1 H% Z @.HasOrder := true;
' r. E0 P8 z1 m1 q4 C5 n end;$ _% C$ ?& s5 H+ m! v+ }
end;
! S5 E- `: [' Y- tend; -- of the method. b* A9 r ?8 H% @/ ~
|