/* called by: entrance ctrl of the object 'track'
3 q% _7 G$ N- R) d$ Y0 r*/- J, q5 r" a. W. q* h& U
is
' Q Q& w9 z+ r( w, S& V part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 w5 m- K/ `8 O& a% _( s6 |
do
6 X0 ~2 q4 d2 u. q# j3 ~ Lan := rootfolder.Internal.Tools.AOLlanguage;
! D3 y* b; Y/ z! T2 ?9 O h" n if current = @.Destination -- else return1 s; ~4 t2 a0 C; \( P; U D9 F6 m
then
$ c- R z- d( Q+ B, x. Q1 S @.Destination := void;
- K3 R8 m% k: K if @.occupied then
) c, k# Y& O, \" j3 Y, F part := @.cont;6 J* V; W% k2 ~/ S7 Q* ^1 A
@.transpOrder := void;
+ U! Q) ]1 W \" H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 O5 Q; p" _9 ^# y5 w( G
@,root.eventcontroller.simTime); ?. k+ D* ~4 R4 V- Z0 B
@.HasOrder := false;
' N+ M, Y5 \+ m @.DrivingHome := true;2 Z8 e P3 u, R( }( I- s
rgManager.tryToStartTransOrder;; H) c% } n3 S! y; d
if @.Destination = void* [! l* t% V) ]" j. r6 v
then -- no transport order for vehicle @
* f- x/ l9 @3 O+ c" W+ ^ @.Destination :=
' M) x/ h2 a8 T0 V. A rgManager.nearestFreeStation(@,track.~);2 P6 C0 P4 A/ b
newDirection(@); ' [( x/ H+ z/ _1 H& \ B7 {
if @.Destination /= void then
0 V1 a0 A. T# J& V- k @.Destination.NumReservation :=% X7 P0 s/ Y& `
@.Destination.NumReservation + 1;
4 A1 E* t8 W+ R8 E. @ end;
, M* ^9 j& _4 A1 i# X* r9 e M& P @.CurrIcon := "drivingHome";
) l2 a' N& x8 u o @.DrivingHome := true;3 }( A% K/ T2 v* ^5 C
end;5 U4 d P1 c4 C, I8 B+ z" c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" h% v. z5 m |( e
part := @.transpOrder;: g. B D6 `2 x; `- o
part.move(@);-- load part
8 s- D: y Q, R+ m! Q: O @.CurrIcon := "load";
1 R; g4 \7 @8 i: k: g GlobalDistObj := part.globDestination;+ e: k( T5 r( P8 \0 {, i
assignLObj := rgmanager.rgAssignL;7 u/ C: x+ p5 t4 \, X
row := assignLObj.getRowNo(GlobalDistObj);! U& J( V# s9 l& E- N. H% G
if Row = -1 then -- since 70
8 f( n' m0 U' |# N! x if lan=1 then
; c% w, T; ] y' A promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' a. [+ _/ C9 E y S6 `' O
to_str("in der Andockstation: \"",?.~.name,"\""));
% J! R1 S2 E4 T" a M$ h else9 O' l# b+ Y4 s7 F0 Y3 c
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( X# N0 } n) B2 }
to_str("in docking station: \"",?.~.name,"\"")); f) [5 w- \' u9 @2 o3 @4 a6 v* j
end;8 {( w, k: k, O5 C1 U/ S: M
else& W: A) x2 y+ K4 t! O5 s
@.Destination := assignLObj[1,row];2 X" x6 Y/ f" ?# Y }( L# A
end;
+ _/ D( a- i5 e4 F% [ newDirection(@);( X$ H" l% I0 a+ X
@.HasOrder := true;
7 ^0 M; q1 L' F end;7 e: x6 w( J/ T8 H. J) N
end; h" ?+ l' K& S
end; -- of the method
9 Z- T+ P: s3 `) x# Q |