/* called by: entrance ctrl of the object 'track'
! p% K& Z! j2 j5 d*/
- F& I/ P$ O A! Eis9 R, |4 [2 _" F/ |# M8 A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. _* A- H0 V& _" h2 Ddo
, A/ O+ F7 V$ x" @# E; \ Lan := rootfolder.Internal.Tools.AOLlanguage;6 B1 M$ `7 Y4 K# m8 v5 X( a* u
if current = @.Destination -- else return
! e1 P+ ~0 T6 a then
- h$ G- X) w+ j; g O @.Destination := void;* s- {- l9 F5 D: K# {* B
if @.occupied then
+ j8 J+ w# `7 r' J0 x/ I part := @.cont;3 z; D; { M: T, ^6 g6 ^8 K
@.transpOrder := void;
% N- B6 p4 y8 C# z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' N P* ]' T4 t$ R( R @,root.eventcontroller.simTime);; g+ W8 P3 n- {. `4 ~* {8 E
@.HasOrder := false;# G; h0 ]* g7 _4 x/ ~& L
@.DrivingHome := true;; t3 t+ {- k& B: z$ V/ i0 d& }
rgManager.tryToStartTransOrder;
" q4 X7 N/ u* _7 D, J0 j if @.Destination = void
; p I- g! [% ~' }( R- e5 a' L then -- no transport order for vehicle @+ y* U, `- t& r& c6 U$ N [7 ?
@.Destination :=0 z" n! |/ e% n7 [& D9 N
rgManager.nearestFreeStation(@,track.~);
) { f8 E6 G$ d4 L4 C newDirection(@); % z% T$ A' z# a% d7 _+ t
if @.Destination /= void then
2 g; {& C# @( V W E: g$ | @.Destination.NumReservation :=
' Z2 j# ~; O% o, }( o) Z Q6 i @.Destination.NumReservation + 1;
* s, H" R: }0 J6 X- C end;+ S4 ^1 q/ v7 k) `
@.CurrIcon := "drivingHome";
; H1 y, }) w5 k @.DrivingHome := true;/ R' W& ` T1 }, d
end;: d9 |: J: {/ i+ N+ F5 h) {
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 e! w6 U' S: K6 `, b8 G part := @.transpOrder;
( I& _1 c/ O' o part.move(@);-- load part
J1 @+ Z& y* V5 Y0 s- v4 X$ \ @.CurrIcon := "load"; s2 d( a! c; x8 F2 K6 k( s8 f. k" o9 l
GlobalDistObj := part.globDestination;0 u. M: H# J2 B( b) O
assignLObj := rgmanager.rgAssignL;
$ V$ m+ d2 R1 i4 s& b row := assignLObj.getRowNo(GlobalDistObj);( t# L) @6 y3 d: \/ C* u' A: |- M
if Row = -1 then -- since 70
' ^) f6 W) u3 ~8 M9 l, M( k if lan=1 then( u& W& D# {, e- Y( w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, i( ]5 m$ ?: n% C! X& ~ to_str("in der Andockstation: \"",?.~.name,"\""));
- Q B( V- [) N% E/ L else
1 A' f: M: J3 a' | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) |) S! P4 \4 [. p8 a G to_str("in docking station: \"",?.~.name,"\"")); 4 j `. @& Z+ h; g
end;9 [9 M4 g) f$ q- a- W5 n
else
- m! B4 x% y$ Z4 I# [/ \# M @.Destination := assignLObj[1,row];- J6 U$ ~: l9 t# B
end;
0 N& @- e+ r! L$ G; ?, Z newDirection(@);
$ U, W& e) t2 d0 m @.HasOrder := true;
+ h- j7 @; x) ?& f end;
. M1 C* n, E/ V, G! Y/ Y+ e; ~ end;9 t* _+ c. z- ~9 I
end; -- of the method
' S* V, `. z \9 E/ i7 Y |