/* called by: entrance ctrl of the object 'track'; q u- f# G( o
*/9 I8 c8 a3 y- L5 l: W
is
0 r7 t8 }4 t* e0 X4 t part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, U( C' U' I7 V4 I7 Z5 Tdo+ b! _5 {; U5 I$ M5 r
Lan := rootfolder.Internal.Tools.AOLlanguage;0 J% B- W. G. [* I1 R1 Q
if current = @.Destination -- else return1 I) N5 N8 N) X9 U; I p
then
$ u$ w/ f: j3 ~ Y @.Destination := void;. H8 @2 G" A! ]& B. g1 t% D7 Q$ ]
if @.occupied then
: ?5 t# F4 }; }: G9 A" m part := @.cont;; q1 `/ q h8 K* |
@.transpOrder := void;% a; s: e7 F1 e4 w! H4 R% x
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ `7 k- A. H4 C" o( e- g @,root.eventcontroller.simTime);
/ } U9 H- H. E! B. p) } @.HasOrder := false;- H5 D' l3 `. B: X6 d$ b% C
@.DrivingHome := true;# q3 w+ y! K& l! A) b( ~7 C
rgManager.tryToStartTransOrder;+ k( p* O0 s8 l( O) d6 R
if @.Destination = void
+ [& w' U: T/ ^9 A# G" O' r- W* ^ then -- no transport order for vehicle @" h$ G8 j9 N O4 T. b7 T
@.Destination :=. c. t, z: F+ X" _7 C9 d6 Q! [
rgManager.nearestFreeStation(@,track.~);/ J+ M: T) ^" B3 g" O
newDirection(@);
8 s- v! r% g# y if @.Destination /= void then. `1 z9 t4 B! A: l; c- }
@.Destination.NumReservation :=
% Q! f# R9 }, u: G/ s @.Destination.NumReservation + 1;. S2 j) D1 C0 a$ a
end;
' }5 z+ d, n8 v R$ ?$ W @.CurrIcon := "drivingHome";
4 Z X. v9 y& t% D! w8 S @.DrivingHome := true;
0 l) G' _0 I+ N6 ?0 y, ~+ y! K+ A end;* y( X a. |8 T" x/ d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ d: Q/ {' L* B5 u6 K& _
part := @.transpOrder;
?) k. x$ w& {4 ]4 m% `+ Q3 e& V part.move(@);-- load part
7 ~* ?' ]4 |5 X h6 Q! r @.CurrIcon := "load";: w) \ ~' W( K- f6 `/ @ R9 n
GlobalDistObj := part.globDestination;
5 s* K7 S5 E4 [ assignLObj := rgmanager.rgAssignL;1 C- H0 [8 \- O V$ x) G
row := assignLObj.getRowNo(GlobalDistObj);
" `3 V) h/ p3 ^8 k if Row = -1 then -- since 702 I: l7 ]" R( V5 |+ v- ]0 y0 N
if lan=1 then
. ^4 G D/ F) ^* s$ @4 N, Z A promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ @; X; l8 X) k
to_str("in der Andockstation: \"",?.~.name,"\""));6 y" b5 [& Y2 u' f5 m: e
else
/ G4 r2 }6 W, {: H/ c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( H4 F X$ ~" }, n! i* A to_str("in docking station: \"",?.~.name,"\"")); ; G; Y# u5 h9 r5 [$ `% r! a& d
end;0 \! {3 |0 M( B1 y2 k" |* b2 c' ?7 L
else
7 O# z" ~( y% f9 W! e% A( P5 Y+ o. M @.Destination := assignLObj[1,row];! F7 i+ [ o7 J" b9 V/ g
end;
) O! }# ^: b2 L newDirection(@);
" A' s* p1 n, Q1 m% O/ Z! D3 X3 A6 U @.HasOrder := true;- D: |$ _( A" R9 D% | h
end;" Y. O7 f5 W4 d! T
end;
8 w n( c# \ x' L/ L, X" pend; -- of the method
# i4 G( H5 P& Y! U |