/* called by: entrance ctrl of the object 'track'
# Q! _* l" x7 u' f# ~$ {: F& ~*/
$ [4 `- B8 R4 f" N* z4 Fis R2 U7 n8 U9 j) ]- c4 e F, |. O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; U* e7 e! {) i! udo1 V6 g2 }- A6 J0 p' T! U: ~$ K( C: {
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 R, }$ _# X" _- _8 `; l if current = @.Destination -- else return! Z3 h- J: H$ ~- P' r" _5 [: L. W
then
# k; e- b7 {3 M& m, R& | @.Destination := void;
e2 M3 ]# k, k; _ if @.occupied then" R1 k4 f9 a7 y! z3 M+ e
part := @.cont;
. u9 H" c0 M, X; ]& R2 l$ x5 t @.transpOrder := void;
+ I9 ?3 `1 t3 l. C% c1 \+ B* ^# j; y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 K+ z. c: q- f/ Y2 i, h- n @,root.eventcontroller.simTime);
$ i% d6 a, [! j7 Z% H( Z @.HasOrder := false;: t( ^4 E- E% k) B8 e& E8 V
@.DrivingHome := true;
1 Z9 x% n0 b1 H6 o6 G rgManager.tryToStartTransOrder;5 X$ f; i6 @1 i5 H* ]+ d
if @.Destination = void/ ^% t( I$ d/ [6 I+ @, q: A+ w
then -- no transport order for vehicle @* { B1 A; B# A3 h3 k
@.Destination :=
( s5 v9 T1 o1 u( E* _+ U z( H rgManager.nearestFreeStation(@,track.~);
( J1 x6 u0 m+ P) o6 s newDirection(@); , M8 O; B1 G) K: e
if @.Destination /= void then9 T' x2 s9 c2 i5 O* y: a4 u3 q
@.Destination.NumReservation :=
& S9 X9 M8 E) P. l" L0 | Y. I @.Destination.NumReservation + 1;7 J9 l+ g0 i0 Y# A
end;
& m! l' {1 B4 N9 Y: n+ Y; A @.CurrIcon := "drivingHome";
! m% N& u3 M5 z( I @.DrivingHome := true;
$ ]5 @6 l8 U. a: D0 A end;3 b' i. S* d3 f; L" _! v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" [& F+ Q, T( Z6 M
part := @.transpOrder;5 k, C; @& g6 v& W$ K$ q( o5 _
part.move(@);-- load part# Y, g; Z5 j! S- C/ f
@.CurrIcon := "load";
) W1 f9 f5 x0 y5 K GlobalDistObj := part.globDestination;$ Z" Y/ v3 d4 A: O5 N" }% d2 f# ~5 t
assignLObj := rgmanager.rgAssignL;
* D$ R* ~4 e9 A" ~' Z% u row := assignLObj.getRowNo(GlobalDistObj);
* e- W0 ~' w/ f; e if Row = -1 then -- since 702 _8 }& K+ X) B$ f, S' |
if lan=1 then
6 E& X9 B4 n8 _; U& q2 A promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: R4 i+ g2 ^4 i9 B to_str("in der Andockstation: \"",?.~.name,"\""));. i3 E, m+ _ C; u+ \
else
# |0 H1 D2 z& `% {* Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# I9 k# \0 ? B8 w# z to_str("in docking station: \"",?.~.name,"\""));
) Y" b5 [2 R) I7 z# H2 W end;$ x$ i; R% k4 z, q9 `$ e6 g1 R
else- W1 Q' r, H6 \" [+ T$ W% p
@.Destination := assignLObj[1,row];" ]$ Y9 R" r! U3 B
end;
1 j- a+ n v4 E5 C3 c6 t3 q. Y6 e7 w newDirection(@);7 c; C" ^$ \0 c7 ^) r* S
@.HasOrder := true;
5 ~- G$ M) l0 k. I$ ? end;5 G/ T H8 B( M x0 n
end;5 o7 w) U- ~' Z/ n
end; -- of the method/ P2 {3 }' V$ P) x0 [6 n. v
|