/* called by: entrance ctrl of the object 'track'
5 S4 [; S3 J! ~9 I* @% [" D*/5 Y4 h: W8 a0 J, S' O/ Z
is" x$ @: m& @. p& @3 Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* ^) {2 v3 ]8 |* [6 k
do
7 C/ F: j6 Y1 \5 {5 _ Lan := rootfolder.Internal.Tools.AOLlanguage;) E6 c' {1 J! w! Z
if current = @.Destination -- else return) x& `" _. L% u; c1 G
then
4 t8 `! ]# P+ Y$ ^. g @.Destination := void;9 g6 E. B" I8 p/ T: e
if @.occupied then/ C$ K! ?+ @: M( f9 ^# z9 n
part := @.cont;# R- H9 x3 p) A( m* y- }
@.transpOrder := void;
, m# }' ]& @) V7 T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, D, G! E/ y( x/ |
@,root.eventcontroller.simTime);
7 n0 N: w5 ?" r% D" ^; v @.HasOrder := false;
$ K/ q; I" \2 M) \ @.DrivingHome := true;
5 m d% L) W& R rgManager.tryToStartTransOrder;) [" u9 E2 E7 c/ {5 z0 V+ d. C
if @.Destination = void2 M4 D$ @: e7 Y+ ]$ U( g7 {
then -- no transport order for vehicle @: g d4 S) K3 i1 g8 ?. p
@.Destination :=0 N! X" V* ^$ v6 {' F2 t i* q
rgManager.nearestFreeStation(@,track.~);# N3 G. ]& {/ n4 `3 \: S5 c
newDirection(@);
# t l: b+ b" }' Z if @.Destination /= void then
. K% d% w8 W. j1 k% d* Z @.Destination.NumReservation :=
" Q! Z+ H. k W1 t. V; ^$ `! I @.Destination.NumReservation + 1;
1 E4 [+ O7 e. n+ X# E+ c end;
( [. i, {7 j4 K @.CurrIcon := "drivingHome";0 S" \+ ~ F& e; _; W+ S. n' J
@.DrivingHome := true;
% }( N& J9 _8 S) c$ Z end;2 k/ A: H) @& t% N2 s( [
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* C) [* L8 N* @8 [2 } part := @.transpOrder;0 s6 e' j4 E9 T0 u2 o
part.move(@);-- load part
6 c* j' h4 F* d8 k. _) G @.CurrIcon := "load";
5 Q6 u7 y o* h2 ] GlobalDistObj := part.globDestination;5 E# v7 ?, W( {0 J* h' A! @
assignLObj := rgmanager.rgAssignL;
8 y( @% d; g) y" b' \ row := assignLObj.getRowNo(GlobalDistObj);
8 W" e c. i; I8 m" M# |7 u& X if Row = -1 then -- since 70
1 s. B2 v! Z: W# z9 p if lan=1 then6 f7 L! \5 o- W+ @, y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: `' o& W4 q6 t- \ to_str("in der Andockstation: \"",?.~.name,"\""));
1 i/ ?9 ^% C5 T6 d else6 _7 E4 o4 h7 T$ H! a: e6 j2 J* G
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- m/ Q/ y) C4 t3 l4 Q) Y, P to_str("in docking station: \"",?.~.name,"\"")); & N1 C1 o5 K' S! S* d; S6 O
end;
# Q* m, M5 a8 u2 h else
- f3 D9 ~) p6 E* K' p+ N/ p$ z( o @.Destination := assignLObj[1,row];
: B8 m7 C5 c' A' _: Q8 R end;
/ j4 H( j9 o3 ]" p newDirection(@);
) N- {# \1 F- |7 j0 U* D @.HasOrder := true;1 u" Z" u* z7 r, o2 d% Q+ g
end;+ k& D4 \3 c. H1 |- G3 W
end;5 r" a9 K+ k' r" \, m3 j
end; -- of the method, E& ?$ [+ p, [7 x; A |1 i0 r1 d
|