/* called by: entrance ctrl of the object 'track'
: a8 l5 g/ R1 _' I" C*/
8 m+ G+ |+ ^9 f0 T8 p g" Z! Nis
; ~& x7 g9 `" `; m& A part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ q7 y3 [/ P& z& \( f1 O1 Q# |' Ndo& f8 h$ Z1 a# s* C& g# I
Lan := rootfolder.Internal.Tools.AOLlanguage;2 L8 x- M7 @4 y2 M! q0 W$ y! `
if current = @.Destination -- else return
7 C1 i8 v! R- {! o then- M* P! j- B) ^ K0 ]* h
@.Destination := void;! ^: U5 ?9 }8 D0 e
if @.occupied then& \) S7 S" n& H! `9 j) ?' ~, O
part := @.cont;; ^& j b& m( N; g. S+ M
@.transpOrder := void;, I: b& u, o, [# d% a% O
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ r) F p" c* L
@,root.eventcontroller.simTime);' w t* L3 W: C+ A! @: N
@.HasOrder := false;# s& k. r; G0 P% T
@.DrivingHome := true;
9 d( d$ I6 l9 U4 y7 ?9 c1 J, E& B- S rgManager.tryToStartTransOrder;
4 G/ Z6 }3 `+ `" m if @.Destination = void
/ r" ]6 x! [. w! B1 Z2 G then -- no transport order for vehicle @5 s. C( I e4 s& b/ l+ R! a* U
@.Destination :=
9 p, p" {7 W* k1 r( U8 h" J& b7 r rgManager.nearestFreeStation(@,track.~);+ Z9 _6 ^, w' G' V) V; N' [1 w6 [
newDirection(@);
( N& D) N' k* e& f, T4 s: h if @.Destination /= void then) i+ k5 N6 }/ S
@.Destination.NumReservation :=
" c) X0 @' y' P3 P$ H ~5 o @.Destination.NumReservation + 1;
$ ]% v7 O" C# b% m+ M: Y end;
9 `" K: Y$ |4 g! u @.CurrIcon := "drivingHome";. x, G, k" [. l
@.DrivingHome := true;" B7 `0 E4 x4 r. T
end;% R5 w" J* E9 W% U5 r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# h, b6 G5 O9 S, J5 T part := @.transpOrder;
- X7 d7 v% x5 D( C part.move(@);-- load part& W* w; h9 S( U! Y6 i& _. _2 L# s
@.CurrIcon := "load";% v ~2 `& F, B2 x1 ^" P5 y- i
GlobalDistObj := part.globDestination;6 i! M+ E- m8 r0 \) i4 D
assignLObj := rgmanager.rgAssignL;, Z% x6 P& Y+ L, f+ t' J1 I7 @0 p
row := assignLObj.getRowNo(GlobalDistObj);
' x* L- p# m) x5 @ if Row = -1 then -- since 70+ i: Z5 @# b! G$ p
if lan=1 then. i" Y) x" n% Y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# }1 Y* w& @2 D" e2 u
to_str("in der Andockstation: \"",?.~.name,"\""));
( Z. D0 r, j- `6 l5 ?" g U else
" W, U: L. N8 ]. [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 v; s: A2 m( d6 C* e3 B5 ~1 _
to_str("in docking station: \"",?.~.name,"\""));
9 `; P7 w' B9 H0 h end;* W$ w2 Q m5 f& y, ]; P( }0 X
else- c1 x7 w, r3 a' h& m0 D! A2 q" p6 x
@.Destination := assignLObj[1,row];1 N5 `- A7 g9 R
end; ! U2 t9 s! [, a' ^
newDirection(@);5 Y6 V* {) x# z Q k3 F$ `
@.HasOrder := true;
8 K9 P1 U/ T8 G3 p8 Q, P! a end;
, B* r7 r }/ F1 ~' C p end;
2 l! s* f4 R4 ?; Gend; -- of the method
- Q, X6 |4 L0 u3 c, e3 ^ |