/* called by: entrance ctrl of the object 'track'; L: Y7 {5 X( @2 r' t! b6 u, b
*/
+ z; Z; x* U" ]+ y( yis: X) L* I4 n6 ?
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( Z0 H1 P s! W6 |# ?$ n6 |/ _do& D, ?' u! y/ F0 t: O+ m- J }
Lan := rootfolder.Internal.Tools.AOLlanguage;* ~$ A2 Z; Z) L5 I+ M
if current = @.Destination -- else return& s; j A9 b% `3 O/ d. t
then
! c' v3 [6 `* p( b/ K& F @.Destination := void;
7 v0 x5 M8 U L9 k if @.occupied then
# O! S% D# [* B c6 @7 C0 `6 l part := @.cont;8 B+ n9 e2 d) F: |1 c
@.transpOrder := void;7 h$ {/ d! ~" D0 U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& ^; i3 t" v2 `. z! x$ I1 L @,root.eventcontroller.simTime);
q/ o+ T/ @" P4 b! c( z @.HasOrder := false;) H( B7 e2 [9 C& z6 A4 v
@.DrivingHome := true;
) j D+ A9 x3 L1 M$ E8 R# W, d rgManager.tryToStartTransOrder;
$ ]/ h2 h& b4 A9 F if @.Destination = void
8 `# O% _- u+ y: Y! ~$ M then -- no transport order for vehicle @
0 _* d3 {* T, D+ F0 O E @.Destination :=: h# n" T- d1 Q3 {
rgManager.nearestFreeStation(@,track.~);: w$ V4 y# X8 `4 ?: O# N
newDirection(@); T% f) s2 F; v8 ^, ]5 k
if @.Destination /= void then+ t! D1 r* C8 {
@.Destination.NumReservation :=
% v$ Q. e! j/ h! s @.Destination.NumReservation + 1;
6 Q0 M% R8 E- J, {$ T5 @$ l end;. z6 Z, d7 \& U2 O/ x6 y
@.CurrIcon := "drivingHome";& f1 s) E' |* _: O
@.DrivingHome := true;
" N! n5 f2 n' h$ e: _7 Y end;, X3 Y8 @, u# h6 ~. `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station r/ @7 B" R y' d9 q/ H/ H
part := @.transpOrder;
/ j: F% x$ ^4 Q; x6 ^. H" J6 m part.move(@);-- load part
. H- J. D2 _" l6 m @.CurrIcon := "load";
M1 Q# N, P7 I) u1 y9 Q* M) p GlobalDistObj := part.globDestination;8 E6 E% ]3 T: p( f( v
assignLObj := rgmanager.rgAssignL;
! Z- O5 U' q7 s2 `. t row := assignLObj.getRowNo(GlobalDistObj);
, M1 e, ]2 D6 Q2 }& i if Row = -1 then -- since 708 \: [% u h1 H: S+ |# b. E
if lan=1 then9 e2 _# F) G/ ?* U. {% }
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 D+ v( `% @# w d
to_str("in der Andockstation: \"",?.~.name,"\""));
* Y7 v( Y( ?9 L; c5 R2 M else
; K+ d2 Z0 ^- Y% \8 g: ]) l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" m6 B `! W% z0 w( a to_str("in docking station: \"",?.~.name,"\"")); . h; k/ J, ^& O3 w
end;
9 Z- p# q6 L1 _* q- i+ V, C3 T else
9 ?' Z" r# l: O# V @.Destination := assignLObj[1,row];
0 f# N L. P' g8 g% J4 [5 i6 O end;
* t8 R* h; }6 J newDirection(@);
- M; C8 P2 B; y5 d @.HasOrder := true;' d) v% y$ n4 O7 X: o, y
end;
/ l$ C8 l: o3 X$ w# x' l6 E end;# ^* i/ r% T, d0 e% T
end; -- of the method
( z6 v; O. W2 L4 S { |