/* called by: entrance ctrl of the object 'track'
! p* c; K$ O2 k; t*/. [; `7 w; E2 U9 Q( w, b
is* l2 L1 g$ ^2 C `& _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ [ ]% u- @; k
do& e) \. e: z; \' n0 E
Lan := rootfolder.Internal.Tools.AOLlanguage;# l+ p4 t: q0 o- \' O) k
if current = @.Destination -- else return
. C1 i) ~+ {" N1 ?) T. m$ O then1 K5 u+ }, L* k q1 f9 S
@.Destination := void;
% V; Y! O$ Q) ~1 m9 Y4 d8 N if @.occupied then/ T. d( r9 h7 d O
part := @.cont;8 R' S* w l D
@.transpOrder := void;3 K. \4 o, t: u+ H2 ]' A! \1 A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 D% o# O+ _4 x' k. R @,root.eventcontroller.simTime);! Z# A$ k% D3 M. I" ^
@.HasOrder := false;9 Q" F- C- `; w+ |) C
@.DrivingHome := true;: q( q' ~& W$ M. S' r
rgManager.tryToStartTransOrder;, R( Q9 ?3 R2 t7 X; }
if @.Destination = void; D9 `/ ]; T& s. d* Z" h% u
then -- no transport order for vehicle @
0 T( _ G* r" k( y2 K @.Destination :=; h6 d9 T2 _! a
rgManager.nearestFreeStation(@,track.~);. B# F5 I$ B1 R- k; U
newDirection(@);
0 ^5 W1 U) |$ Q0 U, h# f6 x; K1 F if @.Destination /= void then
! P% f( Q( E$ T$ g3 X( h) O& i3 T @.Destination.NumReservation :=# a, D: q8 K3 x) M, q
@.Destination.NumReservation + 1;
1 x# n8 V& Q' X0 F; L y end;
' e# e- o0 D B# u @.CurrIcon := "drivingHome";; s+ F w7 w: e; H( ~) a
@.DrivingHome := true;
: N" U& R, z, H% Z! N0 W end;4 K v k0 e5 V/ l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& O& X H/ g& i# F/ K* P4 a
part := @.transpOrder;4 B6 Y3 n6 Q" I, ]% g7 S
part.move(@);-- load part
, |, H1 }2 {9 }0 { @.CurrIcon := "load";
c3 ?0 ~1 f6 f, W GlobalDistObj := part.globDestination;
9 }6 }3 x! O4 g assignLObj := rgmanager.rgAssignL;
4 z5 g: ? u( ~8 L: d/ O row := assignLObj.getRowNo(GlobalDistObj);, q# ]% w" a9 D4 k5 x
if Row = -1 then -- since 70. \8 `% \/ x9 K# F8 R
if lan=1 then4 ]' B) |& v7 @& w6 g! {& a* y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
s# o _! ^* {8 W9 n/ _ to_str("in der Andockstation: \"",?.~.name,"\""));
- p1 q* @8 W+ s, b0 p else: O, i& o8 v* t: W$ }! `2 T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: X- \0 e K% g$ r to_str("in docking station: \"",?.~.name,"\""));
+ ]1 L/ h& K: m; ^* v3 u/ O end;
6 m5 i& a' {9 ~: k4 t0 ^ else/ O7 k- _. ^3 Y. `6 F
@.Destination := assignLObj[1,row];
" b" m" k# {# y1 }5 t end; 2 X/ v# f+ ` A. G' R0 {, c8 \
newDirection(@);, x! C8 |2 k% [7 Y- b
@.HasOrder := true;
4 x" _% }& F) C1 ]1 D% w5 i end;
' i' b& q0 J6 l- }* ~7 f' x0 r end;
. l% x: C2 D) Y$ Q0 E5 Eend; -- of the method
6 j- V9 T, _. a4 z |