/* called by: entrance ctrl of the object 'track'1 b6 h; K% L" R5 z* w
*/' o I8 Z+ k3 P' e" @
is0 u; m0 F* Q# Y6 p1 P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& d* {) g6 w7 ], O0 l" O+ L
do: B; p7 b- {- |7 |. d V
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 C5 j( Z9 r( ~ if current = @.Destination -- else return. C& F% {, F, y7 A
then' O C% o5 w, j
@.Destination := void;- \& \# t, L C6 w, n3 j. O
if @.occupied then
4 x, l J1 u* S, G part := @.cont;3 b s% M8 N% |& m. x
@.transpOrder := void;+ E0 Q5 i0 y! P* [2 W8 Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," }" V" J! |7 a' [- N+ p: B) k
@,root.eventcontroller.simTime);7 {7 O! ^$ W1 B1 A0 p8 G" i# @/ N
@.HasOrder := false;
' W' j0 x- `: O7 k9 n/ R- L$ X) z( L @.DrivingHome := true;3 B" e2 ]0 u7 x% f t3 o
rgManager.tryToStartTransOrder;- w# Z S2 ]* n! `- C* d F2 s
if @.Destination = void, [5 }/ |7 K5 j# k
then -- no transport order for vehicle @
) z; K; K8 p1 F; R8 |5 T @.Destination :=; `1 B3 J: p# [9 n# x
rgManager.nearestFreeStation(@,track.~);8 k2 _. K, j5 i7 S! r
newDirection(@);
( j* B/ d' s5 a8 X if @.Destination /= void then
( |" p5 v6 C* ]" ^6 L7 ?! n @.Destination.NumReservation := b, R1 s9 V* [( f8 J1 Q1 j/ v
@.Destination.NumReservation + 1;* e% _& r- M9 A* B; B. l5 ~
end;$ u( ]1 N' J V# [3 m
@.CurrIcon := "drivingHome";
, g1 F* B& ?6 N, s3 k7 |# I5 z @.DrivingHome := true;
/ _2 d; @$ Z9 s, K7 F5 X x end;
3 _1 Y; A- Q0 n, R9 f else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 ?: t+ ~' P( ?
part := @.transpOrder;
9 J, M7 k/ a" }4 ~# [+ ~( i part.move(@);-- load part
" d8 z# h9 J% d! ]- a @.CurrIcon := "load";+ X# ~9 K- T) C+ Z$ N' @
GlobalDistObj := part.globDestination;
$ m% K0 L: K3 R$ d( J" } assignLObj := rgmanager.rgAssignL;9 s: b9 u9 Q# ^) D
row := assignLObj.getRowNo(GlobalDistObj);" F% }) T7 o& S) H; P
if Row = -1 then -- since 709 n; k- c6 J+ \. N
if lan=1 then
3 [9 h1 C( c& n& O N# q( A promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), a4 Z+ G9 a) o* Z! } L
to_str("in der Andockstation: \"",?.~.name,"\""));- M7 `6 P5 o; L( ?7 q2 _; p0 ?
else8 `5 F, Y" O- N) q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 U i# X8 p9 n Y5 V, o
to_str("in docking station: \"",?.~.name,"\""));
g+ s3 R/ s& t. g. v end;
* C) b7 \0 k+ i8 b, l, D. |! Q else' j2 ^$ }& j' J) s' v) C
@.Destination := assignLObj[1,row];
0 M G! l& q8 b9 I$ I end;
2 x5 |5 j: ?+ n- s! `- o. e newDirection(@);8 j8 ` ~7 t2 ]( [* l
@.HasOrder := true;
/ O @% L; |3 y7 V" m end; u5 d/ R, l& I m% y
end;
0 p* H4 w. g n) T7 vend; -- of the method
3 |& \' S9 _5 c0 S+ \$ h: ] |