/* called by: entrance ctrl of the object 'track'
: {& a4 s: ~: K& D5 N*/. |( H% U! f T- p1 [- s' f5 l3 Y8 \
is
* X$ L; r: |/ Y" D" X: u) }4 t" c part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- Z5 [- c: K- A2 U( i0 v9 u( Kdo
* k4 @: A# j" H% H* V, W% f' \ Lan := rootfolder.Internal.Tools.AOLlanguage;8 S! W' F. T: E+ u5 L1 U
if current = @.Destination -- else return
, U8 d- n4 @, U8 u then
! `6 _( ^; {: ^ q3 |! ~ @.Destination := void;' b4 M5 E" ]/ s7 Z2 M5 z
if @.occupied then
- y1 F1 y7 Q* h part := @.cont;
5 ^6 q2 N+ @6 q3 C/ q' ?! i @.transpOrder := void;
3 G+ u, ?9 Q ^1 m* _5 X2 u( {3 L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" W0 [% P# H& u4 O1 ] @,root.eventcontroller.simTime);
. t6 ^8 {9 N$ O, {# t. b3 ^ @.HasOrder := false;- C+ a# x, ^5 c& l) n) S
@.DrivingHome := true;
F5 X3 \3 _. ~7 n4 x& B$ D- C rgManager.tryToStartTransOrder;
3 T! j7 C7 l, B if @.Destination = void! p1 D( x: ^8 R W6 |" q
then -- no transport order for vehicle @2 o, O7 B! y1 y& H1 P# E5 s0 g7 }
@.Destination :=1 u5 U2 ~2 P- S! m! S7 l: B
rgManager.nearestFreeStation(@,track.~);
4 K& ^4 A5 _. ?0 \& g newDirection(@); : y- X m( x9 d
if @.Destination /= void then! _" b" u" W( J4 z8 u, d( C0 r
@.Destination.NumReservation :=
* T- R0 [, _, z2 g! z7 k @.Destination.NumReservation + 1;
. F& V6 F# y' g+ y, H. a end;$ {& E B9 r$ _. q- `! E
@.CurrIcon := "drivingHome";1 ]( w' c u" K/ l' b. v
@.DrivingHome := true;
- Y @. ?% Z; H( [ end;. q; \) E$ M0 N( _4 }. B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- ^% ~4 v6 |. R+ A6 Y4 w part := @.transpOrder;
3 n( y" }6 B% b$ }; G4 ?' V part.move(@);-- load part8 P; R/ h8 a7 p$ e5 Z" L. x
@.CurrIcon := "load";
* `; f6 A% | y GlobalDistObj := part.globDestination;. d' O" n) [$ x# ~( G% B
assignLObj := rgmanager.rgAssignL;7 R& U3 Y5 G5 P4 p% U! B' y$ u- l
row := assignLObj.getRowNo(GlobalDistObj);
' ]6 o6 ~1 j1 |2 P if Row = -1 then -- since 70
2 E6 ], E5 ~% c& R; Z if lan=1 then
6 b; X# G( u: [! f& c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 q" {* m8 p' k) m6 q to_str("in der Andockstation: \"",?.~.name,"\""));6 O1 v/ }: R8 ^- n" c0 D! \; t
else, @+ @2 g; G- X2 U* i. ^* G; C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& Z5 c: u$ S, q
to_str("in docking station: \"",?.~.name,"\""));
" Y$ {9 u: p; w, H5 g0 E: D end;/ ]4 S$ }' _: j2 w6 ]. A4 R
else6 T& i" @) A g0 y. G
@.Destination := assignLObj[1,row];% w/ v* `! ]( _3 @" e: b
end;
) @# W3 m# R j newDirection(@);
" S2 ~0 v5 R) u& g* p( k2 _# p @.HasOrder := true;. ^) J9 r" l9 g' r2 \
end;
( x- s3 L5 G% l/ G+ `- w end;, |8 d' e( T7 o
end; -- of the method0 O+ @. |, z6 o" {) H- N
|