/* called by: entrance ctrl of the object 'track'! g# _: L# p, p
*/
: R; K; d3 d m+ Lis
+ h1 I2 x w W part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ n" A5 d/ D, F3 X& g8 Wdo8 \' H8 `8 a0 a0 G( u
Lan := rootfolder.Internal.Tools.AOLlanguage;
; s$ H8 o$ G+ _ ~6 T8 G if current = @.Destination -- else return+ \' ^4 r% E! x6 s) @. u4 ^
then
- |3 l. Z5 r& X! y' n: o; { @.Destination := void;1 G ` s6 _) N% h4 Q
if @.occupied then
# F9 \9 Q$ i) E; c* l- S0 x: M part := @.cont;
4 h6 a. ]1 T3 g0 w- g$ q @.transpOrder := void;
" ]+ N/ z! S; f% _, t: k7 W5 P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, H" L+ s3 T* Q+ }: X
@,root.eventcontroller.simTime);
8 d' a/ M5 |3 N0 T( q/ H$ o @.HasOrder := false;
/ p- x0 Z4 i- E* B7 K, [9 s: K @.DrivingHome := true;
& p- ~ r6 q9 N7 c5 u' k/ Z# H rgManager.tryToStartTransOrder; A$ l0 r* h; F1 q$ Z' `2 p" t. y8 E
if @.Destination = void
$ U( g) \2 u: e3 a. l$ K( T D then -- no transport order for vehicle @! h. L) e9 _/ Y% y3 O, ]
@.Destination :=0 w+ p5 p9 `9 Q' H# Z. w2 J& Q; [
rgManager.nearestFreeStation(@,track.~);, |7 d i8 l, p# O# l' C+ M5 ^0 y
newDirection(@); 3 c) x: j. L: \% C
if @.Destination /= void then
4 r1 P0 f+ E, X @.Destination.NumReservation :=
: Y- U4 O# U: V @.Destination.NumReservation + 1;6 v U1 K6 V L/ H* ]6 ^
end;
' q0 s$ d) v( w1 { @.CurrIcon := "drivingHome";
$ J7 c; v- W: Q% e1 t8 y7 q4 @ @.DrivingHome := true;, ], L* H( t( K# o3 N7 o
end;" {8 U1 I& w0 P+ f/ s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 x' s( p9 M9 b- R4 q& V9 Z7 o part := @.transpOrder;: u! }7 s; G# Z6 X7 H
part.move(@);-- load part' ?; n5 ?$ ^0 W$ ?3 I' i" L$ ?
@.CurrIcon := "load";
! Y6 U6 e8 E) f8 d. H GlobalDistObj := part.globDestination;, D% R5 K( t, }* P; C4 o8 E
assignLObj := rgmanager.rgAssignL;
1 [ \. d7 i0 n4 ~5 E row := assignLObj.getRowNo(GlobalDistObj);) j- {% d7 \. w1 J `, [# r( R
if Row = -1 then -- since 70
3 Z- q, u% x. P- o6 l+ R if lan=1 then' m: h0 u& Z( E4 A$ f5 c! t P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 h2 L$ B. v9 E6 B
to_str("in der Andockstation: \"",?.~.name,"\""));
* C2 ]7 J1 }3 L% l4 D else
+ ~- D- [6 D/ M& c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' h9 V5 m ?1 Q/ N: k+ Y$ Y$ h
to_str("in docking station: \"",?.~.name,"\"")); + t# ^& }. }+ c
end;2 g' T# B# ^) U
else
% V6 q# S" q7 s# N8 P6 |" ~9 b) N$ t @.Destination := assignLObj[1,row];3 X, [9 K7 c. b
end;
1 [# g/ f" }2 z4 e/ K& d3 B! J. Z newDirection(@);; c! g. v: L: j& g+ p9 m' l) Y9 B: W
@.HasOrder := true;
$ r/ `+ M, F0 Y' L3 M. H end;
! K: h2 U3 U$ s end;$ F" s8 e1 q' D+ x3 n% v; j( E
end; -- of the method
8 `! f' v0 F, e$ y( E) ? |