/* called by: entrance ctrl of the object 'track'% O! ]- y' S: |+ L* P: }7 p/ P
*/
4 o F* T! e0 N4 s) Ais
- k6 n. W8 m' O part, GlobalDistObj, assignLObj:object;row,Lan:integer;: O$ V7 D) w( Y# k
do6 ~/ {3 z; \% d f2 N3 l5 {% G# L
Lan := rootfolder.Internal.Tools.AOLlanguage;# ?. X6 y; t/ o) |1 U' I
if current = @.Destination -- else return
1 }) F0 ]( a O W then
% [/ r m. q; {/ V$ d* S, N" d' _ @.Destination := void;6 t! [4 j: Y* N# Q9 }9 [
if @.occupied then$ h& }, U s% _: a2 O4 y
part := @.cont;, H6 ?* D$ J8 ^5 Y
@.transpOrder := void;
; m0 v5 C5 W# J2 e% K2 @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' U; }: q6 G% G) q @,root.eventcontroller.simTime);- F" g- m; Q/ h3 D1 V
@.HasOrder := false;, b8 N" Y4 w: }. q( o7 {
@.DrivingHome := true;
/ G6 T1 v" N, a( p4 Q4 m" a8 ?. | rgManager.tryToStartTransOrder;
9 H7 r9 W2 B6 c if @.Destination = void
, T/ S5 P# J: F0 n2 _/ A3 B then -- no transport order for vehicle @: Q; }) w) P, ^1 {( q
@.Destination :=
6 k# d5 P- S1 \! P, w rgManager.nearestFreeStation(@,track.~);' I e- p2 p* Z
newDirection(@); # T9 \5 X+ b/ ^2 r. G
if @.Destination /= void then) f/ N8 s4 b, `
@.Destination.NumReservation :=
1 D% C; j$ P, x5 @" o @.Destination.NumReservation + 1;0 L) W+ g! [6 T. h- _. m. e
end;, Z* F) s. R) p( P3 X0 z0 q
@.CurrIcon := "drivingHome";4 v, r/ E$ t$ N$ S
@.DrivingHome := true;8 j/ C6 U5 F; H2 T6 w: e
end;5 S! B/ J5 O8 C" T% ]) p( }7 Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 b% z A/ ]. `: e
part := @.transpOrder;
1 D2 q6 J1 {- W* T! G part.move(@);-- load part
( \% G' v) C: z @.CurrIcon := "load";$ T% N+ w( f. E3 s" z& b
GlobalDistObj := part.globDestination;# e: v) w. a8 r# y2 ?" B
assignLObj := rgmanager.rgAssignL;" U/ q7 h! o9 v: d. W/ L: Q9 ]1 e
row := assignLObj.getRowNo(GlobalDistObj);
( }2 |+ X: |5 f8 B if Row = -1 then -- since 708 ~, z( Q y4 a* j
if lan=1 then
, K5 g; Y6 m7 @, j) ^: W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' x4 t( w, L4 j4 A+ {1 q
to_str("in der Andockstation: \"",?.~.name,"\""));
) ]$ S* j1 s5 J6 o# ~4 I3 \ else
7 X# m) m! t8 [3 O5 b9 l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: F* e) i$ `# B+ z* W1 j' M- d to_str("in docking station: \"",?.~.name,"\"")); % L4 r* S9 i1 N
end;8 o# n# Y1 K6 B3 Z1 b5 @ }* V
else
! }/ K4 e9 E9 k1 Q& l' a2 g" R9 E3 z @.Destination := assignLObj[1,row];3 [0 E; @3 A7 }; q$ l. ?8 @
end; + S4 T5 N& }7 y& h1 ~4 l( @: d$ G( f
newDirection(@);1 C" @5 t6 Q" j; _7 O
@.HasOrder := true;5 N# O" g6 L2 N% k( {" t
end;
! L/ e7 s4 Y! c3 [! {; U2 ? end;9 t/ ^8 ]- B. |$ z+ @; N
end; -- of the method) r5 }6 T9 E6 c; I1 \6 T$ x$ u6 c! I: v
|