/* called by: entrance ctrl of the object 'track'
+ y2 g) v5 L+ e& s1 v0 X$ e2 d! P*/
7 ]8 B3 p7 A; o" wis5 s/ a5 h& L! Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# \9 K" Q! b2 U, H% y* ?do0 e# D: T* k a/ }( S4 R7 l
Lan := rootfolder.Internal.Tools.AOLlanguage;, c7 F3 n# ^. J1 O, S) l0 S: p
if current = @.Destination -- else return. R7 v& K7 S, i1 s/ B5 y5 J' D
then
o( L% ]/ q6 R4 I$ A @.Destination := void;
& H+ n8 M# w& H; \7 q if @.occupied then8 r _8 [* _6 n ^1 r4 f
part := @.cont;
4 u7 ]% e6 k" p2 w$ f0 K @.transpOrder := void;
0 U5 t, D7 V2 [0 }2 L& t part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: [% v/ ?! P& t0 J @,root.eventcontroller.simTime);3 c1 [! y6 T! z a- n
@.HasOrder := false;
4 e2 w% H; s" K7 D; }, w4 T @.DrivingHome := true;8 F/ V: e9 Z/ Z s
rgManager.tryToStartTransOrder;
+ S6 _; h6 {1 G. G if @.Destination = void
0 ~1 c& u; G& s% m7 w4 f then -- no transport order for vehicle @
- s" U2 u" c+ G5 a: {' z! ^ @.Destination :=
0 U* A( n+ y3 ^1 _0 H% o& o2 y rgManager.nearestFreeStation(@,track.~);3 H6 ^% @7 W: k1 c- _8 {: ~2 [
newDirection(@); + f: a. A6 Q' x) w) [- j
if @.Destination /= void then
# \0 I7 w o) H' @ b2 Y @.Destination.NumReservation :=8 L% A" H7 u% k D/ k
@.Destination.NumReservation + 1;& |; A3 ^1 X0 t# S
end;
( D1 ]3 m) A2 ?( p; s) K+ P% r @.CurrIcon := "drivingHome";7 @$ x, e% ~: V
@.DrivingHome := true;% Z+ ] Q( A/ k
end;
% u) B( m/ q4 M* _+ C y else -- the vehicle @ is empty, both vehicle and part are in the same dock station; A' x* M/ B2 e* d# p
part := @.transpOrder;
& H& K( g4 f8 H) S5 t& S+ _( | part.move(@);-- load part. f3 o: B8 Z! G0 k1 [% `
@.CurrIcon := "load";4 l6 K" d1 H$ }( F9 W
GlobalDistObj := part.globDestination;2 M, O! O$ z% I
assignLObj := rgmanager.rgAssignL;
R5 H( T* K$ Z. h- q% D3 A7 e row := assignLObj.getRowNo(GlobalDistObj);: V. Y; u9 }& b: ]
if Row = -1 then -- since 704 U N l# `2 g# ?. E. H g* Y- K
if lan=1 then
+ F+ F3 R; I/ A/ J% \- x0 [* |; t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 @1 e8 X# C3 u, Z% \ to_str("in der Andockstation: \"",?.~.name,"\""));
+ Q) g0 f, ^" U' _! I) F else4 V5 L6 T3 s) U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 f/ D# ?9 @; v" _9 U$ _" B" D
to_str("in docking station: \"",?.~.name,"\"")); $ J+ Z6 f) v6 N7 B* @' w
end;: ? a0 N0 m# Z3 ]5 R
else w( r2 y4 I" T; r0 \! S3 b9 b
@.Destination := assignLObj[1,row];7 `9 w5 M+ Z. Y
end; 3 V# J7 ~& S! |- {+ t& Y; z: E6 W
newDirection(@);% h9 S2 t% I4 R
@.HasOrder := true;
6 e- z! {2 o8 L, E- R( f. \ end;# [1 A) z+ i; h
end;
& s1 [! H ~8 bend; -- of the method( Y( b3 W1 W5 g% B$ A3 n: I+ Q
|