/* called by: entrance ctrl of the object 'track'7 t7 b2 g, V6 E& t1 j) f0 B
*/
, f% v9 _% j8 H- O7 Z# M0 f2 mis0 Z+ i& I. i$ W" p% O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: I" {' ]) _( O& b6 |' q
do5 D/ D8 O' v0 M/ O+ X0 \3 O# H. |9 ^ P2 }
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ Q: F; e* Q6 s( x" N& ~ if current = @.Destination -- else return
3 m$ C8 J' ^4 I+ @: s! _ Y8 F then, [( @6 \* }" B2 M
@.Destination := void;! a4 Z% M/ t" ~( Q- G
if @.occupied then
/ c" M! {. k+ r part := @.cont;3 ?. N$ p D& m: C' C& X( B3 d
@.transpOrder := void;
' r) N5 w3 a* } part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& {$ j; G- T. @, ^2 c1 a& G @,root.eventcontroller.simTime);8 Q5 ~3 M2 y, f7 v
@.HasOrder := false;, _5 N: w6 X* G6 E4 t! _
@.DrivingHome := true;
7 y' j5 Q8 s# ^# ~* B+ H rgManager.tryToStartTransOrder;& Q0 g+ @) a, ^
if @.Destination = void
6 I0 R% F8 t/ ^/ J! i3 U, f, V; y then -- no transport order for vehicle @" @# D4 K4 u& P7 v X8 L
@.Destination :=, R3 K2 k2 ?4 T( T+ h" V0 V4 R. D
rgManager.nearestFreeStation(@,track.~);9 C% A) i z) H( M' V; |6 L
newDirection(@); , Q5 P/ r0 I0 z$ C4 Z
if @.Destination /= void then
3 l( q5 g+ A! [3 N+ R* X4 ?4 t @.Destination.NumReservation :=
1 y0 T4 B* D9 z# \8 F) F, [' r; z @.Destination.NumReservation + 1;; c9 y @! U' N6 C
end;5 o# i, T5 s; j3 v" P0 @
@.CurrIcon := "drivingHome";0 \0 ?+ Z6 D0 a8 v0 [3 R5 v
@.DrivingHome := true;
' `3 E; E7 t0 ^: Z1 l end;2 T) K! K$ s/ t. f8 }( D+ j# M
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; X0 ]1 W8 l; o- d: ?
part := @.transpOrder;8 Y( h+ M2 N% ~" {' t; b6 Q
part.move(@);-- load part* r, S( D; S9 @6 p6 e5 n
@.CurrIcon := "load";
$ P& m, B. {$ G* y# D9 X, ? GlobalDistObj := part.globDestination;
) W) J2 d- v- Q assignLObj := rgmanager.rgAssignL;
# W% @) q8 l4 N/ }7 Q row := assignLObj.getRowNo(GlobalDistObj);1 O+ k/ \" D$ T; o$ R& g; g
if Row = -1 then -- since 70
3 W; Q) J7 A5 p, J$ q if lan=1 then5 d$ C% E1 N/ m0 ^9 N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, |, Q/ `2 L- P" f/ W to_str("in der Andockstation: \"",?.~.name,"\""));1 ]" U5 n& ^* i9 H3 ~3 v' @9 Z
else
" W& O& Q: y% ^5 [6 w- |" }) ]$ ] o% r promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 t$ ]) C9 U. A V$ g, O, m& ]& `7 y
to_str("in docking station: \"",?.~.name,"\"")); % {& X# r \+ c# K: m
end;
+ P/ i$ p$ g: b8 a) Z4 Q else
; j! _8 q" s6 ? s0 g7 z @.Destination := assignLObj[1,row];
* ?8 ~; [3 |" |3 Q7 V" v end;
/ F% _( Q' k$ f( ]- z newDirection(@);5 [' T2 p* X* E; F
@.HasOrder := true;
+ {3 U) O& S# ?# U end;. o, X# G* V8 h# q! I& D
end;9 i3 @% d' v, S/ [# `0 Q* R
end; -- of the method
3 o' ~3 ~" I- C4 L: K' S |