/* called by: entrance ctrl of the object 'track'8 F: k p5 R" U# ?4 n; s
*/# t4 ?. B( [" ?& G2 B6 A
is* n/ |3 ]- w' R) z2 b
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( _0 r# a$ N/ D
do
3 K, o9 H+ {. V8 ^9 Z Lan := rootfolder.Internal.Tools.AOLlanguage;4 |* G- n5 x# P* ?3 L/ Y7 h# a
if current = @.Destination -- else return
- E# O) s* P& O: {9 I0 n then
" F, N1 u9 p) { @.Destination := void;* G# U+ T0 y# H B! Y( r
if @.occupied then
" ?$ e( N0 ~0 t$ n, ]$ u part := @.cont;' h! X! e5 n# l
@.transpOrder := void;+ S/ I8 N/ u+ O) w: i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- e! h/ t$ _$ e" L* D) f
@,root.eventcontroller.simTime);: k% U6 O. W7 [1 \, b1 n" {
@.HasOrder := false;
! [0 q! C \& k' ^. m8 c @.DrivingHome := true;6 \' H3 h; J- p/ x5 [
rgManager.tryToStartTransOrder;
1 Q: D$ |' f1 c T6 ~ if @.Destination = void
. P5 z, t+ @ h" t. r0 f1 F then -- no transport order for vehicle @! X: j3 E7 Y7 {) D
@.Destination := \# I4 H2 Z% W# `, [( g
rgManager.nearestFreeStation(@,track.~);
3 k' o; X3 j2 v' i newDirection(@); 3 o( z4 B5 G6 y. W. V
if @.Destination /= void then( }2 A; Z" C9 T
@.Destination.NumReservation :=
7 \9 N7 f4 I# z# d% a) ? @.Destination.NumReservation + 1;
V5 j9 m2 v9 @* O end;
" @4 y9 J9 o; B8 z2 N4 l& O @.CurrIcon := "drivingHome";4 W F) W. ]' u1 V% M7 v
@.DrivingHome := true;. Y m% L- Z7 Z) N3 M- B8 w( ^6 V1 n
end;
2 k6 |- {9 `5 G( Y/ w( l else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ k3 b* v. f; G& Q* M4 i part := @.transpOrder;
* L- `2 } X+ j, D; @$ h6 T \ part.move(@);-- load part& \( e5 W1 ^- Q$ n" Z4 \& ^4 @
@.CurrIcon := "load";: q D0 \# X3 U3 o# a1 Q
GlobalDistObj := part.globDestination;
X2 ]6 C; \; Q, \9 {7 @. C assignLObj := rgmanager.rgAssignL;
7 F3 Y6 |7 T: V. ~* R- T& P row := assignLObj.getRowNo(GlobalDistObj);
' ^. d* R2 t0 p# { if Row = -1 then -- since 704 Z V( H' c* u) A2 H, r$ b$ h
if lan=1 then$ }" t7 o. Y' r2 a+ Q: |
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ y6 ]3 g ] j to_str("in der Andockstation: \"",?.~.name,"\""));1 g/ G P& y2 J8 i
else9 q# K b6 C1 c
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 U& ~/ V4 R/ a" R& ~
to_str("in docking station: \"",?.~.name,"\""));
2 j2 h, g; p1 |0 A3 G7 [2 ~, f$ r3 x end;2 `* F4 @; f+ t
else
$ Z b- [+ ~4 o" {% V @.Destination := assignLObj[1,row];
8 X6 z/ X5 i( s5 p x. B end;
4 {. K1 V0 i8 C' |; E newDirection(@);0 T2 W' @* o2 W. `3 ^2 _
@.HasOrder := true;2 ^) Z; T R$ N4 A& B) R: S
end; w5 N5 M6 R. a! o+ Y# i( Q
end;
* E. f; D$ u6 M Xend; -- of the method1 B5 p/ Y, `( E/ N0 }
|