/* called by: entrance ctrl of the object 'track'2 |/ P; N$ J _! k* x) s. A
*/" T5 G0 E' Q% C8 j
is( o4 Y7 l! J$ F- X$ m8 Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 V. ~, @2 {' K- M6 ]do( q3 Y, x! m( u- w/ z# i: o$ X$ V! G; L
Lan := rootfolder.Internal.Tools.AOLlanguage;) l$ l& B) N) |6 g0 c
if current = @.Destination -- else return
# Q ?7 C: s8 P# }( r8 J then8 m. \1 x& [) e+ l" P, l+ ?) R$ d& W
@.Destination := void;
8 I* B& z! L+ O8 l2 v if @.occupied then
. O! U' f. g9 H g part := @.cont;
6 S% l$ z" t: u3 M @6 M2 w @.transpOrder := void;
) m, [1 B! P7 O part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) x- B, Z7 d$ e9 E( W
@,root.eventcontroller.simTime);* I( X3 A2 v8 r+ r/ A
@.HasOrder := false;% E# b- ]2 I6 G8 F1 ?- l! P$ m- o s
@.DrivingHome := true;) ` a( ?7 C0 N- G& s# {% W
rgManager.tryToStartTransOrder;
; m- G' u7 Z: w% c if @.Destination = void0 g3 v3 ]+ E" \6 ^) }& s
then -- no transport order for vehicle @
9 W, m' y8 W7 m @.Destination :=
* @9 P2 u8 Y& G$ _- {$ c rgManager.nearestFreeStation(@,track.~);
% c: h2 D# ]3 M# Q+ l! H newDirection(@);
6 C4 }% f- w: }" Q: I/ ?( G; |' X if @.Destination /= void then1 F9 a, @1 J/ B* {* A, Y/ n% d- @
@.Destination.NumReservation :=& ? O( J# l$ z+ G2 K, a! A- X
@.Destination.NumReservation + 1;% v# l" [, G! |
end;
' A( M( j! q5 _: B# r' u! _ @.CurrIcon := "drivingHome";
. W4 A) V/ ?. l7 T% J: P @.DrivingHome := true;8 m2 o6 L' D, S7 P
end;/ [) L/ @5 `9 a; N1 ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 X: }1 s8 G/ p4 J
part := @.transpOrder;
4 _3 }" G4 T0 n part.move(@);-- load part
- e# l: k; m3 w8 _7 b9 ^ [ @.CurrIcon := "load";
) P3 S8 t' p- m" m GlobalDistObj := part.globDestination;5 V8 Y% I: c4 Q6 M6 \0 y5 q0 x
assignLObj := rgmanager.rgAssignL;
7 J" g0 q. ~$ |% Q0 j! w( i row := assignLObj.getRowNo(GlobalDistObj);
7 v7 Y! F! G( R" a u* V+ O" A* _ if Row = -1 then -- since 70
" |% T! T% s/ O, W, c if lan=1 then9 W3 z/ A, Q @2 o6 ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 U6 ?: t- x- j9 d) @/ L" q
to_str("in der Andockstation: \"",?.~.name,"\""));; U+ W: j6 [' h: E5 W9 ~
else
1 y) y9 W& P3 l- I9 s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ ]/ A D" [; a! C; a0 U, p, K3 F to_str("in docking station: \"",?.~.name,"\""));
% e" ~' ?9 B7 G u# v: S0 x end;/ C8 E: x" i: a2 w
else1 \: T5 g* |, _. `; W+ W6 |
@.Destination := assignLObj[1,row];. u9 z# N6 D/ y6 O" [
end;
# [+ t$ L0 }+ `, [2 u% ]* M# C newDirection(@);* {+ d2 v/ A: G9 K: R
@.HasOrder := true; ]; p* e1 K7 l; L
end;
$ S( v6 t& \! H% L$ b end;$ e& [! \8 w6 g# c! M
end; -- of the method
: y9 w1 ]3 T, s$ a8 C. I2 f |