/* called by: entrance ctrl of the object 'track'5 U! x" \8 `9 X1 c( F3 g8 O1 @
*/
4 a0 C: N( a3 B; c+ b3 D. H& R# k- P9 e4 Y3 ?is, R9 ]9 ]0 M8 l. W
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& e1 O( P! x7 v& w* Rdo
, j4 ]" u+ O- } Lan := rootfolder.Internal.Tools.AOLlanguage;. C/ S N/ o4 [: ~, Q5 x7 ^+ Z
if current = @.Destination -- else return
: l9 `! p" R0 p# e9 ?" a+ t' h then- t; y! U/ q& O- v W( d% ?) R
@.Destination := void;
5 [; k2 Y9 V+ _ if @.occupied then p' c9 e) @) f$ K
part := @.cont;
p5 ^- e) o9 K2 S: a1 v @.transpOrder := void;
/ I" S9 k( M" T) D! D, ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ O4 L$ L8 ]& m1 g @,root.eventcontroller.simTime);
( f1 H6 H% H! P& T. }1 ^7 v# M [ @.HasOrder := false;
& I, `! G A% Z' j, e" H @.DrivingHome := true;, B" b6 b6 Z/ B0 c/ T4 l: P
rgManager.tryToStartTransOrder;
0 c2 h6 R1 Y' B if @.Destination = void
3 s+ k" }( n. M$ d) Q) W, j) i+ [( h9 ` then -- no transport order for vehicle @
+ i/ s3 ^2 S' l" t8 k7 S$ k$ x, R# j @.Destination :=5 D5 k/ W; C! f# z
rgManager.nearestFreeStation(@,track.~);& z/ v3 j+ Z; v1 G2 d( l$ ]
newDirection(@); 0 P! O4 t9 F# l3 X
if @.Destination /= void then
3 I2 G, ^) A4 l1 |( L @.Destination.NumReservation :=
# J+ N' }- {- V& f; \ @.Destination.NumReservation + 1;
, j' ~ |& I. L: c, J end;
4 `1 L# G) N2 F' I' L @.CurrIcon := "drivingHome";9 I. X: L a; ~: c. a8 k
@.DrivingHome := true;
! N* u2 g8 M$ d5 b2 A5 x3 A end;
4 x$ I ]5 U5 ]7 S+ M, E4 U else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- X! C7 B& S7 b( h" r part := @.transpOrder;
]8 Z' r! J8 X9 T$ r! G1 v part.move(@);-- load part
! F- k6 S+ b7 N" j( l0 A6 d @.CurrIcon := "load";' D1 G" o5 \; E! z) `6 ]3 B6 V
GlobalDistObj := part.globDestination;
- O" X, b3 _' O! y& s assignLObj := rgmanager.rgAssignL;
' E5 ^. k0 {- ]/ N row := assignLObj.getRowNo(GlobalDistObj);6 o9 ^3 [9 p7 a
if Row = -1 then -- since 70
; [) a7 {, P/ s+ ~$ T if lan=1 then2 Z/ a% Y1 B+ r- \+ c" d" y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 l" f# \7 S; q- q" J: ~* ], n to_str("in der Andockstation: \"",?.~.name,"\""));
- u, \ A2 v$ T4 M( M else
/ b& i8 \* O. ]$ Q' g4 w4 n promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; R5 `* k; L4 {7 l& S to_str("in docking station: \"",?.~.name,"\"")); 4 V1 H- t' h. l3 I# l+ g
end;
G/ F- Z. k& c* I* T2 u else# Q$ _* W6 m$ e% q% X; p0 S+ \
@.Destination := assignLObj[1,row];
! p! K- t* e9 e3 T end; : Z* t. m/ |8 R# R2 _
newDirection(@);
* M6 d" b7 K7 A" _- W @.HasOrder := true;7 v8 H f! Z( v8 n6 r
end;5 ]/ }, S: T1 K. V) `$ D
end;
* D$ l; U$ o8 P/ T9 D- A3 R Q! Qend; -- of the method1 U1 B1 z* K# U+ A1 _
|