/* called by: entrance ctrl of the object 'track'4 u8 t* J4 ^) E' w8 U7 V
*/
+ x. c- u. M- S9 H+ X4 cis; l3 Z; e4 z8 X9 T' U9 F
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, P7 S% ]8 L) p9 a) W" j7 ]
do# `( y7 u5 d% ~5 f" v; J5 i: D6 p" |% z: @
Lan := rootfolder.Internal.Tools.AOLlanguage;# z* k' Z/ o. @8 C4 \- V
if current = @.Destination -- else return# Q$ e0 `/ l d2 a" g; i
then8 ^4 [+ G5 d: o/ k, s+ j
@.Destination := void;
" b4 @6 o& t* s. o) E( j if @.occupied then2 E( e4 N w/ Z5 Y5 C5 x9 D
part := @.cont;$ @5 y9 C( j2 o* ?. m9 A" q* x. R
@.transpOrder := void;% F" K/ H1 Y* F, [1 c0 n4 ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; J2 K6 V/ D) M/ [6 q9 @3 ^
@,root.eventcontroller.simTime);/ ]7 ]% r1 n8 E& c( Z1 X% G
@.HasOrder := false;
% g6 m: l) d7 W$ Q g/ b @.DrivingHome := true;
; a1 [1 l' `6 D9 t9 I- P rgManager.tryToStartTransOrder;; g v8 D6 l$ O* V. f; {+ y! K9 c
if @.Destination = void
% K* ~, |" }+ E; f" |/ E- a8 C then -- no transport order for vehicle @2 Y$ U$ ~, s/ `$ h% b: J) r/ n
@.Destination :=4 C& Q& }& L4 F' d& s* a, Q3 `
rgManager.nearestFreeStation(@,track.~);
, D/ p) n2 d" h% \ newDirection(@); _: P: ~( l" c
if @.Destination /= void then
* X8 P) o- o% D0 a @.Destination.NumReservation :=
0 [, `3 U# t" b8 b* D @.Destination.NumReservation + 1;
5 X0 y8 c% y% D/ ?# T end;2 q5 X' }1 f% m6 S: k: w$ P0 h3 [
@.CurrIcon := "drivingHome";: s7 J* B& g# _) p" O/ ~" S
@.DrivingHome := true;- R* O! O" N' `& R
end;! t& c. X! C9 l! E: n/ f1 G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) a7 W# B' P2 f" p2 k. W2 X part := @.transpOrder;5 |8 J- Q9 p; u2 b
part.move(@);-- load part
+ Y% y7 u* K5 W0 ? @.CurrIcon := "load";+ C, q$ _* P- t* Z. I4 j
GlobalDistObj := part.globDestination;; S# w) r- Q" a5 c! q
assignLObj := rgmanager.rgAssignL;
5 {) x; U! I; ~* e row := assignLObj.getRowNo(GlobalDistObj);
: \7 s- ]8 Q9 v if Row = -1 then -- since 70
- p9 I- l0 w) C* v; j$ r8 o& o2 C( F if lan=1 then! y2 b4 u# o. W+ {% }$ s& q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) H" x% o: C) K- y1 i+ G% Z) O$ n to_str("in der Andockstation: \"",?.~.name,"\""));
" M% H9 J/ |2 @& I) |- a else
8 ], X6 t( T4 K: Y t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) E2 T$ ?* Q' O' y# f9 {* e to_str("in docking station: \"",?.~.name,"\""));
$ u; C' Y: E# c1 ]' Q% L end;4 }3 X! x8 W/ ~! v! [; O! V
else
" G& j5 b; c* [# V* F" f2 s8 Y8 ^ @.Destination := assignLObj[1,row];
3 s4 h& p) Z) G2 h end;
m) s! G$ ~# Y- B( c: h newDirection(@);
/ ?1 W$ ^" x; \# o @.HasOrder := true;: J2 Q9 j3 y. \: P& b# p
end;' v% H6 x2 P8 N$ ^
end;
& N6 b" W v8 c5 J& Z* P mend; -- of the method
7 |) r: ~2 T5 a% W8 { |