/* called by: entrance ctrl of the object 'track'
5 x! H# o& {! u*/
; h1 G# x! Z7 gis3 M2 O' s! S% Z$ c8 j7 B& K
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ ~5 y4 Q e5 l- x) Z9 Ndo
& |3 M4 k# }! @* W( l Lan := rootfolder.Internal.Tools.AOLlanguage;# T- I+ J L4 K- U* J
if current = @.Destination -- else return* }) b/ b- }: E6 P7 j9 f+ \
then
( L. @% w* P; _. g @.Destination := void;) Z- d! `# n$ `0 y
if @.occupied then% c1 j) c) g1 Z' t/ j
part := @.cont;
4 K3 J" p9 {4 ]0 h: @0 @ @.transpOrder := void;! m5 }4 W! r* u3 C& o* q3 l0 X4 n" B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
]# Y+ ~, s T3 x @,root.eventcontroller.simTime);
8 y, ]$ U" F& \/ W6 b- Y @.HasOrder := false;
?3 _- j6 z1 _ p% o! G) n& ^ @.DrivingHome := true;: K% e% K6 e$ g: u7 |
rgManager.tryToStartTransOrder;
7 f+ X8 {1 k: `* x5 U. @ if @.Destination = void
6 @8 ]; p1 B: ? then -- no transport order for vehicle @- D' ^8 Z# {. _: b; |+ {; ~7 s
@.Destination :=0 n! c& f. t9 F( c; C) X
rgManager.nearestFreeStation(@,track.~);
8 X" A+ O4 Z; W% a& v0 L5 ] newDirection(@); + m# `4 g T# P* c
if @.Destination /= void then) W" k6 U5 `/ g/ y: R* }* `7 y- S
@.Destination.NumReservation :=9 C6 l. p: ?7 R ~" h0 [+ S
@.Destination.NumReservation + 1;/ q) D5 i# u' m* t9 N0 ^* g+ y% e
end;( Y: Q9 q, J6 @9 t* h% q
@.CurrIcon := "drivingHome";; a7 O' B; A1 g- |! x. f0 W
@.DrivingHome := true;6 n- I4 a! A" h7 h9 E4 w
end;! J) L* g) {/ _1 e0 {& L8 O
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ ~& s7 @( x, R part := @.transpOrder;
- y& |- A, o3 d- w4 e: ~# O7 Y; ^ part.move(@);-- load part$ l9 @5 g& ?" N9 {8 Z
@.CurrIcon := "load";
/ {" J6 j( Y/ O' Y$ r8 y# D GlobalDistObj := part.globDestination;
+ C2 ~6 k0 J4 p: ] assignLObj := rgmanager.rgAssignL;
6 c" F2 f. d; f* F$ E row := assignLObj.getRowNo(GlobalDistObj);
4 ^: _" H f- \6 w! r1 S5 m) G4 g if Row = -1 then -- since 70( ]! | D( e- t) t9 a
if lan=1 then
+ V$ `: N7 a: f* ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 Q% C: ]' U7 r5 m$ z/ P. g0 Q1 |
to_str("in der Andockstation: \"",?.~.name,"\""));
+ R4 B3 ]7 D: m0 O* K& F) ` else
( c2 d+ [$ }" a7 U8 A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" R7 i" l) S* N6 t- e to_str("in docking station: \"",?.~.name,"\"")); ' T" |1 c1 {" R6 v0 q
end;6 p! O- H; N) \, I! P) Z
else" c% Y& D( Z* ]+ B0 K, c/ p) `( R# b
@.Destination := assignLObj[1,row];
& g! q- Y" Y4 T% \ end;
$ j* a; y) X6 [6 U newDirection(@);! B, Z: v9 E' d
@.HasOrder := true;
) ~6 B" t! k* |- e. m end;
1 X5 v' F" v8 i( ]3 p' ?8 L2 b' m8 X end;
* T+ F9 Q+ C3 fend; -- of the method
0 D7 p5 h! n' E" F# k |