/* called by: entrance ctrl of the object 'track'
$ b: }& S" U; |7 }2 v*/
3 l$ r* T. s2 b5 S: t) ais
% d. ]9 t4 M/ i part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: ~& z) g# A( Vdo' ^" a6 [0 {0 J" J
Lan := rootfolder.Internal.Tools.AOLlanguage;, R; u8 M: G! Z% q: @( X
if current = @.Destination -- else return n) J- P; A1 s: |9 [- O' F
then. \! b$ y7 Q5 E2 r) w7 y3 W) s
@.Destination := void;* L- W8 P# C8 `* o- ^
if @.occupied then7 l) @) Q& T0 @5 M- Y d2 m
part := @.cont;% Z; A$ C9 a* j8 Y1 W! \
@.transpOrder := void; b0 M; t1 d6 [% N6 Y" O" X+ e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 @* ]' v, \5 u( u5 ~7 D- p# e6 F @,root.eventcontroller.simTime);
l7 _6 U! y H( f. G& q0 |/ g @.HasOrder := false;
* x3 z3 V3 [1 | @.DrivingHome := true;
+ X ?' Z3 M5 g N/ ?+ b8 [1 f* ~ rgManager.tryToStartTransOrder;5 h9 f& U$ [- z: @7 P4 N4 s9 C
if @.Destination = void
4 X5 Q5 H* `4 h# ~9 ]6 i then -- no transport order for vehicle @: P) E& N8 Y3 V
@.Destination :=
+ Q2 E" I9 m+ V4 S" _1 t ^: a9 a rgManager.nearestFreeStation(@,track.~);: a3 D' C" T- w6 l- [& D
newDirection(@);
0 f% n2 U* |7 {3 L if @.Destination /= void then
( n% g& o. o% G6 _+ [! B @.Destination.NumReservation :=
0 z6 h$ I* Z+ J/ X @.Destination.NumReservation + 1;, V2 I* g5 l6 F0 f# `7 W
end;
2 e* Y& L7 [' |' w5 B) {2 K& ?' Y @.CurrIcon := "drivingHome";
5 g) k# R0 h0 C/ M6 n2 R$ Q @.DrivingHome := true;, K n3 E$ O7 ]* G3 W) E1 ^
end;
) Y% p! }( P% w0 J else -- the vehicle @ is empty, both vehicle and part are in the same dock station! o9 G) N$ `3 [+ {* [% G! F
part := @.transpOrder;. R( r' M8 B! U) b) M+ K9 r
part.move(@);-- load part6 L% o7 H6 H) d( b
@.CurrIcon := "load";" o) |6 | O* v$ A- [9 p
GlobalDistObj := part.globDestination;
# H2 _4 |% _7 [+ E6 l+ \9 T assignLObj := rgmanager.rgAssignL;
& N0 }2 J* R. \( r row := assignLObj.getRowNo(GlobalDistObj);4 ^+ ~3 ^; U$ V: y
if Row = -1 then -- since 70
. d/ Q& e6 d2 n( N4 N X! I4 x" |8 T if lan=1 then1 _' `9 M$ g; b! \; c' Q: o% U
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," z; M4 z* i' T
to_str("in der Andockstation: \"",?.~.name,"\""));5 V' u; F/ E4 V- ~: Q9 u
else+ ^" ]& b9 E7 V8 [6 I! k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! q. l' a+ A! d' T6 |+ g
to_str("in docking station: \"",?.~.name,"\""));
% g2 L; K! R/ k4 g: Z F end;1 L8 w( i: j6 D* j
else
$ h, C! {5 n# }; y+ ^# y @.Destination := assignLObj[1,row];0 c6 ~. Y% O C
end;
& f/ Q5 r; Q, v( e$ L, \' J" O" g0 W newDirection(@);% G: S% n8 V& _. _
@.HasOrder := true;; C# T* ^& U5 {9 u9 y/ N8 u( X
end;6 W8 l; i/ ^; i; @. N
end;
, U/ |( M# Y8 L* A9 xend; -- of the method
- z, H* o0 b. |) Z$ I |