/* called by: entrance ctrl of the object 'track'- s' X2 d/ |/ m$ H
*/5 e: @! \- q" v0 |+ p G3 E5 D
is
) d f2 n0 K3 r* j ^4 J part, GlobalDistObj, assignLObj:object;row,Lan:integer;, f3 a7 x R: M! t# d, ~
do+ H2 }8 Z+ ~! y% E ]! o! O" F
Lan := rootfolder.Internal.Tools.AOLlanguage;
7 K) j2 U4 f$ h/ ~$ c# l* y if current = @.Destination -- else return ?$ H+ ^0 O% G2 L. _) ~7 f
then) s7 ~) o' I0 z: L" a7 t A
@.Destination := void;* s1 S0 g& w% w
if @.occupied then0 c, T7 N1 @* F9 f; M
part := @.cont;$ R! A" c1 z3 w- M$ p+ N
@.transpOrder := void;
* q. j" d4 W+ f, G- b' t part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 P8 i& I8 z! E @,root.eventcontroller.simTime);: ~+ b m2 U, Z A
@.HasOrder := false;$ Z: @, i1 i7 l" g
@.DrivingHome := true;
7 [- j6 h" Y0 c g rgManager.tryToStartTransOrder;9 ^( A* n; z% i
if @.Destination = void
, O' N! P) a& U0 f" e( ?/ `/ | then -- no transport order for vehicle @
1 b3 x- [% E' f2 H# t { @.Destination := B- W7 E/ `; d$ S" b% H" @
rgManager.nearestFreeStation(@,track.~);
2 y& U' L5 T* |- o newDirection(@); * ?" t! ~0 g7 I: V
if @.Destination /= void then
# o& ~( U a1 y) s @.Destination.NumReservation :=" }& P9 B2 [) R8 ]" Z( e
@.Destination.NumReservation + 1;
M4 b* i. z( Y end;
$ \6 h ?) S. c1 y4 a F7 { @.CurrIcon := "drivingHome";
) D! u6 ?9 Y2 E: B) Z @.DrivingHome := true;
3 Y o6 Z! S, J9 L' j end;$ R- ?# g2 @, L" p6 G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% B7 W0 x1 G- R8 g6 ?8 j
part := @.transpOrder;
* m9 |, q2 W& N3 V) _* G part.move(@);-- load part
# y# {2 C& S4 U* Z, l" g0 K @.CurrIcon := "load";, B/ z9 c0 \! j$ o! a+ a
GlobalDistObj := part.globDestination;
* K" L8 N, m5 a' | assignLObj := rgmanager.rgAssignL;+ N( I$ p+ P `; V8 s9 [
row := assignLObj.getRowNo(GlobalDistObj);: r0 U% M+ y5 i2 i
if Row = -1 then -- since 70
+ B: N( B) B1 z& L3 P if lan=1 then
( ], _6 p/ X" }, f* p, m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% h. X+ f& v: l( _* [3 X! v to_str("in der Andockstation: \"",?.~.name,"\""));& f, F3 ]. A9 e6 j1 E) B
else0 z, W. j# y8 p3 \7 t- |; e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
? O h; X' k, o$ g to_str("in docking station: \"",?.~.name,"\"")); ; l& } w& O, a2 @4 W1 E2 g
end;
( g7 X, X t, p% ~$ ^; o' O1 F else
4 L- r' S. O% O1 t2 {2 e4 n @.Destination := assignLObj[1,row];
" Y0 {% G2 Z8 U' F end;
$ F. @% N5 T0 S$ w6 v newDirection(@);
4 F7 j2 U4 G7 p @.HasOrder := true;
* |# ^ |8 R3 ] S7 ~' j# ?6 V end;
3 H4 ]/ E! {1 o6 u h. P end;
( S, ]' ~) x8 C( L4 i$ hend; -- of the method
* {. u) M2 Z+ S$ {& H& |3 E: k |