/* called by: entrance ctrl of the object 'track'6 j( H- R9 c, a
*/' b0 M; Z4 m& X7 i& ~+ r
is( G$ P! Q8 ~: W# |: G' D. b% ]! Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; ~& V1 r+ a; Y9 t* z
do/ P- B# }6 `- @+ U# ?* S" `' d; }
Lan := rootfolder.Internal.Tools.AOLlanguage;4 x0 U% w- V' K! m
if current = @.Destination -- else return8 F6 f& V! D( t" h
then/ f9 ?3 q& N+ e' M
@.Destination := void;& P5 y9 S. v5 K8 I
if @.occupied then
1 W3 N4 x% a, T+ ] part := @.cont;
% h$ o5 l# k9 O) M @.transpOrder := void;4 x* I7 ~+ ^+ N9 @
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 o* j: o+ g; P3 U& U @,root.eventcontroller.simTime);
& V% ]7 H# P3 c' B9 Y @.HasOrder := false;
3 w9 N2 r; z8 j$ b. U @.DrivingHome := true;9 U7 J: I/ H( d7 A8 a8 O! w( o5 v- s6 L8 ?
rgManager.tryToStartTransOrder;% U' M- m$ B0 A
if @.Destination = void
9 k6 x" |- g5 e( Y# K! p2 W5 }$ L" I v then -- no transport order for vehicle @$ B1 O4 q9 q! u" h
@.Destination :=
, V5 ~$ M& ~( a% g, L! ^ rgManager.nearestFreeStation(@,track.~);3 l b' Y \8 h. s! q
newDirection(@);
( s& l2 V- P4 s0 D1 B if @.Destination /= void then
5 Z- ]8 S" |2 M( _- q0 e6 p @.Destination.NumReservation :=. C* z ^% i4 o, ~! }1 a
@.Destination.NumReservation + 1;
+ k# C! q& I# G4 B" o+ B end;
. W4 ]5 U' H9 `7 ]1 Q; K) u @.CurrIcon := "drivingHome";
; U2 c! I. \- g% X: h+ F @.DrivingHome := true;7 T& g" h3 o0 I8 i$ K% N
end;
) m* e5 Z, C' m) u. I- a, r, R else -- the vehicle @ is empty, both vehicle and part are in the same dock station- } B" {" D/ a
part := @.transpOrder;
9 T! | [' r+ V$ i+ Y$ q! u part.move(@);-- load part4 z& X4 p n% x
@.CurrIcon := "load";
& I8 I3 `* D7 k8 s& r1 X+ t GlobalDistObj := part.globDestination;) q% }' @6 N$ j7 |! b. X6 O
assignLObj := rgmanager.rgAssignL;
- g) r' ~, X' t7 ~- A row := assignLObj.getRowNo(GlobalDistObj);
$ O1 e, \1 H; d8 `4 Y0 O/ p if Row = -1 then -- since 70
) C- g! S6 R9 i# a if lan=1 then) t; H- m; M. Q2 Z4 Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, g! Y: i7 H" x/ G9 Z
to_str("in der Andockstation: \"",?.~.name,"\"")); H" t/ Z3 {0 @# H& g1 {
else
6 W# W' Q/ \) o+ Y7 Q( k promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 C& M% q* y( q/ E
to_str("in docking station: \"",?.~.name,"\""));
$ u0 e. N2 \; t+ |2 ^ end;
/ g3 o3 N) y$ {" v- z0 `1 j else
^3 F) B) i9 V w& [2 m7 g* g$ N @.Destination := assignLObj[1,row];% s' ]+ s! ~! N! S1 S- e) `' S) l
end;
2 R, y4 M4 E& ?$ X p newDirection(@);
. ~3 o; k9 |3 J8 e @.HasOrder := true;
, |& E% o" z; Y% G: m) k, q4 s C end;
' |4 u0 x( I, G; Q4 d9 z end;1 M# ]: Z0 o9 R( @& D
end; -- of the method
4 k6 i' Q; o7 y- v: k3 K |