/* called by: entrance ctrl of the object 'track'3 s4 a& R" H/ \/ ?; r/ p+ _
*/
0 {5 E) }% d- Q9 j$ f2 zis" g% K) f* d& T5 \* [2 I1 b+ R
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. f, w. F+ b/ r7 m7 P$ Q2 z t0 G8 U
do
3 o' C; X* ?1 S0 c+ H" ~ Lan := rootfolder.Internal.Tools.AOLlanguage;1 p1 S0 s; l* b1 c& V1 J
if current = @.Destination -- else return
% ?: A5 e- r) q6 t8 ~+ Y then/ k2 b! u: G" G0 c3 h; i
@.Destination := void;2 v D6 v0 o6 \$ h( ^6 M- ]+ \5 b
if @.occupied then0 K" e( C8 ^1 z) D
part := @.cont;
# R: S/ X" E7 S. x @.transpOrder := void;
) o- T" z# d' X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 z: `& w1 V, e6 X# W
@,root.eventcontroller.simTime);" C" T, ^" k$ Z8 N7 l$ b" d7 p
@.HasOrder := false;
4 g5 W$ z' v" b# } @.DrivingHome := true;
6 t3 m+ \- c- h, x, U( x; b$ K rgManager.tryToStartTransOrder;
0 ~2 d }/ c0 I; v& K" a1 h if @.Destination = void
. w& C; W8 e3 B0 k! [$ ] then -- no transport order for vehicle @( i( r* b9 Y0 y" w! i3 s' _
@.Destination :=& W3 v6 q- ]! _4 W) I$ G
rgManager.nearestFreeStation(@,track.~);; e- T2 A0 v1 r% `& |+ \2 u( Q
newDirection(@); / c: w' e6 T2 T3 `# i
if @.Destination /= void then
" P' H6 Z& ~: O Q* U) [ @.Destination.NumReservation :=
, i- M! c5 p- F3 k7 w @.Destination.NumReservation + 1;0 p8 k% ?% B+ k% N6 M
end;
2 @$ c( T4 m# o- [8 Z @.CurrIcon := "drivingHome";
! P) v$ z1 u/ p! c! z: O/ F/ X @.DrivingHome := true;' ?. f3 y R% ]( C/ i5 j6 j' ?6 B
end;1 r/ l4 Z0 j* O, u# n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- d% `/ m# S @4 _: y part := @.transpOrder;" w, V4 m9 k8 b8 v8 A5 J
part.move(@);-- load part" w0 W/ h6 s( J1 B q( X
@.CurrIcon := "load";
$ ], t: ]$ l7 F L( L GlobalDistObj := part.globDestination;
2 [* }1 d% x/ k5 G assignLObj := rgmanager.rgAssignL;; g R- p7 D2 J1 W. f! j* F- n
row := assignLObj.getRowNo(GlobalDistObj);! b& p1 ^( d9 }- A% Y; I
if Row = -1 then -- since 70
5 ~6 V7 z1 F8 B+ Y! T if lan=1 then- X& g9 m# I. Z% o! Q* A a/ H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, e0 |; k% B$ y3 ^; E! P. r
to_str("in der Andockstation: \"",?.~.name,"\""));
! I& a& r, G0 Y ] else, x* C$ o" p3 w5 U+ J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" p, f" Z0 s" ^; @% _( o; U to_str("in docking station: \"",?.~.name,"\""));
) |8 C7 X- j8 q9 E; K7 P9 c6 k% f0 h end;
" x. n3 l1 w# \3 Y) [0 m else
* q% E4 Z( V, {! N( \5 S" I2 L* v @.Destination := assignLObj[1,row];
' g9 G5 I; m2 I' u! k/ T end;
, V$ n5 \2 a0 I' Y% v, l newDirection(@);9 J. L7 X; n9 Q. Z( e2 q
@.HasOrder := true;
1 z: v+ k! w" v+ V/ h& I end;
9 b; v$ q/ Z7 e* g end;
: C0 J/ z6 x4 Mend; -- of the method
0 X" S9 w. G4 A) Z- R! ^9 g |