/* called by: entrance ctrl of the object 'track'/ @. ~4 H7 I8 `2 Z
*// u# f% k6 P( o! U+ w9 R% }: `
is6 j h5 T- E0 r, [- R, i
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 g1 C4 H! b6 C" K' g4 K9 I" m. s# t
do. g$ `, @7 K" U) h9 w
Lan := rootfolder.Internal.Tools.AOLlanguage;) D2 `" F3 N U: \" }5 S \2 T0 v# t
if current = @.Destination -- else return
/ @# N. X( L' \; N: B then, w0 {( \$ o! [4 ~
@.Destination := void;8 B5 C, }3 s2 `# F+ U
if @.occupied then
; n6 o6 G, X8 z. x1 n, w0 n part := @.cont;
6 P* H% e) f0 S) j' f! x, W4 ~ k9 @ @.transpOrder := void;
8 j& q7 L$ w( w) H4 h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. V0 { Z2 v0 G- K @,root.eventcontroller.simTime);
4 n& \ X7 O3 N/ w3 M( o @.HasOrder := false;1 _! Q+ s; b( K6 l1 E0 Z8 f. z& R
@.DrivingHome := true;* P, Q% q; |9 M# @. B: f1 m
rgManager.tryToStartTransOrder;
k1 O% ~2 l4 U( D. ]+ [, [; n; T if @.Destination = void: L5 _( F( G( q; H, V
then -- no transport order for vehicle @3 j5 _5 G8 P+ W' y2 a4 M
@.Destination :=; p9 K; D8 U) x' v5 c# L
rgManager.nearestFreeStation(@,track.~);
' u8 i% E8 m2 b/ K newDirection(@); . \/ s# P0 d; `7 @7 N0 Z
if @.Destination /= void then
$ d4 Y7 j0 M2 x( M0 I% n @.Destination.NumReservation :=5 ^/ d: q3 L* D5 K
@.Destination.NumReservation + 1;* a& s) B7 y" I! R. \* r* V
end;
6 p7 U0 p* G) L* B- T3 \6 }# w- u( I @.CurrIcon := "drivingHome";, V* |4 }# b3 V# b
@.DrivingHome := true;! L. e+ G: Z# y' u9 j/ F0 [
end;
* ]. B3 `9 X5 X* f. X. Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station" B" u6 {) u% z- |. @; d
part := @.transpOrder;7 x: n" n9 ^5 S' M
part.move(@);-- load part/ K& x3 H, f+ d0 O( A0 m& A1 ~
@.CurrIcon := "load";6 s) L: \* I0 n6 q3 b; |
GlobalDistObj := part.globDestination;
* u% f+ x) e, W7 T D2 l- Q assignLObj := rgmanager.rgAssignL;
4 P' }5 L& v1 }4 Z q0 z row := assignLObj.getRowNo(GlobalDistObj);
% G6 S3 s8 K$ Q' ] if Row = -1 then -- since 70
; F: @& f$ w3 N( T) d0 d if lan=1 then* M5 p" x7 Y( v2 _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! t, ]6 G( k, W+ @( v7 d% |1 z; i to_str("in der Andockstation: \"",?.~.name,"\""));( R( P+ g8 H) a- Z C4 I* a
else
) M9 Y% p+ i% F: p( G* m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ \5 o3 U; F# F, m% K' i to_str("in docking station: \"",?.~.name,"\"")); + g4 c% ~1 [& H( h1 z2 B- ^$ H2 O& o
end;$ d+ O0 a2 `6 r9 ?, J
else' \3 h; E$ t# ~3 e
@.Destination := assignLObj[1,row];1 J6 U. Q7 A) t4 @# y- N g
end; " u% Z& d3 X5 X: H! k) H. k- B: a a
newDirection(@);
- h% M, N- i# L/ G( h- t @.HasOrder := true;
5 ^7 U- M r8 W, Z$ v3 V end;
; D0 |5 e4 u- x4 x D" l4 @ end;
" ? y/ `4 f5 n2 R; d' Fend; -- of the method
5 K, V2 n3 b5 P6 D' n3 | K |