/* called by: entrance ctrl of the object 'track'6 X* G& E$ X# B% k N1 \) E6 O. f
*/, U7 K" W. | Y x0 f) v5 H
is
/ H; d7 r" c0 o+ B# C) Y part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ ~2 q2 ?, ?) d- x1 K+ g9 m, T7 _do
. e T3 O, y; t/ R9 s. j4 {9 S, J. h Lan := rootfolder.Internal.Tools.AOLlanguage;& M6 E# ]' f0 i6 L+ P* j
if current = @.Destination -- else return5 Y% c* [9 _' B' M% h' V
then
, Z& ^: f) z) i3 k% }7 Z( r5 Q' x @.Destination := void;' V0 {+ K" t) P. D' B+ R; U6 s* A
if @.occupied then+ r$ N: [/ z3 e
part := @.cont;
+ _7 c8 ]& j* w( ], Y: U @.transpOrder := void;
8 e6 q9 H6 O: ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' H* S8 U: E) T4 B @,root.eventcontroller.simTime);
8 R0 ~4 x/ E+ f2 I2 `0 @ @.HasOrder := false;' j- g: f1 F4 U, C
@.DrivingHome := true;
& r! |8 B5 z# Z7 x rgManager.tryToStartTransOrder;3 T3 w. C5 v0 z, {; W/ R
if @.Destination = void$ o1 ~' O. E+ T$ ?% |0 k+ Q0 Y
then -- no transport order for vehicle @
T* w" B. f5 j1 `* y# A @.Destination :=" h9 I$ C6 e" X1 v2 h9 d
rgManager.nearestFreeStation(@,track.~);
! e `- c( x. P8 W1 _ newDirection(@);
; @! R2 H; y4 Q2 j if @.Destination /= void then
) h5 |& f. R" L1 Y& F3 x$ I. I @.Destination.NumReservation :=: z$ ^ H* \, Z. Y, u$ ]3 m
@.Destination.NumReservation + 1;1 y; G1 V2 S; Q3 X7 f7 g
end;/ g/ u$ y4 Y; Z3 d7 c
@.CurrIcon := "drivingHome";8 ?! _6 V: _8 D6 @
@.DrivingHome := true;
9 H6 \# \* _9 D. s end;
4 ?1 Z" Q: F" D) ]5 b, o else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ H! P |2 o+ [( j; g- D: M part := @.transpOrder;2 A. |8 k; ] S6 S, e, [
part.move(@);-- load part% M9 Z: ?8 K1 B! n3 J$ _8 q
@.CurrIcon := "load";3 d7 t3 X+ f) {& R' \: R4 r* _/ U. s
GlobalDistObj := part.globDestination;& ?9 b! [7 u6 B
assignLObj := rgmanager.rgAssignL;
9 w5 \' G. T+ b, ^3 H% L: W6 D; U5 p row := assignLObj.getRowNo(GlobalDistObj);
3 O& O1 F% @5 [' N if Row = -1 then -- since 70
3 i0 F( |( [2 V: c N if lan=1 then
# H: M: `- [% o' } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! h4 h' q* d" G0 l to_str("in der Andockstation: \"",?.~.name,"\"")); L' n; ~9 L" b. R5 e, V
else, V! x, [ ^& g* G- \7 o4 T& W- T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- u" C7 a3 G D6 ~, z b0 ^
to_str("in docking station: \"",?.~.name,"\""));
9 y& x" b; D: K+ C% F end;$ O9 m: h7 I" @3 O5 G9 w
else
0 Y5 ?, Q! Y7 [; G* L9 G+ g @.Destination := assignLObj[1,row];* \: i/ f- V1 _( l. Z
end;
" o: `0 h# c, u" n newDirection(@);
9 [; {# ]9 ]) U+ b% U @.HasOrder := true;0 |8 L. L8 u' s
end;
( M4 \. A# ^ R/ W; |1 x end;
7 v$ f1 J8 g$ {6 k* @, Uend; -- of the method
2 `. {5 Y, y& d# J9 L# I |