/* called by: entrance ctrl of the object 'track'
" y! J1 T) ?9 B/ a8 q' Q*/2 t7 t; m% }2 p1 ?% S& L
is
5 p5 V4 ~5 D _# j1 N8 `. C5 x; i) B part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ l: q+ J$ S/ ]. R
do
% w. l" G J* ?4 W0 |( C. Y( y5 Z Lan := rootfolder.Internal.Tools.AOLlanguage;- A+ Q; p9 N2 d9 {
if current = @.Destination -- else return
. l6 o; ~' o7 y; ~, [7 {" ]8 e& s then
7 ?( a( Z8 K. E9 O6 f0 x @.Destination := void;
* {+ X5 y- S8 {' v7 P1 y if @.occupied then
+ V# G# w/ E4 [ U& A' { part := @.cont;
% v/ J6 ?, O; H/ c @.transpOrder := void;
4 d& H% Y3 {5 F' w; p: d part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," `- u& B0 R0 V4 k
@,root.eventcontroller.simTime);
! G! B( ~" ]1 S2 z. H" y9 c* C8 k- x @.HasOrder := false;
/ W0 c2 c% @5 j: D& O8 v @.DrivingHome := true;3 z- {* X+ m/ H
rgManager.tryToStartTransOrder;& O* b8 k" m5 i$ ]" |' n
if @.Destination = void" ^$ Z9 }( ~0 Q; U' p) R
then -- no transport order for vehicle @
4 x, T, e0 f' p/ s @.Destination :=
( N3 k; k, x; X4 F% G rgManager.nearestFreeStation(@,track.~);
$ w- A# F" B2 Z( u newDirection(@); ) i7 j* U1 }5 m( f Z6 F
if @.Destination /= void then
, I6 T: P& u0 k1 @ @.Destination.NumReservation :=7 h( {6 d* Y! }# k. h9 M% U
@.Destination.NumReservation + 1;
' n) f1 l' q# O# w, d end;
) h7 X% H S0 F+ N+ A @.CurrIcon := "drivingHome";0 P+ E" X. r0 `7 H
@.DrivingHome := true;, p+ b' ` O5 ^+ [* r5 p- f/ X! Q! \
end;
- b* l5 W& A' I/ S$ o# V else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- G1 w! S9 {6 X2 B! v' C `& ~ part := @.transpOrder;& O' G$ Q' E2 d1 ]
part.move(@);-- load part
& u" D* U0 Z* b6 C& T' b1 f1 O @.CurrIcon := "load";4 d8 O+ t0 t) G0 U) Y& ?3 W3 A" o
GlobalDistObj := part.globDestination;2 ~, y# Z+ ~7 D
assignLObj := rgmanager.rgAssignL;# T y& x" i' W
row := assignLObj.getRowNo(GlobalDistObj);* z7 p9 {6 Y5 S, K, {# E [
if Row = -1 then -- since 70
5 X5 s, v. D+ A if lan=1 then
! s! ]" D; V6 ^- r8 X- ^4 { promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# J6 ~9 z% W. E `* L T to_str("in der Andockstation: \"",?.~.name,"\""));
: @. d( V$ M' V( a4 c else
+ I0 K0 z4 \5 G$ a g promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- G" `3 y9 a3 D) Y( |/ [
to_str("in docking station: \"",?.~.name,"\"")); ! k* k, c6 _ D9 T; B% z% L
end;9 S! T5 z' {6 O: _0 j9 H$ B4 R
else
9 Z' A4 T- ]" _( z4 ]% _* O# Z @.Destination := assignLObj[1,row];
( R5 J5 m* ^- x6 n end; @+ L( c* V+ Q& Z. o8 b
newDirection(@);
1 c+ Z* V/ ]; s% P @.HasOrder := true;4 k; J2 @6 s! M# u9 E# x2 {* I
end;
% f5 Y6 n: `( ]" J* X" y& @ end;
/ A1 \ I7 [/ \# d$ o$ {end; -- of the method2 x7 S! F9 k- M+ v5 ^ z
|