/* called by: entrance ctrl of the object 'track'
+ M$ k* A' ]7 Y$ A) V*/
" M" Z; w$ I5 @" Mis) p7 j- v) x5 M% A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' B$ e! J q7 ?3 m$ r( m5 p3 w% |do; u8 ^! t6 J# |* N1 l: f
Lan := rootfolder.Internal.Tools.AOLlanguage;' j% e+ C$ S7 E
if current = @.Destination -- else return$ [5 B& r: f% x6 \9 C4 C' h
then
; \$ u: o) O* r9 Z2 H8 Q: a. m$ ~( Q @.Destination := void;
* q9 X* @2 x6 ~# e& f& U if @.occupied then
& m1 e6 F% k, `& ]7 j* ~2 C1 W6 o part := @.cont;
+ b7 N, }( C: g; n @.transpOrder := void;4 h: ?/ [/ X- {! V" V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 h9 l7 C7 h2 C. \) g+ V! u @,root.eventcontroller.simTime); ~! h {9 `8 q$ d! n6 h
@.HasOrder := false;
: z4 R" R% w) |, D @.DrivingHome := true;
% N& u( b1 `8 ~- J rgManager.tryToStartTransOrder;( J3 B6 B& q( k8 T5 p: A1 s1 x& h
if @.Destination = void) v9 G/ B: Y G8 ^, h
then -- no transport order for vehicle @; o d, w$ O- u2 B- t1 ]
@.Destination :=+ V0 |% ^' `' ^& _% n& i' U
rgManager.nearestFreeStation(@,track.~);
, U ?. C. i; D newDirection(@); ) Q" \8 y6 s3 v3 f: T; t, h
if @.Destination /= void then' Q& _: _5 q* E# p7 E2 m
@.Destination.NumReservation :=7 h: N% P6 @' d
@.Destination.NumReservation + 1; E, O3 \2 @. q* y; s6 S# N) @
end;
- h* w: _- i9 H7 E) ~/ R @.CurrIcon := "drivingHome";4 w, `( @% Q n% z
@.DrivingHome := true;6 Q! ~: @& t( p: a/ k
end;
, A2 d# j) x# H* O" D3 L2 @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station% H; A7 K" R5 ]9 c0 K* m" [
part := @.transpOrder;7 z" T4 s4 O: s, t9 q' O0 X
part.move(@);-- load part
2 F7 D8 {0 M6 K; \ @.CurrIcon := "load";
) }' i9 l" _! s7 J X3 s GlobalDistObj := part.globDestination;
3 A: T0 ^ @0 S4 u" ]2 h assignLObj := rgmanager.rgAssignL;+ u. g7 i4 s$ N/ ]
row := assignLObj.getRowNo(GlobalDistObj);
; Q5 ]& ]2 f5 I, y: X if Row = -1 then -- since 709 N+ I" l+ T3 e7 q9 |$ {( b" n6 g7 d
if lan=1 then7 [0 [5 }& j) M/ y) B$ m t5 l8 v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* q( a6 @; s: ^$ _9 u to_str("in der Andockstation: \"",?.~.name,"\""));% R1 v1 O3 D* k( ?& u
else
' N0 [6 H m% L# u promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. _5 C% \6 x- p* M7 V: D
to_str("in docking station: \"",?.~.name,"\"")); ) L+ X: H) P9 ^2 \
end;
& W7 c8 V- h( ?' e0 _ else" Q2 i, x1 @) j7 t( {9 Q
@.Destination := assignLObj[1,row];
$ u9 S0 M1 t8 M end; * K( \& p+ x, i$ t) |' g
newDirection(@);1 J7 S7 p) r) R
@.HasOrder := true;5 C. m9 Q) m4 n$ Z7 m& Q0 N
end;) I: p. _7 o% U4 ?: o8 ^
end;
( P; F# [: @2 H X$ O) mend; -- of the method
2 P; N( \' d" u. ^/ g- I |