/* called by: entrance ctrl of the object 'track'! y. `3 i/ u, j% c
*/
& \3 {; W! C! y0 g4 s) jis6 p) r' Z6 z) E4 |+ a' \# K1 a
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- Z$ y( s* r1 V7 D: A
do
# O- c4 m+ E. c1 w" X& X Lan := rootfolder.Internal.Tools.AOLlanguage;" ~! H( l0 S: {- O; M g$ s6 p
if current = @.Destination -- else return
$ A0 O& W U, O/ W then3 I* `" J: a8 b. j' X y, B
@.Destination := void;8 {4 F9 c6 R# h/ U& B
if @.occupied then
' e% b b; @; [$ k5 T part := @.cont;" h2 I% W2 l+ c% R
@.transpOrder := void;' G* C& `* |2 D' R0 k8 ^ o& ?4 o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" ]8 X$ g) K k- f0 u @,root.eventcontroller.simTime);! U$ P( s) @& [3 H5 E' X/ T( J0 u6 q
@.HasOrder := false;( J, i) U$ @ W3 c
@.DrivingHome := true;! z/ A' N7 c) k1 R9 Q, i+ F o
rgManager.tryToStartTransOrder;$ i! x4 [0 e" R0 u `0 n, J
if @.Destination = void6 i5 J2 g4 X% R& a4 W( o
then -- no transport order for vehicle @
7 s; q1 k3 e+ C1 C- |+ Q( _ @.Destination :=
8 L; n ^% Z ] rgManager.nearestFreeStation(@,track.~);
) v. w; f s" K7 _9 i7 C* F5 B; \! x newDirection(@);
" r5 O1 Y" d. y! } if @.Destination /= void then- `% G1 F! Q. V3 B) G4 [$ U. M3 G
@.Destination.NumReservation := B6 z) i# P+ A
@.Destination.NumReservation + 1;7 J. g6 t+ U7 ~; ~
end;
# k C+ W8 h7 J/ s- O @.CurrIcon := "drivingHome";8 B9 f7 e- m$ w% m5 t0 ]( |' x
@.DrivingHome := true;( J0 |3 \1 [+ U1 L. Y
end;9 D' p0 F' u6 q+ E3 U! M$ R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 q' t& t. O+ M+ k. }! l# S4 h part := @.transpOrder;# P6 V1 O1 ^. |4 K ~) O6 V% q. B
part.move(@);-- load part
/ l& n5 U( V* R" w+ Z* G9 z5 G/ R @.CurrIcon := "load";
( w7 W" J7 s5 i; Q& k GlobalDistObj := part.globDestination;: i6 C; o4 p' q# B
assignLObj := rgmanager.rgAssignL;
+ t# W8 ?7 ~# {8 x& G- v( z8 i, _! v row := assignLObj.getRowNo(GlobalDistObj);' w E# \. [5 L; T/ s' O
if Row = -1 then -- since 70! n6 g( I/ |* s: |& x2 x
if lan=1 then1 U6 P+ ^: a; X( p. a
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* s/ |5 g6 m. M* }7 T4 q to_str("in der Andockstation: \"",?.~.name,"\""));
- r! A, a8 t1 j( o else
, o E/ v5 {1 c2 B) B promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! w W- x9 J8 _7 @% A
to_str("in docking station: \"",?.~.name,"\""));
& |0 A; Q& R' f6 {: ?' X end;$ X' V* X1 A9 ?' T( {5 ]
else
l& T6 X0 L: J7 N) h* ^& K9 \; D) { @.Destination := assignLObj[1,row];* L5 S! V8 M' U. M
end;
/ `1 \ }+ N& Z6 ^" b newDirection(@);
# d% o0 j( B2 f4 N5 ` @.HasOrder := true;
5 y+ D6 z6 N H: i# L1 W W- \ end;
& K+ q8 R- {/ [% X U! g* r end;
, e+ D) j1 v {+ |$ Yend; -- of the method1 c0 v' W" t! H& W, [, p; t
|