/* called by: entrance ctrl of the object 'track'$ |' c8 A6 T5 R# s2 ~$ j) G
*/
; m# t1 Z! Z# W( W, J2 mis. f- t/ \! S# `( b
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) v, W2 D; g# u w$ N1 L% O3 wdo# N h2 A; \4 B# V. @
Lan := rootfolder.Internal.Tools.AOLlanguage;3 u$ E# d5 _4 s5 Q2 O( P
if current = @.Destination -- else return2 `" h1 M7 l1 y; i
then3 b2 l& u$ W( F# b/ \
@.Destination := void;! M, f3 p( \3 i( W2 m
if @.occupied then
; P0 {4 [* K4 k) X6 R9 s2 } part := @.cont;
k5 n3 K% J F2 x i6 ? @.transpOrder := void;
; E- |6 L/ w6 Y+ c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, s0 B% G4 U8 J- ~
@,root.eventcontroller.simTime);! w* x+ W7 q3 O- |) v8 {7 @
@.HasOrder := false;" A% v$ v3 h7 c2 y( T' O' \% J: i
@.DrivingHome := true;
" G$ ~" l/ C$ U rgManager.tryToStartTransOrder;
$ q5 n, f, E7 p/ X( H% t- ?, q0 m( a if @.Destination = void: }9 s& z) N/ `% E9 z5 B
then -- no transport order for vehicle @
. Y) z- o3 M, A7 I) j. I @.Destination :=
9 k1 y! ]' R" E rgManager.nearestFreeStation(@,track.~);7 l+ x: m3 M" N. ?" H/ F! s4 U& d" R
newDirection(@);
$ t0 u. h9 A& m1 d, H. m0 e; E: d4 K if @.Destination /= void then+ n0 b$ ~- C- A4 M# x
@.Destination.NumReservation :=! B& y8 L$ t; a1 n* n/ s3 O
@.Destination.NumReservation + 1; x& X H K0 P4 n1 Y
end;
" k1 g# f% n, T; ]) m/ @; ] @.CurrIcon := "drivingHome";/ g4 [3 @; {5 \: [! P7 [, H
@.DrivingHome := true;7 j; w% I6 j) S7 i
end;
, W) j9 w# }5 N$ U6 e, U else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ l- z6 A( u) Z3 n part := @.transpOrder;$ ~# G3 S+ [) I( g+ M" u! k
part.move(@);-- load part0 O9 r. H) N/ |: W
@.CurrIcon := "load";
; n' O: g& b; G/ X GlobalDistObj := part.globDestination;. _4 J# V* B c; j) D( ?; h# y
assignLObj := rgmanager.rgAssignL;
: x1 p- k! |. K+ v# F5 w row := assignLObj.getRowNo(GlobalDistObj);; y, J7 R& E A! I
if Row = -1 then -- since 70/ Y% X. P# l* s# D- [* k* q
if lan=1 then
* I- V% h9 i1 Y+ d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 I+ f& K9 N/ S, `! p) p8 O
to_str("in der Andockstation: \"",?.~.name,"\""));1 l6 X( O7 f$ Z6 p+ U5 q
else
7 _ E3 p* N) D0 ~7 R% u promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ F0 Q) y9 |! i1 s' O; D+ T, D to_str("in docking station: \"",?.~.name,"\""));
J: ? q; Z- I/ F4 w end;$ O6 v# T. ~% X# q
else
4 J) ~/ y. Z! h( d @.Destination := assignLObj[1,row];) I" e I9 B, r7 A; w; K6 ^
end;
, w9 G4 S9 }+ v6 [" Q* w& ` newDirection(@);
6 O; R7 X5 W# T1 U @.HasOrder := true;
9 e. h F1 v; b( S: R% V/ | end;
z O; B. S' W) P% f8 _3 b* r end;
9 s: a3 s& M w, N! eend; -- of the method
$ m8 G7 Z% n; b( ^# z9 b @3 g! G |