/* called by: entrance ctrl of the object 'track') F8 {- L. R1 Y# O8 o
*/# z* d3 E1 k( O; j% a X
is @4 u: D2 {0 @* w5 i
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' c- J; G1 F- {! E$ z
do
, U; V7 g3 g+ s! @7 W Lan := rootfolder.Internal.Tools.AOLlanguage;
6 f! ?; t3 u# U7 G9 i E; b if current = @.Destination -- else return# ]2 ]" [0 Q) ?
then
z& P3 T5 T3 n$ @9 p @.Destination := void; M9 K: \4 S# d9 L9 n( O% e. t
if @.occupied then# o& t$ D' ?7 H" V9 T/ R
part := @.cont;/ a1 K+ o) j* P: w7 m; _
@.transpOrder := void;
: i# l5 ^& \4 x9 c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 `* q3 A3 {; a& ^- H
@,root.eventcontroller.simTime);' N/ r* t( P2 E- ?/ r; Q4 o
@.HasOrder := false;
/ r6 v; L7 P5 D @.DrivingHome := true;1 Y* f4 L: |8 _" c2 L4 q, B+ V
rgManager.tryToStartTransOrder;, ]0 E8 w' g' p+ K# _" B: y
if @.Destination = void: [/ V \. u$ S9 e5 d: H
then -- no transport order for vehicle @3 b, {* V, j+ |
@.Destination :=7 c4 ?$ h A, j. `; y
rgManager.nearestFreeStation(@,track.~);
* L* i0 ^* x7 [& O newDirection(@); ) e# A4 R0 Q) I5 u- j/ I2 F/ J
if @.Destination /= void then* u( p' J a. g8 N0 K: A
@.Destination.NumReservation :=
2 L+ V- |! \. h2 P& {# I; c4 n @.Destination.NumReservation + 1;7 y0 f+ o3 {4 x5 Z6 n3 B: ^
end;7 e) @# k& y G) A- X8 R
@.CurrIcon := "drivingHome"; Q& D$ L3 H5 q* E2 @! V8 b
@.DrivingHome := true;8 I5 ? g/ x; ? r3 D' G V
end;
. B" U. `. m* b/ T! s; ^. H else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) W" w# Y9 N, u1 P part := @.transpOrder;
6 K+ K3 R- d9 W' ^6 O3 G+ Q part.move(@);-- load part0 r. T }- w3 m! [# |
@.CurrIcon := "load";
7 `, ]' U, i- y$ Z4 U5 ~1 Z GlobalDistObj := part.globDestination;
" g+ ?' {' w) D) g, L& x3 J: y assignLObj := rgmanager.rgAssignL;
- N) e. ~- A& |1 u2 c+ h( y row := assignLObj.getRowNo(GlobalDistObj);( M+ F- W9 Z2 a5 V: X; D
if Row = -1 then -- since 70
" N3 A/ v$ e. c4 d6 |( I if lan=1 then
& s$ i/ {! @& E1 J promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. C! s) _9 K1 X+ Y5 r5 E1 R2 X/ b3 W to_str("in der Andockstation: \"",?.~.name,"\""));
8 J1 d8 E A9 ^' n else U8 ?9 v$ z7 t# [! }; j& C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% o) ~* \+ N. U, ` [' O; D
to_str("in docking station: \"",?.~.name,"\""));
5 B5 u$ n- J- X+ t+ g. f end;% k: ]0 b9 a) ~+ K4 G: I$ t
else/ C7 V4 J. Q8 c
@.Destination := assignLObj[1,row];
, B( v! y: A3 D; x2 n. O" [ end;
6 K& q6 `/ n) t9 H9 q3 \: F newDirection(@);8 [8 ~7 a1 J; u, R7 K
@.HasOrder := true;: ~1 ]! D4 V" {6 a, C! g% r
end;, N( F& \' P) A4 {, f( `$ p
end;
: Y K' M" o6 G& j4 D. z# bend; -- of the method
+ F. Y! j2 `& g5 F# V: a |