/* called by: entrance ctrl of the object 'track'
8 D0 [! D$ Q. Z4 ~/ S! V2 X*/: W) L5 n2 Y3 {
is' R5 \/ u) w; @& ?0 @. I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 Y, p/ E5 z; s7 p# p, ]* a& ^do
, T" D5 I u3 `. { Lan := rootfolder.Internal.Tools.AOLlanguage;, c" Y* y+ P1 T A3 B
if current = @.Destination -- else return! R: ^$ h. j; G) \8 N# g; r) y. O
then
# H4 |. e7 k- f5 i7 ?( [% Q& P, z @.Destination := void;
* U& L" O- x8 r: ~: r7 o6 O8 } if @.occupied then0 o& x; c, i& S+ E- X. M5 L( I
part := @.cont;2 ]! }: s* \- m' p4 J4 @
@.transpOrder := void;+ F* U# w4 Q- ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 I: e! ?: D2 g+ N ~4 U) ?) Z
@,root.eventcontroller.simTime);
9 R) O& ]- o8 I @.HasOrder := false;
: _9 v& [6 n& O& c( _, T @.DrivingHome := true;
2 ~8 U2 V. g6 `8 I: ^! z0 { rgManager.tryToStartTransOrder;( \; u! A) r5 J7 t* k* ?
if @.Destination = void
) |8 m5 z6 G4 Y( p- o1 p then -- no transport order for vehicle @' T" _ y/ k; ]: b9 o2 x7 ]
@.Destination :=+ q0 K. S/ _3 K4 M% E6 ]5 y
rgManager.nearestFreeStation(@,track.~);
6 T; I e4 X# ], d8 F4 U newDirection(@); ; ]) z) p1 F# H$ ^
if @.Destination /= void then* e- o( O, b3 v9 T; L6 w
@.Destination.NumReservation :=7 p9 l; }2 {+ a5 o0 B2 ^
@.Destination.NumReservation + 1;
& g. T. A0 M4 D$ y7 A8 g/ b9 n end;
+ @/ o B7 b- ?0 a @.CurrIcon := "drivingHome";# a# j2 i7 ^" O# {
@.DrivingHome := true;
/ I Z5 U" K! Y$ s! n! q end;
+ c- @$ E; S- V( {3 y. }# N else -- the vehicle @ is empty, both vehicle and part are in the same dock station# l0 C3 t. h, b9 G
part := @.transpOrder;
; L! D- r- a9 K6 T+ G part.move(@);-- load part! [4 F; o* F/ R2 v3 G `2 |- ^
@.CurrIcon := "load";
* L [# o) k# f$ A0 R GlobalDistObj := part.globDestination;
# f; C1 V1 T# a5 c1 n- ? assignLObj := rgmanager.rgAssignL;, z$ b( x% o0 ~3 d
row := assignLObj.getRowNo(GlobalDistObj);
, H8 ~/ ?- |/ y/ A' I5 C; G0 S if Row = -1 then -- since 704 O6 `0 X C- S/ _5 N2 h8 b
if lan=1 then
% e9 \ l: k+ N; H1 A- W; P1 q& K6 g2 ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% [" W' j$ m% e1 ^ b to_str("in der Andockstation: \"",?.~.name,"\""));6 t, Z: n$ u, T0 I
else2 u( k$ l2 d0 {& W% d7 B: W! x7 `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ ]. q- ?# z) L. P/ J
to_str("in docking station: \"",?.~.name,"\""));
& a0 h3 ~" Q: G, E# B end;
6 \1 W* q5 S( L/ k else% G# B4 I! j& |+ [- s" p W' E
@.Destination := assignLObj[1,row];$ o4 m; k) _' h! R0 U0 w
end; 0 O- Y p. Y$ K9 h
newDirection(@);
+ ?) q4 O9 A' S @.HasOrder := true;
w9 W/ r3 s( Y; G: M, p: k' y end;
. O7 L* t2 {3 S) O# ? end;
& P* H, M; U7 N! s7 Lend; -- of the method
" b" J2 v4 ~; z8 R4 f- d& O' S |