/* called by: entrance ctrl of the object 'track'% k" k% N1 C. ]3 J# p' q
*/
" x9 O( I5 P" ^1 t% e5 P3 a% |is
" Y, ~. D1 {1 H! }6 ? part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 s9 `( C% o2 z3 jdo U* J0 ^' }9 H* k
Lan := rootfolder.Internal.Tools.AOLlanguage;3 H1 B5 d5 T2 r3 w* Z- `+ Y
if current = @.Destination -- else return
7 ^! h7 i1 Y1 N6 N then: |! l' \; ^, u3 A2 {& J1 }. n
@.Destination := void;7 r1 k' w0 c) C9 A" l0 f
if @.occupied then8 i' _! _ N$ `" F* g J
part := @.cont;5 ]1 n/ _" Q, {+ c$ K, Z6 j
@.transpOrder := void;, R/ Y5 C/ d0 z! `, J3 ?& H/ ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. n( y6 U8 o; ?7 }3 E3 @ @,root.eventcontroller.simTime);
4 t1 e: i/ C* K$ r& x# q) W% l. f( n4 Q @.HasOrder := false;
* ]( T% h6 t1 |/ Z" O9 ~8 K @.DrivingHome := true;0 X2 y2 f# Z4 m+ o! r
rgManager.tryToStartTransOrder;' o# c+ k+ Z1 N4 u
if @.Destination = void9 O4 k8 R7 r; w- u* S4 O: g
then -- no transport order for vehicle @% c$ P+ O1 c* g* V& u; v/ j
@.Destination :=
" |' E% j! a! u3 u8 y1 w rgManager.nearestFreeStation(@,track.~);- t$ P( B/ f; a+ s
newDirection(@); 4 M, t8 `1 X- k$ S5 W6 C
if @.Destination /= void then- w7 P. p, b# S
@.Destination.NumReservation :=5 J, w8 F' j+ L6 I) i
@.Destination.NumReservation + 1;2 z# n9 v2 W+ h9 H
end;
) s( Z {2 H$ C2 l @.CurrIcon := "drivingHome";
. c% {4 z$ z+ c0 a* X$ G3 I @.DrivingHome := true;* X3 v0 F' l, A$ [4 R( l$ `/ y
end; y8 Q# f2 z! @3 [
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; v3 O' D% `( V3 L
part := @.transpOrder;
/ J, R- b. \4 d( _$ ?7 X2 x: N" h) I part.move(@);-- load part
9 M/ ?2 j- l* X2 V U @.CurrIcon := "load";
! ^2 I# g. c6 V# e6 U6 \7 g# P( ` GlobalDistObj := part.globDestination;0 Z/ y, o" L U# {; D4 N1 d8 D
assignLObj := rgmanager.rgAssignL;
' j: z- c: b5 j+ Z row := assignLObj.getRowNo(GlobalDistObj);
7 q% D, M8 K% r- B% \ if Row = -1 then -- since 70
- d( C" T, z( s$ Z R# ~1 ` if lan=1 then
$ e! l3 S: _$ a& Y: g3 \) E promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' B7 I4 C+ K0 @2 d- w6 l
to_str("in der Andockstation: \"",?.~.name,"\""));' a0 M6 S! B- e, L' B
else
8 y* j0 z: B E0 u4 c( Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ m" H( H# I8 I9 d( c( W3 Y to_str("in docking station: \"",?.~.name,"\"")); ' Q z7 C8 T6 Z2 F V
end;# B* ~/ ~1 l& B& R3 N7 c- c
else
0 O7 r6 L$ j& x' s& j @.Destination := assignLObj[1,row];! K2 m/ F/ O: u- G, O$ C- l- H3 z
end; ! V3 w$ K. ]3 Y- y7 J/ |* |
newDirection(@);
& ~; L& x+ r$ f @.HasOrder := true;
3 A( |1 X d4 E+ ?# x: Q5 r end;. l3 i. x5 {( e6 s( c4 z! H
end;9 U9 v6 a( q( }
end; -- of the method
. n# u" |' K* H* W% j$ j$ J |