/* called by: entrance ctrl of the object 'track' ], u- e" y7 A6 W
*/! {1 I) R+ I+ ^2 x: O
is* h% u# U$ I) K! y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ @( r( q/ o2 ~8 [8 d
do+ L ^9 U; @# s" y) R9 d6 r
Lan := rootfolder.Internal.Tools.AOLlanguage;
, e1 Q6 r- u4 z9 G if current = @.Destination -- else return
5 G8 X) |, J* c& M+ A then$ _/ r# [; `# A. G1 a J- `& \
@.Destination := void;
! U- r2 f) `3 F' e3 q+ B if @.occupied then
5 K* Z. U( G, i+ A* \ part := @.cont;
+ Y f5 Y1 O( R. B" o9 l: l @.transpOrder := void;
6 o# R T. L5 f! H K% i; K9 }; u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; G( c3 K/ ~: v0 X
@,root.eventcontroller.simTime);
: @' N3 p5 x: q6 e @.HasOrder := false;
$ O( X. `9 P) g8 P# m ]3 X2 q @.DrivingHome := true;
% I7 u1 X- U( Q' V% m1 q: C+ B. ~$ O rgManager.tryToStartTransOrder;
8 F. u1 K* y( \ if @.Destination = void
% P& j, w% D- z0 m. J then -- no transport order for vehicle @6 X3 ~3 D# ?( Z: X. P0 ~
@.Destination :=
0 }* h4 Y2 o6 X rgManager.nearestFreeStation(@,track.~);" Z7 r0 {$ _' p# W2 n l: `4 m
newDirection(@);
0 R3 o& u9 P! q8 m if @.Destination /= void then
- s/ k( G: t- h+ C7 V. d8 L @.Destination.NumReservation :=
1 g% I! R- I4 X7 b+ }% @ @.Destination.NumReservation + 1;+ y* y4 c1 f! f5 |5 x: N7 e0 c
end;
* P; B# ]: w* K* t8 K% ?! P @.CurrIcon := "drivingHome";
( X+ t% G% \4 x3 w @.DrivingHome := true;
! j7 d: ]) h2 G* L end;! J" d9 @! C# N+ d8 G/ `# _$ ~: f8 {* a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ T* ?9 R9 j: X2 D* i part := @.transpOrder;# l/ N3 N9 V" i! y% @2 _
part.move(@);-- load part, O$ `8 T* o& L% R6 Q
@.CurrIcon := "load";7 K6 X/ J* u9 `
GlobalDistObj := part.globDestination;
$ A1 C2 c* H5 I F assignLObj := rgmanager.rgAssignL;5 H+ C; ]! f, P, i" \
row := assignLObj.getRowNo(GlobalDistObj);
) r( C7 h+ L) @+ a if Row = -1 then -- since 70
) h! E$ U* r; H' u if lan=1 then' ^7 Z6 I- x5 B+ i0 z0 e! ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. e) K# b* J' x( c, U to_str("in der Andockstation: \"",?.~.name,"\""));
/ E" n' _' U5 l2 R k else4 \1 C" N, ?8 v8 j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 r) ^, U8 E# ?3 W0 |! q
to_str("in docking station: \"",?.~.name,"\"")); w( U/ \, P8 J4 Q8 r V
end;
7 h0 D9 E( P6 ]6 ^3 z9 i" r else
1 X; Z6 |+ r7 W, l0 V @.Destination := assignLObj[1,row];2 w( O' G% d$ q+ B `% ~
end;
3 e* ?0 u/ ~1 ?& B" ]3 ]! ` newDirection(@);6 B2 R+ L3 }& u; `8 |. l
@.HasOrder := true;
; w, C& _* ~' J9 N q: K end;
& Z& r6 \ f# | end;
! P0 `$ ^' f+ u, Eend; -- of the method" s/ V; C1 H' ~
|