/* called by: entrance ctrl of the object 'track'
' m" S2 g' }; t. {8 r*/: h5 R) |: f H6 B
is
* c4 [/ x$ a! L. Q. j# J part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 K {; f: j2 q1 w1 v
do! t5 s9 H/ w7 P/ N" F! @0 }9 f" M' }
Lan := rootfolder.Internal.Tools.AOLlanguage;
( \2 h3 N! M6 a% R, [. T( @ if current = @.Destination -- else return% Y9 c5 y! W: p/ e. u' L, Y
then
' Q3 R# j V5 f* @) j" G @.Destination := void;
$ E8 W- K% P! d6 ? if @.occupied then/ c- ]) }( K) z' @/ \
part := @.cont;
1 `& {, J$ `6 z5 W1 [% y @.transpOrder := void;
8 A8 Z2 g6 n: g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ A( F1 J9 R( n% j) B" t @,root.eventcontroller.simTime);. Y$ n. T* y+ s; N* X8 I
@.HasOrder := false;
4 w/ r+ F0 z4 Y' R- ?. n; h3 W @.DrivingHome := true;
5 {' A3 J; [. F1 I1 g$ E rgManager.tryToStartTransOrder;
( q7 P3 Y! _% H* n+ }- C if @.Destination = void
7 E6 _: Q \# _8 {- a4 E! m then -- no transport order for vehicle @7 ]8 A( G1 g( ?# \
@.Destination :=
. r) R5 H* b- w0 q3 h3 u/ j A1 Y rgManager.nearestFreeStation(@,track.~);
$ [) m& v7 |( r: f$ C+ p6 t newDirection(@);
1 I4 k* c0 N4 @/ ` N2 e if @.Destination /= void then% Q& ?, B: K' @% E5 j2 B: B; {1 q1 B) e
@.Destination.NumReservation :=
% q5 u8 L! y; B" v. ? @.Destination.NumReservation + 1;. |' A/ y0 {' n
end;1 a% i- M' p, U2 Y. t: ^5 a% z9 F
@.CurrIcon := "drivingHome";
b; Z6 o3 x3 ], m9 S2 l; ? @.DrivingHome := true;% B4 Q( u5 Z8 F& ]7 k( \! R
end;
/ Y$ i8 b( w* [' u1 a else -- the vehicle @ is empty, both vehicle and part are in the same dock station
e* u A+ u) d# O2 ^ part := @.transpOrder;0 `+ X4 T& L5 O4 m6 \0 _
part.move(@);-- load part& V L0 @0 j7 x3 F, {3 r, j, w' i
@.CurrIcon := "load";9 w! V3 v0 r& B2 q: c" f# j
GlobalDistObj := part.globDestination;
) a9 E3 W$ ^" b7 ?/ U9 B- M1 t assignLObj := rgmanager.rgAssignL;
$ H: {4 i a s9 @# l0 P row := assignLObj.getRowNo(GlobalDistObj);$ l# c2 X( L& q! E, y' n& r4 H7 U
if Row = -1 then -- since 70' N6 }, j7 H) f* ~: Q1 c, g/ K
if lan=1 then
, _* y- v0 a: M8 ~9 _7 _, A7 O; | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ h( U& g4 t7 D6 T: x# m' | to_str("in der Andockstation: \"",?.~.name,"\""));
, M v/ q& s$ R, ?6 t else
7 V3 ~8 A+ F1 o# ? D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 f% P# _5 q8 c9 E, p7 R
to_str("in docking station: \"",?.~.name,"\"")); # N$ }5 i; B+ s9 u: z
end;
% B8 n8 ?! D$ o$ n: |( t9 Q else
9 |9 k5 I0 ~5 k7 a# V6 n @.Destination := assignLObj[1,row];( O/ j& u& h% ^) L8 |) ~. M- z& ^2 }% v
end; $ E j9 v' I$ M" y4 ~" Z( M# j
newDirection(@);
7 M' f0 m/ D1 N- Z) Q @.HasOrder := true;# @. F9 ^! P! F! }% D/ U1 s5 }
end;
! }: f Z$ y$ Z' _ end;$ K0 s7 j" O/ t
end; -- of the method `$ S7 _" F' ?2 s3 M( }" q
|