/* called by: entrance ctrl of the object 'track'# @, z+ {, p, H6 b, w/ h
*/8 g& X- \( e; ^# `* D6 S" r
is
. o3 R: q+ h& p; t; e; p% r; K% d part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 ^* u1 w( Q7 B6 S9 t7 ado( O& p, s3 o7 E* F) N
Lan := rootfolder.Internal.Tools.AOLlanguage;
( t! p* F; i$ s4 W: g% h if current = @.Destination -- else return9 S4 L$ y4 B: k+ Z3 r+ b
then( Q) y5 E: p/ E3 u1 c9 f
@.Destination := void;' s% W+ f; B; h# _- C4 t$ V0 x
if @.occupied then
! u2 K8 L+ n3 ]) x part := @.cont;
% ?) ]+ V# |1 O9 a @.transpOrder := void;0 L- p$ Z+ s' b0 }* s9 I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! U7 T3 u- T. [: e) ]& m7 `8 Z
@,root.eventcontroller.simTime);
, J) e! x3 e6 A- B @.HasOrder := false;7 _) Y: Y& X2 P
@.DrivingHome := true;( t$ Q* u" n6 E* ?
rgManager.tryToStartTransOrder;
1 i6 X# ]" [+ S& [4 X if @.Destination = void
* }; G8 e- x( }4 G" V1 q9 H. T then -- no transport order for vehicle @
5 b8 U! R9 K9 W4 |, J7 r @.Destination :=( Z# C* T& d8 h! Q/ s& f! j: o5 ?
rgManager.nearestFreeStation(@,track.~);6 D7 f% s8 O* l. k# y' x* @/ U T# J
newDirection(@); $ D) B1 `* ?, P) ?. I
if @.Destination /= void then
+ v* D: p7 w6 N; b K, I/ d @.Destination.NumReservation :=: H! L& u c5 G0 R# [0 L- b
@.Destination.NumReservation + 1;
2 Z( F+ J, q% q, J C end;6 V2 A5 U U, C
@.CurrIcon := "drivingHome";+ s) J% G; j0 `# J1 y' j& x
@.DrivingHome := true;. h) U8 A: m: x& j: p
end;. N9 k9 M% l3 F4 i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; g v1 @, P4 b/ s9 Y/ O part := @.transpOrder;
. \ @6 U# ?: L6 k! _, v part.move(@);-- load part
5 L7 U# x* u1 j9 h& e8 y" t+ l @.CurrIcon := "load";
6 X' W4 D- X0 P# y6 B GlobalDistObj := part.globDestination;. E' M) s; p3 o2 i. X
assignLObj := rgmanager.rgAssignL;8 G+ F0 k+ y% B. y* v& M4 T
row := assignLObj.getRowNo(GlobalDistObj);! Y, p! w/ \8 u
if Row = -1 then -- since 70) g6 B+ R. O4 _+ _
if lan=1 then
1 }4 M% _! V$ O% L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ _! v0 ^+ [0 r; Z to_str("in der Andockstation: \"",?.~.name,"\""));
w1 a9 S- t: l, z( x! m else
; @9 D/ Y1 |# P3 Z6 C promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* x0 G! }' L" V; o6 g& x to_str("in docking station: \"",?.~.name,"\"")); 2 H8 c* x3 q5 Q0 t3 m
end;
! A9 ] Z8 P$ Q, k+ \4 D1 d else: s( f4 i' `' O8 \% U
@.Destination := assignLObj[1,row];9 s, u- q& Z9 c: |
end; , z: y- u) I" x3 o+ j: i
newDirection(@);
% ?1 \2 ?/ k# Q5 C- ~; p @.HasOrder := true;
0 @: D' Q, c* z1 G- J/ k end;2 B$ o$ R% o( y5 C v! t
end;
- F' c& w9 c) a7 l' Z) I% Kend; -- of the method
6 a5 M' O, L* q$ p# Y! P- o; N |