/* called by: entrance ctrl of the object 'track'3 e. y1 m! W$ p& F# |; R9 o0 l
*/9 w1 ^/ a+ _0 T# X% F. ?& _
is
$ }3 @; |5 G9 m1 \7 g part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- E: L# C+ ^; y/ Kdo, u2 F6 h2 N& C8 n. o3 E
Lan := rootfolder.Internal.Tools.AOLlanguage;+ Q# Y3 C8 O+ [' K
if current = @.Destination -- else return
+ `/ b- o1 q4 B; K) ^ then8 h6 l' ^) P+ |1 t1 v2 N
@.Destination := void;8 E4 q8 w! z3 R, \
if @.occupied then
# F0 F7 h: z, W3 G C3 u part := @.cont;- a0 ?& [( }, I) t4 U
@.transpOrder := void;, p- G9 R4 ?0 A ^- y3 C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) J& k) q [0 [# B( Y$ T- P" e: X
@,root.eventcontroller.simTime);
# M- |9 t$ k4 d" G$ h @.HasOrder := false;9 m* r' O3 _" d9 J
@.DrivingHome := true;) V5 F# G7 f# R3 u5 w
rgManager.tryToStartTransOrder;! |% x0 [7 ]+ N1 P) N
if @.Destination = void2 [' R8 {1 ?- m z+ l' }
then -- no transport order for vehicle @) D+ E7 Z! q$ ]! r
@.Destination :=' d7 h- c4 Y$ k/ r! p
rgManager.nearestFreeStation(@,track.~);
5 D0 |' |! {$ I) |5 K newDirection(@); / z6 `- k/ d% g9 B) z7 o4 _$ D
if @.Destination /= void then
* k1 w; w" A3 m5 V1 _. e3 M5 h" L9 K @.Destination.NumReservation :=( S( U; U" z' r2 n
@.Destination.NumReservation + 1;# X9 ~* B0 c7 J0 w
end;3 A- u* B. s* e
@.CurrIcon := "drivingHome";& E, `, h; \3 s/ p" _- m
@.DrivingHome := true;, r1 M5 e% d; o6 F/ p
end;
, A C: x9 M T' G else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ |1 c+ ^6 Z7 r I
part := @.transpOrder;
$ ] Q+ r' u K8 _2 x5 c part.move(@);-- load part: w, D+ }# _8 R0 x1 S
@.CurrIcon := "load";
9 z) y2 }8 o9 R/ v GlobalDistObj := part.globDestination;
, g& F3 G( d: Y4 Z& E) U assignLObj := rgmanager.rgAssignL;) `0 v1 P/ a9 Q1 P; Q# b9 j' q
row := assignLObj.getRowNo(GlobalDistObj);6 ]4 i& _4 b+ e. B/ x/ {
if Row = -1 then -- since 70
5 q0 \0 ^$ f: P( f5 h if lan=1 then9 {8 Y/ k9 L4 W8 j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ s* R+ ~6 f1 B6 G5 Y$ R) ~- l: X& K to_str("in der Andockstation: \"",?.~.name,"\""));
$ \" q# e% d- b, S else
$ F$ n& M6 q% g5 T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. u4 {# K/ Q7 F; |$ E to_str("in docking station: \"",?.~.name,"\""));
/ U( z' p; D1 g' H+ |) @5 l3 } end;
. W/ C2 u2 Y: u0 s; o6 ~ else9 g$ {0 t; r. R( m2 R. q
@.Destination := assignLObj[1,row];
3 _2 o0 p1 A, q4 O end; ) w \: x6 Y9 Z* ?3 v
newDirection(@);! |+ L# H2 @6 S: T# L
@.HasOrder := true;
% r/ N+ q9 h6 s. C2 u+ m& J* d end;
6 q! O. d# K9 l end;
$ Y J: h. B' f! Bend; -- of the method
; x8 }) t" I# [& N |