/* called by: entrance ctrl of the object 'track'
$ R: ?( {3 r4 @% Y- z*/( a* L6 S, O' g q; \/ W
is
0 ~8 h0 F: }% y- P7 ~! F% n part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, K: O ]! P! W3 X1 ado
`$ F* M, D3 v0 X: {7 Q Lan := rootfolder.Internal.Tools.AOLlanguage;
( c8 ~8 k8 R2 v3 D8 H M3 { if current = @.Destination -- else return2 h9 k T9 ?" e( ~' g/ Q+ r. M
then* @' G, J/ |: M6 l0 c
@.Destination := void;3 f% x' b! R5 K7 r; ]6 b
if @.occupied then
7 U1 ?. E" ~$ }% j& g Y part := @.cont;! i3 `4 {( f0 X
@.transpOrder := void;
; P7 T0 M( ]0 }, ]+ j! ? part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 e; i$ W' f# ?% Q1 D @,root.eventcontroller.simTime);4 m$ q) d6 f4 D; B1 T" q
@.HasOrder := false;" } y) i0 q( R
@.DrivingHome := true;/ ^- H% P0 O" T) A
rgManager.tryToStartTransOrder;* A! q5 b1 Q+ X- X" Z4 `
if @.Destination = void
+ @" V7 f% X. s# \' j then -- no transport order for vehicle @
2 _$ Q- q7 e# ^ @.Destination :=9 k8 s7 Y# X: {# p
rgManager.nearestFreeStation(@,track.~);: F- y: a2 A: K M6 A' E
newDirection(@);
* I1 q7 J% h: |) Q if @.Destination /= void then" F$ q3 q9 s3 r" ^1 B( i2 {" }" n
@.Destination.NumReservation :=1 S" D4 y o6 t; E: }# y( S
@.Destination.NumReservation + 1;" ], F5 ~9 k u, x$ r
end;& Z8 A8 P- [. Q" C5 d+ W
@.CurrIcon := "drivingHome";
' I& M4 n# I7 O5 a' Z6 J( | @.DrivingHome := true;
0 I3 a" f% ], [ e" X7 B end;
+ d6 f ?1 ?; H) l else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( N# p; V; L- Z9 I- z% { part := @.transpOrder;
. Y8 i, h: j1 w+ f/ C! L" n- B part.move(@);-- load part
- p$ j+ G9 W, A' K* L* Q @.CurrIcon := "load";7 B J# C- G& r( }
GlobalDistObj := part.globDestination;
) K" {$ O; K1 r* }2 C4 ~ assignLObj := rgmanager.rgAssignL;
6 Z$ |( t! z* p/ x+ h; |9 d row := assignLObj.getRowNo(GlobalDistObj);/ ]" |( C- _# E$ L8 X. P
if Row = -1 then -- since 70
: D; s# L9 k# {$ A$ { if lan=1 then. T5 K5 V7 K! T4 S1 L7 P1 X* a' [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ b* f& C5 J+ b* v/ x
to_str("in der Andockstation: \"",?.~.name,"\""));0 v5 w4 R. b" D+ x
else- ~6 Y( e2 Y; V
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 b$ v* f4 v$ s/ v
to_str("in docking station: \"",?.~.name,"\""));
' ^' f' V9 o- Q& k* O% \ end;
+ k! H& f( p; B) V+ E. C/ R+ \ j! M else
. ^; [) G/ v8 F0 G1 o4 B @.Destination := assignLObj[1,row];" ` v( R/ V; ?; R2 g4 t0 m7 p
end;
8 ?8 s M( A. x) ? newDirection(@);" d) ~5 ^" u+ b# r( P3 t$ p
@.HasOrder := true;
& n+ e2 k3 S) \ end;
, g1 {% T# s; q' p" z end;' u. E7 B" G: d* F) F! f H
end; -- of the method
7 ?7 S" | Q( S5 Z. o |