/* called by: entrance ctrl of the object 'track'
s! v' c% G# g8 D+ V5 T*/
Q; K- U6 }$ B4 F* M& }7 Y* b' m/ g% s1 Ois
# Q6 V) A9 ~( c$ \4 b part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 \- o! w9 q4 O+ r2 A4 tdo$ B5 ?) s. T2 o* ?$ [) B4 b
Lan := rootfolder.Internal.Tools.AOLlanguage;' I( ?1 j% r" k' u" w6 I
if current = @.Destination -- else return
- [% V7 Z; C: P8 ~/ s then
y3 J" X) o5 t6 t6 m: N @.Destination := void;. K1 @% g0 k5 O4 d: O
if @.occupied then ]! t# F4 W1 k- x
part := @.cont;; _. K. _9 Z: ?# d0 {
@.transpOrder := void;
9 e. c5 A+ g0 W* \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 M1 x- n* v1 y- ~; B$ G4 @- k4 X @,root.eventcontroller.simTime); f6 l2 g9 b% ^5 Y! W8 _: o
@.HasOrder := false;
* _. h" ^) q% A& I7 O$ C @.DrivingHome := true;8 ?7 P0 V3 ~8 C
rgManager.tryToStartTransOrder;
( ^- C. \( \! C p, ?) c if @.Destination = void
% O. ~. L. C' J then -- no transport order for vehicle @3 H5 s' v2 \* k [+ m$ `1 u
@.Destination :=! H* f; W& U9 c' u" V; z
rgManager.nearestFreeStation(@,track.~);
d! o" h$ d1 g& A newDirection(@); % D1 k; v8 w3 ?# w8 u/ s6 [
if @.Destination /= void then3 X3 Z0 P3 j! M" A$ k
@.Destination.NumReservation :=$ M/ b: ` r ]9 I5 U8 u/ `
@.Destination.NumReservation + 1;
, L+ c5 R) {& F. c& d end;
9 r* z$ E! N& F7 [4 f; E: } @.CurrIcon := "drivingHome";" I- `4 r0 N7 r& ?
@.DrivingHome := true;
- q4 A P0 H; a4 H: @5 b3 V end;
1 l b; p+ Y% y9 l) C! _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 E e6 v' H" j: c& J
part := @.transpOrder;
" b$ K) l0 {2 ]4 A! E3 h part.move(@);-- load part F8 S8 b# y* M, [3 Q! S! f6 x
@.CurrIcon := "load";0 t! S' u/ S# f5 ]9 f: I+ [
GlobalDistObj := part.globDestination;
' x4 T* u$ i* ]# g# U7 d; x assignLObj := rgmanager.rgAssignL;, a2 R% w& B& F1 b* r/ t+ u
row := assignLObj.getRowNo(GlobalDistObj);* u4 R$ a" Z# @6 H) V6 b
if Row = -1 then -- since 70 j7 T u- y: W+ v! ^- l3 s- S
if lan=1 then2 Y; m( K& F2 G
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 l; v5 M8 Y7 ~! F d
to_str("in der Andockstation: \"",?.~.name,"\""));9 c+ D+ v1 K: Z" t3 }
else# T% c! _9 l, v/ w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* p% v i) Q; y to_str("in docking station: \"",?.~.name,"\""));
+ K3 M) z' D/ e end;$ p& N3 R9 K* [+ I$ c7 W
else
. `! x3 l0 D. {1 n: S. m7 x @.Destination := assignLObj[1,row];' b. @& G v, V' s
end; 4 ]5 {' S0 F+ O. h8 M
newDirection(@);/ {' m, x) s# h, N% J
@.HasOrder := true;
* c& p8 B/ {# b) _7 S7 z end;
0 J4 a9 ?" u6 k+ m end;" i, P- X( @. y6 P
end; -- of the method
6 l n3 B4 x9 q6 m5 Z% s" ]$ }5 @ |