/* called by: entrance ctrl of the object 'track'" l& Y) ^& `4 V7 @) A3 A
*/3 ^4 B$ @0 W( Y
is
9 z9 Z: L/ }5 s+ e) H; ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;' C' @4 ~* k8 F3 H. E
do
4 o" f- `2 n" ?( u Lan := rootfolder.Internal.Tools.AOLlanguage;, Z ^: y" A8 y
if current = @.Destination -- else return$ n: H, q' i' i- K4 B
then9 F, T1 w6 B) @5 Z
@.Destination := void;
, z! j! z: _/ W. z+ ^( C' b if @.occupied then& Y7 o" X3 d+ l+ @
part := @.cont;! L! ]9 U `: A; [" K
@.transpOrder := void;, K3 {( j& l4 t L6 g& _
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* R2 P. C7 A6 p& Y' r @,root.eventcontroller.simTime);- x2 a) q' b/ @1 ]8 N/ O5 m
@.HasOrder := false;
+ }# b6 i" B8 C& m" n @.DrivingHome := true;# l. P. k5 _6 V4 @
rgManager.tryToStartTransOrder;. p% Z- F* Z( g, I; l, H" _ W5 L
if @.Destination = void
5 A! Y% }" \8 m then -- no transport order for vehicle @
' |! j( W& q q2 x1 j# P3 S- @ @.Destination :=2 A! `8 ?$ p8 a% [' n
rgManager.nearestFreeStation(@,track.~);
% ^& v/ j' ~! ?. n q5 a: Z newDirection(@);
5 C0 T1 `: Z# H7 H$ ]& C if @.Destination /= void then
3 l, l$ O* c% i! c+ J4 c. F @.Destination.NumReservation :=
" L4 U6 i4 J# t- M @.Destination.NumReservation + 1;4 u0 a# Q b* s+ x# v
end;. |( G9 S7 [8 l5 o/ S1 P1 ? E
@.CurrIcon := "drivingHome";
! ?% d7 w0 C' t( g& T& W% z& o @.DrivingHome := true;" D( d4 j) F! z* X7 O4 H' R
end;0 ^7 [' g$ k0 c6 \7 P4 ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 j! D+ ~$ P- W0 v) t4 c7 y# x
part := @.transpOrder;; x; Z/ Z: _! Y: i+ [" m
part.move(@);-- load part; a0 {1 H. h, t$ }7 o4 K0 Y
@.CurrIcon := "load";, x1 I+ x# N) a, f6 [; ?: N
GlobalDistObj := part.globDestination;( ^9 |' m; E) N8 Y) z+ x
assignLObj := rgmanager.rgAssignL;6 x2 l' o5 }6 B6 ?) h
row := assignLObj.getRowNo(GlobalDistObj);% n9 R6 V$ F& F* d `' S- V) \
if Row = -1 then -- since 70
8 {( m7 p( \. r8 N( Q if lan=1 then
# O. ~1 F, o2 ?4 V' z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 R& D. U0 L* Y to_str("in der Andockstation: \"",?.~.name,"\""));
0 U" u* ~% o3 N else/ ~2 @6 H9 Q+ l' X( h& f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: v" S, o4 q( f( |# Q' n
to_str("in docking station: \"",?.~.name,"\""));
& C% w( F$ m5 n- Y D( X2 N5 n end;
0 N5 P: N& z( M else3 I- ~- Y' C# Z% n s6 c) O5 e
@.Destination := assignLObj[1,row];4 C7 @+ i, E: X# B
end;
1 I4 z3 w0 o+ V$ E) g newDirection(@);
. s- [! M8 L, a5 z: x @.HasOrder := true;5 p; s4 H) X) _* A. T
end;
5 g8 i9 P1 G. K end;% ]( j( X+ P, |$ f; S6 k
end; -- of the method
( a% i" g! o5 e# U |