/* called by: entrance ctrl of the object 'track', Y) U7 r; N; T
*/
l1 c0 y& x! A( P9 ais8 R w2 u2 S. J! f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 b& ~ O$ X: J1 N* Ado
5 X! k3 R0 N/ G% j2 C$ A Lan := rootfolder.Internal.Tools.AOLlanguage;) h1 j8 t6 i# c
if current = @.Destination -- else return: m& P x% a1 o% P/ Z5 d6 `
then
Z1 Y. b$ `) A' ~2 N @.Destination := void;
+ {# D* R3 U$ [- J, B if @.occupied then* L6 h# L6 d" N
part := @.cont;3 A% S4 l: c0 G4 G
@.transpOrder := void;8 g L3 C" h. V/ Z r# [
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 N5 \0 k0 J$ H: T8 U @,root.eventcontroller.simTime);* N4 u2 Q U* u: F; ^
@.HasOrder := false; |5 U" w$ K$ i' q( s
@.DrivingHome := true;
2 @; b. S# V+ G- u rgManager.tryToStartTransOrder;
1 m8 O3 F: i* X2 T0 `7 @ if @.Destination = void; z( D2 T. S/ w2 ~' ~
then -- no transport order for vehicle @
" e. _# z- a( ?( e( g; h% f @.Destination :=
! v- n9 P( |9 b: L6 P( O5 O: \( ? rgManager.nearestFreeStation(@,track.~);
9 V p7 d3 k; Y$ }" ?- X; i2 I newDirection(@); 3 p# h1 a* Y' J3 ]
if @.Destination /= void then
2 v R3 L5 G& a& D, N @.Destination.NumReservation :=4 a! b; A, k; Q" C- Z3 a
@.Destination.NumReservation + 1;
- J$ P4 A# @* h3 |( q- R, P0 g end;! e8 j( f T" [( ?' p6 {5 V
@.CurrIcon := "drivingHome";4 f) ]2 Z9 {5 j1 ]8 j
@.DrivingHome := true;
( l+ s/ m; g7 `& w end;
1 j$ O3 N3 z# ~% K else -- the vehicle @ is empty, both vehicle and part are in the same dock station! w7 n8 G/ G, C& E' X y
part := @.transpOrder;! S% Y4 k2 A1 G( P
part.move(@);-- load part
1 _, k& A! C5 Q0 u @.CurrIcon := "load";
, \& ~/ d4 O" m9 k0 g4 D0 L; v GlobalDistObj := part.globDestination;
8 G- y3 s; f+ ]9 T4 v V6 K assignLObj := rgmanager.rgAssignL;; `$ A# {# C' J" C: R
row := assignLObj.getRowNo(GlobalDistObj);+ Y, b! P) W# c" N' I8 O, b. N1 P
if Row = -1 then -- since 70
/ K l: x8 F* s) o if lan=1 then
. r/ t! i' ~: ~- } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ J4 U, w, x& k7 b R( h8 G: ~
to_str("in der Andockstation: \"",?.~.name,"\""));
. H" f5 I5 V: j9 Q+ [! |* T else
; \' E- B1 e# p, p- I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 {) \. ]$ D. y$ N& ?/ O to_str("in docking station: \"",?.~.name,"\""));
; l6 v& b# Y- t8 V9 B0 R end;$ I. E8 j6 W0 B6 L
else
$ z! \: g5 a q9 M+ O @.Destination := assignLObj[1,row];" {( U% L3 Y# g9 [5 z3 x
end;
- H( R5 f1 ^; n& {* ~ newDirection(@);
4 v8 }9 ?$ q3 G9 g @.HasOrder := true;
: O; s; B) o) d/ N, u2 I end;
: c; J0 r) B; H; S end;
; `+ ?! g0 |8 i3 a; ]# J( |end; -- of the method
- d. R, O' B$ V |