/* called by: entrance ctrl of the object 'track'. T# C9 g" Q$ }3 U- h
*/
8 u6 f, }6 t1 C8 Ais0 s7 v+ |$ s* Q! Z2 z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; w( w* l( |# `& ~1 E8 @
do
3 [0 w B: P* Y' R' R Lan := rootfolder.Internal.Tools.AOLlanguage;& O4 C! E/ y h. l
if current = @.Destination -- else return! x) `* A4 ]1 L8 v7 B
then% @4 r( R" `7 }1 P. q! y: D/ L! H
@.Destination := void;# A: ?4 \ p, F8 L9 K/ V1 i
if @.occupied then
) f) V# R5 @5 |; k6 A( d6 l- D4 k% B part := @.cont;
- p; K$ d) z) o; t, e5 { @.transpOrder := void;
n9 ?9 R8 E8 B4 ~; }6 C part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: u2 T% O$ ~" m7 [7 y, |) { @,root.eventcontroller.simTime); T* y. ~% w" w3 P/ h9 c( E# z3 {
@.HasOrder := false;
# l) a8 U1 A+ ~8 T* R1 j. y8 x( @4 s @.DrivingHome := true;0 P+ C& p8 d1 I! \1 t1 F, {; j
rgManager.tryToStartTransOrder;5 U Q4 T$ A) ^8 F; }0 X* x8 h0 c
if @.Destination = void6 \; C5 ?, F, u; {3 n& g6 v" E
then -- no transport order for vehicle @
1 H! i$ l1 D1 B U @.Destination :=
" I! q1 F8 I O2 \1 @& N rgManager.nearestFreeStation(@,track.~);
: z- G1 L2 F" u% C. \6 N& ^ newDirection(@);
4 O. } A# q6 G3 f6 e! V6 j [ if @.Destination /= void then/ v4 l; W& w/ t, z
@.Destination.NumReservation :=
3 J$ m" Z1 S% H: s) I; w" a @.Destination.NumReservation + 1;1 B! X$ K% {, {# n
end;
0 T' l5 l$ i) o0 W" q @.CurrIcon := "drivingHome";8 u# ^, W& W* R. X+ ?/ i# A5 s
@.DrivingHome := true;
( k& u3 u0 Q# Q( B# W end;* T. z( {9 C- j$ T. B! Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
h% w' T. f# _& ^: [ part := @.transpOrder;. O. S2 @5 A, s1 h) G9 F
part.move(@);-- load part
( \$ X3 u: a/ @0 B. | @.CurrIcon := "load";
4 `0 ^9 R* z5 h2 O* f3 } GlobalDistObj := part.globDestination;
$ M" a! R4 K6 O. a- c. E- P8 V assignLObj := rgmanager.rgAssignL;+ o) E# C! ^' X; }# v) K, c0 E- O
row := assignLObj.getRowNo(GlobalDistObj);
% K0 U# G8 n) T) P if Row = -1 then -- since 707 ?' t$ z8 W! ?, K: N
if lan=1 then
7 s# h9 j6 k7 @) E7 U6 ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( e; Y3 o) @' ~ to_str("in der Andockstation: \"",?.~.name,"\""));- ~2 M& E) T( ^( A' f2 d4 E
else T3 g6 g: u6 c+ R6 J2 X) n \6 C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 P: m, s" c6 a
to_str("in docking station: \"",?.~.name,"\""));
/ g$ s! X: A. y1 O$ m) o end;8 W7 w Z: a+ V* @# N6 J5 V
else# k3 E8 V) c( k) R: R5 A* B
@.Destination := assignLObj[1,row];' O4 ?, s4 a: Q8 X D
end; & k$ x9 r* V: a4 O
newDirection(@);4 Q9 [$ L! }* z% E/ ?
@.HasOrder := true;
) T: _/ ^2 w4 R end;
' @' w& j! F y4 L5 X# F5 O4 g5 d end;# X; o( Q& X! e. ?+ ^& x) v
end; -- of the method
8 ?2 T+ Q& J7 Q* A5 } |