/* called by: entrance ctrl of the object 'track'
9 }3 ^2 |) Q5 e2 Z1 ?' ^0 r*/
- `% r3 ^& }; j: Ois
7 P- z" z" Z! K/ ~( C3 f* r/ _3 @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 z7 S7 _& d+ @% W
do" I! D( h7 X) _* Q1 j
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 C2 T0 P( M9 `. a2 R$ C; k8 \" p% z; Z' u if current = @.Destination -- else return
- Y2 G- m6 g7 u4 U% |) j then
% E2 W2 K5 n0 L0 r5 K @.Destination := void;
) a$ x" M) _7 F' u0 ?, j4 A if @.occupied then L& S" F; W4 c3 O
part := @.cont;* {/ }+ m* _! G0 q
@.transpOrder := void; o3 m# g+ I: e" {+ \
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 j. R+ c$ |# d3 {3 n, b0 t
@,root.eventcontroller.simTime);; k& h4 ^- I+ D- x5 G% G
@.HasOrder := false;/ M4 [/ t" Q! b. P/ y3 \
@.DrivingHome := true;
" r& O6 E$ w" m) Z9 E; F$ { rgManager.tryToStartTransOrder;
$ \0 c A8 W6 p' Z. @ if @.Destination = void v6 Y ] N9 j% @# O2 b
then -- no transport order for vehicle @
* L' z6 N0 B& b) m& g @.Destination :=
3 _8 B/ s* ~/ N. @ rgManager.nearestFreeStation(@,track.~);. S- T! L! }7 H! Q- }5 w- u
newDirection(@);
4 A5 n* p/ C: L8 \+ A+ @9 Q if @.Destination /= void then5 j0 y1 P z3 C4 ] E' U$ E! @) G# g
@.Destination.NumReservation :=
. Y3 b# F; W/ Q% K @.Destination.NumReservation + 1;
) Z- m: y' o1 R U, L# [4 i end;8 \% b, D/ U, W% j5 j. h
@.CurrIcon := "drivingHome";' H2 `1 s) S+ R' N4 G7 p T! M
@.DrivingHome := true;, D' P4 n/ W( F7 ?
end;
8 {, g& b. I2 j else -- the vehicle @ is empty, both vehicle and part are in the same dock station' m( j. s! R8 z+ y: b; _- g) U; E2 `
part := @.transpOrder;3 c3 i- E$ n5 n- K
part.move(@);-- load part- P* y. w. Q( e+ o3 t1 A4 G
@.CurrIcon := "load";, Z# o3 y; W, R) a7 O& S
GlobalDistObj := part.globDestination;6 T2 r/ h; P& e
assignLObj := rgmanager.rgAssignL;# X$ x9 E- n/ r' c# `' C. M/ n
row := assignLObj.getRowNo(GlobalDistObj);2 K( K- ?& r' |. y9 v+ a
if Row = -1 then -- since 70" {- f. k) v) s/ n$ }3 m
if lan=1 then
8 S0 `0 _) d; g& }2 s" g8 e6 N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! W8 }: H( j8 x, \/ i/ f7 c' p, X to_str("in der Andockstation: \"",?.~.name,"\""));# ^2 ?% g% g3 k' d
else. t S/ e" G, c: t" H; Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! G! K" V) M; h to_str("in docking station: \"",?.~.name,"\"")); # x' F+ Z; \" {+ N5 {, q; M" m
end;
+ C- [2 @ {& [3 T9 H) E else
8 _0 w. J7 ]( m. ?; E8 N @.Destination := assignLObj[1,row];
: @9 E) w% e+ x+ ?8 D( a! ^) ^' i/ D end;
3 Z' S3 I3 m8 K/ p newDirection(@);9 s) A: I) R* Q% A' D: j, v0 s
@.HasOrder := true;, b; x8 f! K" g" ]' k5 M i
end;
( o0 W, i) ~; h end;0 k# {( Y, J' T/ f; H
end; -- of the method
* g4 X2 n# W3 n- r, a$ I |