/* called by: entrance ctrl of the object 'track'& T4 H& t4 {0 V, L; E
*/( ?- B) G% ?, ?: O) `& S: P1 u
is
: }: l4 J- ], r& V3 b. [& e, ~. I part, GlobalDistObj, assignLObj:object;row,Lan:integer; H1 a" G/ }, x) u7 ?. M
do' g% s. Q; R3 g: e& A6 ~
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 _. ~( l6 n9 I7 d if current = @.Destination -- else return
0 \( [/ L$ e* Y9 R9 m7 B" ^6 }- p0 ? then
0 R2 L3 a; b1 ~ h% b0 h" _ @.Destination := void;" z+ j1 ~0 Z7 g6 q
if @.occupied then" d4 F5 x8 c3 O, y* R+ Q
part := @.cont;
+ G8 U+ N) Z. _7 o* h @.transpOrder := void;5 d" S7 g9 C7 @
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' t W, r4 V) H3 n& O7 |
@,root.eventcontroller.simTime);, |. |6 `$ e3 Q4 B6 P4 x1 B
@.HasOrder := false;, t+ B/ @$ i2 T3 g8 k: p
@.DrivingHome := true;
% e; |, ]4 ~$ z; N rgManager.tryToStartTransOrder; q& r% V. ? {2 T1 \' J
if @.Destination = void8 h2 K, l: G) s' {% [
then -- no transport order for vehicle @$ V% d0 p+ i1 }
@.Destination :=
0 d& B0 ^; ^6 u4 J ^$ S rgManager.nearestFreeStation(@,track.~);. E' E9 j( i% B
newDirection(@); 4 i; T4 F7 k( d: R* L0 J& x3 i) G
if @.Destination /= void then% P" W$ j$ d( F9 M B& u2 M1 w
@.Destination.NumReservation :=5 ?; b3 V4 n! g# @) z
@.Destination.NumReservation + 1;) e' S9 C5 d6 v/ O E
end;" m; t0 l1 v+ @1 A$ m3 [
@.CurrIcon := "drivingHome";9 v8 h" S8 u+ u, ~* h4 {
@.DrivingHome := true;
( ~7 d, z7 ]% T* J end;* e; o4 u3 Y% c- q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 E- t. B4 |" W, H0 X
part := @.transpOrder;
) ]+ B' e7 N7 h6 ~, Y3 L$ e part.move(@);-- load part
. E% H) U6 O* ^ B! s @.CurrIcon := "load";
" V" N# |: K, I3 @7 } GlobalDistObj := part.globDestination;3 Y4 R& d7 R6 Y0 Y, ~1 J; D
assignLObj := rgmanager.rgAssignL;
" Z, Q0 |8 U) _. ^9 F5 H row := assignLObj.getRowNo(GlobalDistObj);
( ?# c! b0 U% _ E/ ~8 T if Row = -1 then -- since 70
; A2 P% }; a* `! X" G# |9 D if lan=1 then) O0 n. H% S7 }
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: A+ C% h o8 a, U) L0 r to_str("in der Andockstation: \"",?.~.name,"\""));1 H: `' B5 I) D6 L. L' K$ p& Y
else+ C$ x4 n$ S- J7 F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; C! T1 o2 G% C5 U
to_str("in docking station: \"",?.~.name,"\""));
0 T$ l/ G* B0 A) r: y T end;
3 `( _* p5 S! Y else& c- w3 o4 E, x$ b d% x, l
@.Destination := assignLObj[1,row];6 O1 `+ `+ B: y0 T
end;
; H* {& Z r& y1 c* w3 p newDirection(@);' D5 r A7 Z( q) h# @2 \! U
@.HasOrder := true;
8 B' {" a0 S1 X; g [ end;$ K/ f) h% q7 M
end;
/ ~ N) |3 w2 [4 S* E9 ?9 R" P. xend; -- of the method
+ U- \. A0 Z( B' E6 e. D* R% x |