/* called by: entrance ctrl of the object 'track'
9 p" M7 @5 a& D3 |*/
5 m: e& u# c8 g; T" X3 k/ qis: w' d6 o9 s4 Y4 K/ f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: ^; W$ E2 P! V8 }) k! Ldo {; B/ E: b/ F- o) n! r5 k
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 E; x* w3 ^3 M* o if current = @.Destination -- else return6 D* l. |" |# q0 U: U4 j
then/ G+ t3 w1 F" G; }- c# ~
@.Destination := void;9 C/ \9 i9 c5 O3 l6 X5 X7 G; I2 U
if @.occupied then. y# O$ g" |; u; l% y+ G1 G
part := @.cont;
4 g, A/ Y& k* w2 S. P! e% _6 D @.transpOrder := void;8 R: t+ }% q! s5 C8 v4 V0 c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 S2 ] L! Q$ ]
@,root.eventcontroller.simTime);
6 P1 b6 \5 o* Q4 F& } @.HasOrder := false;' J9 X! m3 B3 \/ n* \1 c$ _
@.DrivingHome := true;0 B& v5 M- u; r" o
rgManager.tryToStartTransOrder;
`5 I6 g1 ]" M4 b if @.Destination = void( |8 ?1 W+ z6 c' T1 C
then -- no transport order for vehicle @
4 ?6 e9 Z+ l/ F1 O8 A+ @+ d, S @.Destination :=
7 W' _! k4 p# V" L7 V! K rgManager.nearestFreeStation(@,track.~);* z7 Z' A. p _ ?* @
newDirection(@);
y. Q- J# ?: L8 [' }" z0 e" Y1 W( W if @.Destination /= void then
. M5 X c3 G' E, w! o3 C @.Destination.NumReservation :=
5 |7 n, U& ]( i P$ t; O/ q1 l, x6 s @.Destination.NumReservation + 1;
! @6 t2 k# }3 ?: R. F! \ end;
% X# e. i8 L4 o; H$ L @.CurrIcon := "drivingHome";
$ k5 P& e; h, M0 n' i A2 f @.DrivingHome := true;, r2 p! F" \' s8 ^
end;5 b& t' \# t+ a5 |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 O0 B$ U- b: _6 j: @! G
part := @.transpOrder;
- t8 d4 {; X9 w5 }( x. s part.move(@);-- load part* Z3 `9 Z& o% {. C# k g
@.CurrIcon := "load";. j- k5 G7 y! Y' d B% J
GlobalDistObj := part.globDestination;
! i" D. J, G# t( V assignLObj := rgmanager.rgAssignL;. X& i3 E5 T' s) [, k/ s
row := assignLObj.getRowNo(GlobalDistObj);
* j% I3 {2 \9 S' @3 }0 _( t if Row = -1 then -- since 70; M# e% m( @% B
if lan=1 then
+ Q. N) M) U: t8 L. W' B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 E4 `$ f3 S$ f% o
to_str("in der Andockstation: \"",?.~.name,"\""));' l* i" v, d) q5 R% Z
else" a" r: Z+ M8 l$ `, Q! _: Z! [
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" p; X4 p6 l0 y6 a to_str("in docking station: \"",?.~.name,"\""));
/ h# s4 f. ]( z2 i! {4 T end;
) G! ~# s, {# f; }% p1 h else4 {. z* b( h/ I0 r8 o3 E% i
@.Destination := assignLObj[1,row];7 |3 w5 C" D4 A& w
end;
) }* D" L3 O& M( G newDirection(@);
9 d( D" c( E5 _2 D8 M5 |* [ @.HasOrder := true;
7 \' L4 v' `$ R z* Z9 w end;
/ G* Y( B- u, h2 @9 p5 a end;, \6 Y; B: g$ {5 q; y
end; -- of the method
+ U4 S6 _ q0 d& Y% @2 H# h2 X" S1 G6 k |