/* called by: entrance ctrl of the object 'track'
, r6 q. q7 ~% m/ U9 k; `3 v @2 [*/6 r8 t$ c7 z# Z N4 f5 u; b
is) m, V7 o: b/ n
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; c" }6 F5 _* h4 fdo
. t" d( ?: P/ ^7 K# n Lan := rootfolder.Internal.Tools.AOLlanguage;5 Y4 J6 @+ m4 P% s, E X
if current = @.Destination -- else return! }1 w0 Y; m3 h) l2 E
then
+ f8 m. u" e1 e1 k @.Destination := void;: R# w: j) \+ k/ G" \1 N
if @.occupied then
. N! }9 e! _. I9 \: e part := @.cont;
! S& B3 |" l" ?- {/ V& ^. z @.transpOrder := void;
, K7 ^/ F, l4 c$ }! c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* W+ O; n: R" ?/ `- G+ p1 i
@,root.eventcontroller.simTime);& h& u {6 r# b6 O; }. @
@.HasOrder := false;
& b: u# N/ _# }- l4 X) G @.DrivingHome := true;0 Q1 [* a) {1 D4 I% V. [+ W
rgManager.tryToStartTransOrder;+ j3 \4 ~9 M6 ^ V2 L
if @.Destination = void, p1 _ `' H: f# `5 ?& J' r, U9 p
then -- no transport order for vehicle @3 g3 p& p+ P. l) ^: L
@.Destination :=
* y$ y2 H4 R' L# Q. s3 X: I* H rgManager.nearestFreeStation(@,track.~);6 m& G- ]: m/ A* |% s
newDirection(@); 1 F0 y! X* W+ ?. o$ H& x
if @.Destination /= void then
* V% M( D! R) ~# r3 t @.Destination.NumReservation :=: M/ Q b% [/ t4 A
@.Destination.NumReservation + 1;( `, ?, h- ]6 ]& M( B" O
end;
7 P$ P9 q1 Y1 f @.CurrIcon := "drivingHome";
3 \+ S% W+ C) _% T @.DrivingHome := true;
5 e: X7 ^( K0 K4 K' ~ end;
t: N: f' s+ E2 N9 x H else -- the vehicle @ is empty, both vehicle and part are in the same dock station; s; C/ g1 t1 f+ r
part := @.transpOrder;
, B% \" {; w: _% d; t- R) P! D part.move(@);-- load part0 N: U0 G9 F& u5 u5 _& K1 t9 ]0 O( F
@.CurrIcon := "load";
8 D' C8 E7 {& j- N GlobalDistObj := part.globDestination;2 b, C6 L1 @/ C u2 H9 _; A
assignLObj := rgmanager.rgAssignL;: ~/ R3 O3 E' D& H$ T N2 q; g
row := assignLObj.getRowNo(GlobalDistObj);
+ C$ ~5 K. q1 U8 f if Row = -1 then -- since 70; N! R$ _* {" P: |
if lan=1 then
5 h. Q3 d+ Q9 j# |7 B* c: Y& [ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ K4 i( p6 M# M* y' m to_str("in der Andockstation: \"",?.~.name,"\"")); v9 k( t' K# b9 z2 }2 x
else
# a$ q1 b1 g& t( d8 Y! J* ?# a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," }/ H. |6 Y7 F( o( m
to_str("in docking station: \"",?.~.name,"\""));
+ t$ I3 m: \- ~/ U2 R. P# \5 Z2 R: d) z end;
8 g) Z$ Q0 S3 V- _, B& P1 L else" }/ Y- F6 Y2 \/ a' X
@.Destination := assignLObj[1,row];
1 s% v9 Y: ^/ X% F' j end; / d# L/ V2 d- W9 \
newDirection(@);0 ~/ d8 y7 |3 |( F3 N/ Q) U$ U
@.HasOrder := true;
: R/ @- ^7 X$ M4 j# W+ r! z end;
3 r/ J$ w5 q( ]3 M+ T6 V- Z end;* w7 B) `, R+ W1 N, B
end; -- of the method
* v, K: f) d0 Z3 Q$ l- }' u: x2 w |