/* called by: entrance ctrl of the object 'track'5 X* _7 b' D p4 }9 q. j# n) G
*/. j# p5 c/ K# a7 k5 x
is* Q' K6 `2 D3 j' G5 g) j
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, y$ A! Q$ x+ G0 ~1 R6 L7 l
do
* U# U( W4 Q% S Lan := rootfolder.Internal.Tools.AOLlanguage;4 u& |' f# S% p5 s% c
if current = @.Destination -- else return5 C2 K( L! K. R5 K P& A
then/ w2 l: G0 U+ B0 G' ]6 ]
@.Destination := void;6 I" ?3 s. P* V5 v" `
if @.occupied then S/ `( t3 p% B) ~
part := @.cont;
. J2 ?8 H! P0 c: n! [& C! P @.transpOrder := void;
3 e3 }. Z5 L- s8 u! D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 ]2 g& @' H7 Z0 ^ B @,root.eventcontroller.simTime);$ e) A1 h* _! n6 f; |; k
@.HasOrder := false;3 f( W- A& P6 g' i+ S6 O
@.DrivingHome := true; k, j& a( S0 {, J x
rgManager.tryToStartTransOrder;
x+ T2 r. G. Y if @.Destination = void
) P! K0 [+ u/ l6 t then -- no transport order for vehicle @
" {& F5 H# o( i; z. [& U @.Destination :=! l$ o/ s* e( h
rgManager.nearestFreeStation(@,track.~);" X) f) g& I1 F% O7 Z
newDirection(@);
1 m: M5 L5 n/ J* A1 d( s; B if @.Destination /= void then. r' c! A% h/ W: [1 x x
@.Destination.NumReservation :=
- G/ t0 c( {: a @.Destination.NumReservation + 1;
3 |: t/ v$ S0 R- T5 y# | end;& P9 o n% M- l
@.CurrIcon := "drivingHome";9 v5 ? } M1 x+ e3 I- r: i
@.DrivingHome := true;
. B2 \2 B5 G( M' x end;* ?: B4 A1 U6 ?9 b# I& P; k* k* p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 x4 T7 B6 S1 ]7 N' \( n part := @.transpOrder;
) ~/ D/ @8 c5 k) I7 X part.move(@);-- load part
/ k+ T/ r0 ]% `( F2 n @.CurrIcon := "load";
) W; D' r0 l7 h- c GlobalDistObj := part.globDestination;
, ]! z+ r* N) G6 f3 W assignLObj := rgmanager.rgAssignL;% p1 g: z1 I6 C8 ~
row := assignLObj.getRowNo(GlobalDistObj);% j# ~( n/ |0 Q; Q, v% h
if Row = -1 then -- since 704 A; f/ M' Z9 v% F& @* h i
if lan=1 then. Q7 W7 O! G D4 x# L9 z- \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# i/ h" m* F) ?2 r' v
to_str("in der Andockstation: \"",?.~.name,"\""));# p! B, P2 {* g9 g
else
. }$ n, T+ b2 x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), G) z2 C x' T; R9 t$ p7 h
to_str("in docking station: \"",?.~.name,"\""));
8 u9 l! n0 N! s2 j0 F2 t/ t9 T end;
: b. }4 @! A$ w- f5 ^ B else' V3 P( o T' D
@.Destination := assignLObj[1,row];
5 D$ _# s' ^' C. m$ _. b, ] end;
V# S7 h$ t# c4 I% j3 _ newDirection(@);
1 b. _ U( Q7 N; N; Y# R2 W# U @.HasOrder := true;
: F5 k' z' L' o; \ end;' M& t/ Y& X3 N& L* R
end;
8 z' S; U) _6 R/ zend; -- of the method. e; [- a. u4 z$ L8 [+ T! o n/ t9 \
|