/* called by: entrance ctrl of the object 'track', F$ n2 J6 N; p X3 \$ B* M- q
*/
( G" R+ M" [1 {; L5 L8 @) O6 ^is4 k+ N C% S+ P1 l- y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 A: T$ R' L" b5 Ydo% G6 `2 |( c: F
Lan := rootfolder.Internal.Tools.AOLlanguage;( }0 e" w& ~7 x! \: o+ Y+ [& i6 Y
if current = @.Destination -- else return
0 t% K2 O* \: K& E C3 ?& D5 h2 t then: @2 |8 g& s" @, t* [6 Q7 O
@.Destination := void;' h0 x# T9 t5 D9 H" M! d0 ~
if @.occupied then* b" Z, F E4 E; r( M& L# k: s- }
part := @.cont;
% e, c& H- q& ]7 q ] @.transpOrder := void;- P6 D; G' l- a/ u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' P- o4 J# {4 y9 V
@,root.eventcontroller.simTime);
1 D& J8 o; L" J% x2 k @.HasOrder := false;
3 H; G9 D. R3 ^7 k4 S4 @8 | @.DrivingHome := true;
1 w4 q3 t- r) w0 B rgManager.tryToStartTransOrder;6 M$ h; ~. z" l% | J
if @.Destination = void- n* Y/ l6 k' c/ y% v8 G Q
then -- no transport order for vehicle @" f/ i ~: m. v6 g0 \
@.Destination :=
% d. L% O( T) d9 `* a3 @( z3 U rgManager.nearestFreeStation(@,track.~);
# k( K/ @9 b% S: ^+ R newDirection(@); * u2 @% h9 M3 J! E+ D
if @.Destination /= void then3 r2 F/ L7 O5 L
@.Destination.NumReservation :=
) o7 K7 k" ^: Y @.Destination.NumReservation + 1;* O' Z3 n' o( V" c) \. A0 J
end;3 J5 R. z9 L* M4 d8 n' x
@.CurrIcon := "drivingHome";% g( u+ |; t4 p/ t( }0 X$ h% w
@.DrivingHome := true;
/ D$ n7 |! m: @& j5 \( f: d6 o end;1 v3 k! l9 x5 Q% t- S9 D4 I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ o- q% P- S ]; ?2 X7 z4 z
part := @.transpOrder;6 Q- A `1 C1 z
part.move(@);-- load part
4 b8 X1 u* ?2 m2 b) Q @.CurrIcon := "load";
/ R" A; [3 ~/ O( U a GlobalDistObj := part.globDestination;
" s) x! K! ?" y assignLObj := rgmanager.rgAssignL;0 r8 T, `+ r* q4 P0 F' M
row := assignLObj.getRowNo(GlobalDistObj);
0 U5 c. z+ f4 f' [) x1 e) { if Row = -1 then -- since 70
+ T8 k, n! w2 o' s if lan=1 then
. K) m4 ^: k c2 z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- Z* Z B. G% C
to_str("in der Andockstation: \"",?.~.name,"\""));
) v- K8 @: g% ^$ b& E else- T |, ~0 S6 z T$ ~. `! m
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% H* J, r* R% E( J- e: b9 n to_str("in docking station: \"",?.~.name,"\"")); / o3 R d# p4 i! e& S$ ~9 a
end;
% r4 e% F" X* C3 R else
b' M4 y' C* J: K1 U5 o4 }2 L @.Destination := assignLObj[1,row];2 g) @. [/ S5 b1 ]7 ~: N) U. Y& h
end; " W: G7 K3 C8 N* u& C) v* A
newDirection(@);
' V- l! Y: f' q' @2 A3 J2 |( } @.HasOrder := true;# n, u5 d6 h" p
end;
z5 t3 w/ k5 |; }+ B end;, L9 \6 D1 K& N5 W8 E+ d
end; -- of the method" j1 U9 N) ?, \8 @& F8 p0 J; ?) k
|