/* called by: entrance ctrl of the object 'track'2 g, D0 t1 K: K" T6 H J7 B) e
*/
0 J8 b) I- U" m& Q6 |# W0 \is
5 ^/ ~6 r* V, t part, GlobalDistObj, assignLObj:object;row,Lan:integer;" h" p: o& d) K5 a+ _8 f( A
do
5 S2 a+ N+ S. a$ e7 J* ^6 h Lan := rootfolder.Internal.Tools.AOLlanguage;
$ x- ^5 m, H- d9 v+ h9 y2 ~( E4 V if current = @.Destination -- else return+ q3 I6 ]9 P: p9 }$ H: e
then
: X$ `% X& g2 M- \7 ~. p @.Destination := void;1 W' [9 a/ x6 C6 |! @- O- T
if @.occupied then
$ }% N. |+ s" h- n+ K6 c* [ part := @.cont;5 I* |, x! l% j; `1 q
@.transpOrder := void;
& @0 g0 P! x7 s0 }* A Q+ e4 M: S7 J8 C part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: v2 O* L" v8 k5 W& E5 Y @,root.eventcontroller.simTime);
; g+ i" g& i5 a8 \) ~- s @.HasOrder := false;
( |4 i% w# J. z( q# G$ F @.DrivingHome := true;( Y( U; [+ ?& S: [
rgManager.tryToStartTransOrder;
& j# p# s7 x# j7 B8 n) P# p if @.Destination = void' a& U, v9 o$ O @0 k# ^
then -- no transport order for vehicle @
. Z& s5 S I+ G6 {& L @.Destination :=( L" J0 Y% S5 }
rgManager.nearestFreeStation(@,track.~);. o, h J m9 j! `
newDirection(@);
4 I- V: l' r+ ?' I" Q+ c- q% l( y if @.Destination /= void then: c4 h! L+ U' i. @7 y. s
@.Destination.NumReservation :=
- f) S8 [ \6 \: m @.Destination.NumReservation + 1;1 F5 M# Z7 m z8 F- a
end;
- I* O5 M# Z; f @.CurrIcon := "drivingHome";% j: B& P6 p+ ]
@.DrivingHome := true;3 j% H% f. y1 u( e* P0 I
end;& Y5 P6 m- \7 |( m% c3 b9 o$ W: _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 H6 w4 x) s" \) }3 y- |$ e
part := @.transpOrder;9 t# z, f# D4 j/ j
part.move(@);-- load part: G! U3 L) B9 w2 Q
@.CurrIcon := "load";
0 J8 s, ?% f4 [0 Y: G4 [; S GlobalDistObj := part.globDestination;
2 @' ?! q, D5 ~ i8 b% W( _ assignLObj := rgmanager.rgAssignL;
% e- D+ Z. t; u row := assignLObj.getRowNo(GlobalDistObj);
. T8 Y a+ ]" L/ }/ f# n* _ if Row = -1 then -- since 70' e5 v0 O; V, i1 b% d: P
if lan=1 then
$ _* y/ t6 M+ {+ w t. C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& B3 ~+ A3 n& V0 A to_str("in der Andockstation: \"",?.~.name,"\""));( N; p6 I7 Q2 D
else* [* m) a$ A6 {) ?, W- E! I/ `0 \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 m' @0 h* @2 y" B9 h
to_str("in docking station: \"",?.~.name,"\""));
4 d4 f/ y1 [. |* Q U* s end;' e( |) {8 s! U! E
else
" q* L- g7 ~. n9 |- ^: O- d @.Destination := assignLObj[1,row];+ n! d, W) G4 d
end; 5 u" a1 ^9 h# J
newDirection(@);
' a+ B* h( g" y& h$ H @.HasOrder := true;5 ~5 F3 c1 i8 [6 U% ~
end;2 c/ d+ |+ y2 A2 j$ P
end;
, b- Y5 U% U$ k* rend; -- of the method4 w, t/ T C% E
|