/* called by: entrance ctrl of the object 'track'
/ S' I, [9 x: z1 h% Q; v*/
* ? t1 }1 X @7 G6 q3 J3 Jis
- W+ ]( A2 j2 u2 `+ j2 t part, GlobalDistObj, assignLObj:object;row,Lan:integer;- y; \# k2 V; \$ c% X4 z) d+ G
do
% S) w+ V2 i( u: D Lan := rootfolder.Internal.Tools.AOLlanguage;/ Q( ? [# a7 Q2 |7 G* O0 d2 Q
if current = @.Destination -- else return" q( P- K, Z- Q' \) y
then
5 w% F$ h+ o, }6 |" V9 v9 z; Z @.Destination := void;% P( \5 x2 ?" X
if @.occupied then
5 t8 H# J* i& L: U9 H; f- Y$ t$ p part := @.cont;1 ]+ X# g% N/ M# E
@.transpOrder := void;( o$ J' e1 P. w2 S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% L* e! D& {1 O/ V. U9 k: R5 P1 b @,root.eventcontroller.simTime);1 e; n* g. |9 d0 s- `7 @2 q; c
@.HasOrder := false;3 l+ c5 X' f0 h% o; w
@.DrivingHome := true;
/ p; r d* v' b& G- F+ h rgManager.tryToStartTransOrder;% d1 s9 k K; ~. Q' q# [% @
if @.Destination = void
3 v8 m$ n A: v6 ?! h, ^; ^ then -- no transport order for vehicle @5 Y/ V6 Y1 m6 k/ ^
@.Destination :=- r+ x7 ~& i8 |2 [
rgManager.nearestFreeStation(@,track.~);
2 W2 F9 N4 y! w' w4 `3 m9 k0 h newDirection(@);
9 O- T% E, _, B- J) N if @.Destination /= void then( D w; l2 o( H; q& G; f* y
@.Destination.NumReservation :=8 K: Z3 x8 U4 h2 Z9 f
@.Destination.NumReservation + 1;
+ X' ^9 N& t0 @* ~' i end;
# v5 h# E4 k1 [8 O% } @.CurrIcon := "drivingHome";
[& ]( C/ S7 X$ N7 c/ C e8 Z. [! B @.DrivingHome := true;
' o$ l& y8 k# n% y8 m end;
D9 @: U W' b6 H: b) c else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 }/ f4 k3 k ?: Q! h part := @.transpOrder;. o9 q* M+ z! s6 d0 h3 S& m
part.move(@);-- load part: \/ V& V) ?3 X5 G( ]3 \: y
@.CurrIcon := "load";; Q( R0 }$ o3 I
GlobalDistObj := part.globDestination;2 B% J- i1 \4 n
assignLObj := rgmanager.rgAssignL;
: t' X+ b. z3 R d5 @$ J0 g row := assignLObj.getRowNo(GlobalDistObj);# s/ s( l5 t' _. a2 O6 _6 s
if Row = -1 then -- since 707 T* m4 O; Y2 Y8 O# b) c. q5 q
if lan=1 then
; p$ i3 B" O: L" T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: @1 P5 \% h5 }* m- y
to_str("in der Andockstation: \"",?.~.name,"\""));! J) _* G: C4 U* E: Y% n" i
else
7 I9 e) Y# z X7 F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 V4 [7 \) n$ _ to_str("in docking station: \"",?.~.name,"\"")); 2 c, F" W/ {. w. p, g( h( D3 O
end;$ f9 D5 a4 C d' M
else$ c6 S9 ^2 G9 L) w
@.Destination := assignLObj[1,row];" \" U0 [# @4 I9 f5 R4 i
end; / P8 y+ {; j$ y6 L" R I2 `
newDirection(@);- U, r5 ^$ m6 j; G6 ]& B
@.HasOrder := true;3 P! T* I: `8 K7 h
end;0 W$ N$ S% c: R$ m" r P
end;
; ?9 r+ u( Y2 Yend; -- of the method
/ ^3 e! P/ ~, [" l) X3 X+ Q% { K* A2 B |