/* called by: entrance ctrl of the object 'track'
" D* Q& m: g$ Q+ h8 j*// e# C1 T+ b6 D4 O
is, \1 r7 x! q2 O: u' O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- f4 a U/ ~' Wdo. m( i# }2 _# O! X
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 T6 D, |1 m* g8 D/ B! w if current = @.Destination -- else return: a9 @+ M/ \$ ~
then+ w" h7 h5 m! B" c2 V
@.Destination := void;
) I6 c6 v8 i1 d" ^; W! U if @.occupied then, |2 {% G, f3 s I
part := @.cont;, |. X% U# J! O5 k9 D, O" h+ c! s
@.transpOrder := void;, h. i- t' u5 q$ [$ z0 Z/ C0 o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 d& w, ~; i; `6 z _ T @,root.eventcontroller.simTime);
- y/ s8 j& J+ m& V @.HasOrder := false;
+ t: i+ K$ u7 V @.DrivingHome := true;
- F- a" r: u* ~7 f& K: e rgManager.tryToStartTransOrder;
( C, `8 u1 C7 G: d* A# D1 Z! o7 |. f if @.Destination = void9 e) d8 p: G; Q- w3 T; f
then -- no transport order for vehicle @: G' o) M- ?+ }# _9 W, {
@.Destination :=8 i! r& |/ a+ g% A3 _& X
rgManager.nearestFreeStation(@,track.~);" E( g" r1 }. U, G( {+ [2 s
newDirection(@); 9 n$ B; I3 c& [" F& ?' N7 r, S
if @.Destination /= void then
/ J% f4 b4 y# w4 e4 I2 R @.Destination.NumReservation :=
; N, n$ f. H2 w r# C5 B# d @.Destination.NumReservation + 1;
$ g% H8 R. v# ?1 a+ C end;
4 X7 C& W1 i9 U4 V8 { @.CurrIcon := "drivingHome";( l; w% m( Z" z8 a( V% {1 R3 `# O, j
@.DrivingHome := true;
/ G0 L/ \- E& b4 _! E end;
. c K3 B. B9 F0 \) a/ ?7 P else -- the vehicle @ is empty, both vehicle and part are in the same dock station) u3 C6 P) P& x: o! h& _8 i
part := @.transpOrder;
) M: }, h9 {" o, I6 z part.move(@);-- load part
- G8 S2 w, E+ d5 d r @.CurrIcon := "load";
: d. z0 i6 \6 x( ]5 P4 ?: N; ~ GlobalDistObj := part.globDestination;
% |$ L& {" P4 Z7 w" U; r7 ]; a assignLObj := rgmanager.rgAssignL;1 |+ D$ b K" f: c
row := assignLObj.getRowNo(GlobalDistObj);, |' [2 p6 o. G' x N9 Q# A% G4 E
if Row = -1 then -- since 70! s* ?; ?" a/ k
if lan=1 then0 W* `+ n, S7 @2 c, e5 [, c7 i
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% R+ U" z" e% h3 t$ G1 @ to_str("in der Andockstation: \"",?.~.name,"\""));
: A8 m+ k% K; ~* c else
0 J/ n' s" f: c8 u, X8 i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' B- j' T( r5 z$ w$ ~0 v
to_str("in docking station: \"",?.~.name,"\"")); * n, A& ~/ F. ?+ Q n* X+ P
end;
+ a, \! r2 { p- C8 C9 n else
# ]3 y& ]$ t- {( A4 K8 i @.Destination := assignLObj[1,row];
$ V8 W: L% n q6 a( ?& O- Y end;
8 }9 E7 t) A+ V. w/ Q Z I& t newDirection(@);8 }' S' ?( Q0 a4 k' x2 _
@.HasOrder := true;: n' t7 J4 k. h; X! ~- j
end;
1 y% B6 T* K) p* l! B end;9 ^# G9 ~3 J [: s4 @
end; -- of the method6 T# w$ [0 q! {2 [/ r
|