/* called by: entrance ctrl of the object 'track'
6 a& u% L& S' X, H*/, C @+ G1 A& Y
is" a) \9 i7 u R1 ^& u: U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, E* x9 T* H- x9 n3 b3 [7 v! {# t
do
5 h& k9 B! O: y2 N6 o1 g. c2 w Lan := rootfolder.Internal.Tools.AOLlanguage;+ k% c1 m4 x- p6 R `
if current = @.Destination -- else return
2 C3 Z2 c0 Z- `% a4 A) v' g: g then
, D+ O% O* u# L) q3 F& W7 G R. J @.Destination := void;- Y0 j/ Y( j" W5 V* M9 K
if @.occupied then3 S( c3 L) ~5 o9 m5 @) c
part := @.cont;1 M7 V: |6 @! _4 N2 N
@.transpOrder := void;8 _! I' ~3 r0 f4 o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 a' P N. q8 A! X0 M! q @,root.eventcontroller.simTime);; v9 E l# m W: V; N
@.HasOrder := false;
6 m+ S( c7 A2 l6 W5 q @.DrivingHome := true;% N9 ~* {; y, ~ ]
rgManager.tryToStartTransOrder;
- ^: ~, X; k i8 K0 w if @.Destination = void
. x! x: k x/ U" N then -- no transport order for vehicle @. }' f/ @4 [# f1 ^& r& l3 @
@.Destination :=) x4 Y( [1 A1 u6 L
rgManager.nearestFreeStation(@,track.~);4 N6 O" w+ v+ x0 o% h
newDirection(@);
3 z, E; E# I6 T if @.Destination /= void then7 F, k- d% k3 J4 A! }* C/ I
@.Destination.NumReservation :=
* Q- |$ D1 k. H/ ` @.Destination.NumReservation + 1;
* T2 }( f5 n% K1 t end;
; s( N6 e% d3 H0 a! i! Y7 w @.CurrIcon := "drivingHome";1 }5 n# b$ V+ Z |" F6 [5 o
@.DrivingHome := true;
$ n" H% s) S9 W end;- i5 z9 y/ I1 p2 b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" ^$ a8 E8 B* F' a& `& E
part := @.transpOrder;, c$ W- s3 ]% n$ X# t' N2 o
part.move(@);-- load part2 A+ X8 g" B- F) q* ?; [7 {- y
@.CurrIcon := "load";
1 O* Z( q7 b+ m& K( H7 ? GlobalDistObj := part.globDestination;
- B3 B% ?/ _4 C- ~# I2 R1 a: Z assignLObj := rgmanager.rgAssignL;
; }+ E# g9 U% e row := assignLObj.getRowNo(GlobalDistObj);
+ K! ^/ J. s6 n) H if Row = -1 then -- since 70+ s: x" h* h/ {9 @9 Y9 M
if lan=1 then! u6 g9 h) l2 G: j0 C1 @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 V8 c5 w9 P. U3 C) L to_str("in der Andockstation: \"",?.~.name,"\""));8 d2 F5 Z* N* O3 A" E B |1 I
else
) b+ F1 Z ]/ p! ?; I3 t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 |1 ^ Q+ L# s3 V8 o to_str("in docking station: \"",?.~.name,"\"")); 1 Z: Y2 L4 ]5 W* J3 d9 ~- [8 @
end;# ?, w6 H1 K. n; p4 \4 W! ^
else
: J6 ], y0 M6 x5 s {4 n& q @.Destination := assignLObj[1,row];
" O; B: C( _ y7 ^4 O end; 8 R8 X& A- ?3 p3 b- N% X: B2 T5 o
newDirection(@);( r/ j" E& \6 [2 S4 s- H
@.HasOrder := true;; i- ~$ ]3 ~, T! y
end;
9 T6 @( [0 K& y6 W, w! W end;- p3 L; }9 j5 c5 g& o
end; -- of the method
8 i; I+ u' F( R |