/* called by: entrance ctrl of the object 'track'3 b' `# ], h! b9 K
*/
: {* I, F( q+ U7 r6 F4 [$ b5 l% Eis
2 l1 ^# V" j4 i9 l% {8 [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 r8 n4 n. `$ C! ]1 udo' {. C/ k9 A% l2 ~9 W6 Q4 {
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 ? P J! P0 U/ X if current = @.Destination -- else return" D' ^# ^, C9 Q: y c6 s
then/ z6 D3 M* g$ F
@.Destination := void;
7 q; H: J: `- l, J; ^% Z if @.occupied then
7 f% T5 a, M4 n part := @.cont;
J5 L- Y' R% V' B9 Q) J @.transpOrder := void;
# O8 R/ @0 ^. p' z* ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 w: }! K) ~. y$ Z# j
@,root.eventcontroller.simTime);
2 q8 b; `3 h! [! F8 _. v% i/ u& w @.HasOrder := false;
& P8 g0 b0 W; C @.DrivingHome := true;( p: ^0 N2 j( h7 ~
rgManager.tryToStartTransOrder;% {+ M5 w' ?: e% P
if @.Destination = void- o& ]# e6 s4 S0 X9 W1 F
then -- no transport order for vehicle @* e# u- @: |" K" b& U- T0 f
@.Destination :=7 W+ b) n0 ?0 v! X, F1 @
rgManager.nearestFreeStation(@,track.~);& u& X: Z! y, x" [. c
newDirection(@);
, [$ B( U6 w# K if @.Destination /= void then
8 r7 ]9 s6 o4 m/ O l2 i3 c+ N# c @.Destination.NumReservation :=% N2 c5 U! K/ }3 V- N- G& m
@.Destination.NumReservation + 1;
' i, s0 g. Y! R. U9 l* ]0 k end;
$ z2 O$ P5 b8 W1 B { @.CurrIcon := "drivingHome";
1 |9 h: h; U' v" D0 E4 f7 ^7 I" \ @.DrivingHome := true;& V7 b+ `1 i- S. V3 G' q- N& c
end;
* B' c/ b; S' |- W else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" A. F0 y! @2 e6 }$ [% U# d8 y part := @.transpOrder;; G) k; ^$ Q: m% N. _! @* Q
part.move(@);-- load part
7 F' i& y& c; l# g1 ? @.CurrIcon := "load";2 a3 `* a G1 u# d: v% M
GlobalDistObj := part.globDestination;7 R: [* W; O5 r! t$ @7 S- d% l
assignLObj := rgmanager.rgAssignL;! m4 D1 P2 ?; d9 F6 N- |6 L- s/ \
row := assignLObj.getRowNo(GlobalDistObj);
& ?4 \9 I4 L/ x$ b- ~2 Z if Row = -1 then -- since 70" o* y0 Q0 y- f# @: k* X
if lan=1 then
4 ^+ |0 r! ~6 S promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, t8 U) u5 P9 M& J
to_str("in der Andockstation: \"",?.~.name,"\""));, F+ `/ r5 y% M" w
else' q. o) L' x7 m- w2 m- V& E! |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% f( V, U* u' a% ~$ T# e
to_str("in docking station: \"",?.~.name,"\""));
/ [9 s2 b( Y. w9 \$ v4 K5 U' \) K end;5 G6 L6 ^' P/ M/ s u% h h1 v+ b5 N; S
else3 H5 q% e" C/ N& G/ q+ f8 T2 ~
@.Destination := assignLObj[1,row];
2 {5 x u* k4 ?! q9 h end;
p: A4 Y; R5 [( W" ? newDirection(@);, P" w3 r `. K# u0 |
@.HasOrder := true;
3 A' \6 l, v- x4 q1 x end;* W0 F0 e" R& j- H8 h3 O7 j
end;, h/ |2 Q E1 @; `7 ^. X2 ?+ ~
end; -- of the method3 i0 b6 q2 `" a" {- N
|