/* called by: entrance ctrl of the object 'track'1 t/ c' |& G6 ?3 S
*/
0 Z+ x) G/ m" i7 F/ x' ^is% K" G5 [5 g5 u1 i) t
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 R( `1 c! K3 r+ O
do
8 g3 G- @" j# x Lan := rootfolder.Internal.Tools.AOLlanguage;
, P- E8 ^/ ^1 ]# _( [ if current = @.Destination -- else return! j. x4 m! c9 w
then$ ?+ n' R/ \% T
@.Destination := void;9 n* P7 h* O: n( k
if @.occupied then7 ?) ] A, i: q2 F: ?$ ?/ Y
part := @.cont;
) n/ x' }$ V$ c( D# a2 _ @.transpOrder := void;9 \/ E: Y5 s' z, o6 ~
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ N/ o V+ P# o* I" W& V @,root.eventcontroller.simTime);1 l0 d2 _# }) g" B& E; @) i0 S
@.HasOrder := false;/ w: g' I0 ? w$ N4 e0 S \3 u* |+ @" I
@.DrivingHome := true;; u1 `$ V- q3 _7 r
rgManager.tryToStartTransOrder;! b" ]# o3 Q1 n
if @.Destination = void; z) E9 y" \9 A, s( j2 \$ e
then -- no transport order for vehicle @. R0 T$ e6 J. o4 Q: f# S" L
@.Destination :=
2 U* J5 Y) l: o rgManager.nearestFreeStation(@,track.~);3 I: C$ t) M9 ~) C$ A
newDirection(@);
6 D) A# G" w7 M. d+ Y1 n if @.Destination /= void then0 D$ Y6 ?7 j p8 X% Q: f1 d7 M
@.Destination.NumReservation :=
; w ^. h4 |5 u5 T* b" ` @.Destination.NumReservation + 1;% g1 N- C3 D; K& e* `- k* Q
end;
/ J$ z" T. R# \( d. [ @.CurrIcon := "drivingHome";5 P. |9 `& K! X: w% v. ^4 B
@.DrivingHome := true;
0 N& ]9 j5 }9 k5 V+ w, [! E end;, ^" S) q: l9 }, ]7 [1 j
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; X. D2 _$ M9 I
part := @.transpOrder;
& \) a8 R$ B2 `9 s; ^" y; b part.move(@);-- load part
7 T8 E) ~( }" D' B- ^ @.CurrIcon := "load"; E% j: z6 l8 w. h) j1 r
GlobalDistObj := part.globDestination;: R1 p: H- e5 R. k% S
assignLObj := rgmanager.rgAssignL;
, h/ z* O5 h6 p; r# ]5 P row := assignLObj.getRowNo(GlobalDistObj);
4 X/ Y a# P; A6 H4 O if Row = -1 then -- since 70' ]7 ^' i+ {, I+ P" m# ~
if lan=1 then
8 k+ `7 c1 {. \9 q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) X; f9 S3 p/ Z4 y7 b) y1 Y3 ~+ Z) A0 Y) ?
to_str("in der Andockstation: \"",?.~.name,"\""));" ^8 G/ i5 V6 k
else
9 P' T {6 i7 g' x8 n$ M S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& o) b) L9 A8 d to_str("in docking station: \"",?.~.name,"\"")); " }" o* ^ v! e
end;5 C* h; J* a1 c; L
else+ R: d8 O5 G4 y+ E" l! H
@.Destination := assignLObj[1,row];
" g4 h* t) |2 M/ J+ f end; - D1 \) V, v6 q9 M7 ~
newDirection(@);* K7 W3 P. C8 s3 s5 F
@.HasOrder := true;# |! h$ u2 r( R8 R7 O
end;% D( T" A- G7 C! d
end;- u# u1 ^* M; M4 L, p
end; -- of the method
1 {! V7 w& n8 K Y |