/* called by: entrance ctrl of the object 'track'" s: T+ o# c' Q% X* ]
*/3 O: C, A2 {" z4 M
is
% @9 \0 B. q# R. `6 g- ^" i part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, l7 q1 {- W! `/ e) \+ ]. N* ^do
. @: L) ~& c4 Q7 b, P# \ Lan := rootfolder.Internal.Tools.AOLlanguage;
f1 {( B& ^, g h ]. i# M if current = @.Destination -- else return1 h3 u8 l- O2 O" h# ^
then
6 N' u. Y6 L0 b8 f8 E4 k; r, D5 x9 h% ? @.Destination := void;% M) }) {' i# ]1 A; g+ H( ?3 C
if @.occupied then
" g6 k; f$ p5 n7 X, e- @ part := @.cont;
+ t: r5 G$ p# j @.transpOrder := void;* }0 g" i! h2 D1 v; E" D" ^% m0 H% Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 N% F0 o2 c' f' b% f6 v
@,root.eventcontroller.simTime);1 r' G8 h& ^" Y5 ~0 H) }0 Y( X! o1 j+ D
@.HasOrder := false;
4 y! f+ D) L) `: G9 [) ~ @.DrivingHome := true;9 [( k- w! ?* F3 w: s& w
rgManager.tryToStartTransOrder;
: F( ?, u8 |- M if @.Destination = void
# }) a- l ]( Y then -- no transport order for vehicle @. a4 |4 \: r* F' B3 j7 C& n
@.Destination :=; s# [4 |' Z" H. B8 |
rgManager.nearestFreeStation(@,track.~);1 }& p _: ?3 S3 ^" F( f
newDirection(@);
! T0 k: k; Z- M! h if @.Destination /= void then
% t( N( O" P. T+ k! t @.Destination.NumReservation :=4 n! ~# L. l* Y1 u# z, X
@.Destination.NumReservation + 1;
' o$ Y8 H( d; b5 n8 r# C end;
: \* h& a- l' c( C1 R1 _ @.CurrIcon := "drivingHome";
! E+ {: K) |# J& b# ^2 q3 K. A1 u @.DrivingHome := true; t$ }$ ~" n5 n# u; u# X
end;
) n3 ]9 A" ]/ R' z) x$ g else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. X) c* J0 z! _6 X! W part := @.transpOrder;+ ]) W. R S$ E4 D; I: V9 k/ {9 v
part.move(@);-- load part
7 F' J7 E" p/ L2 I" o h @.CurrIcon := "load";1 [! p$ ^' t2 V( N3 ~" N5 ?8 L
GlobalDistObj := part.globDestination;2 S8 M8 G- ?! _( N0 F- {1 |# i( v
assignLObj := rgmanager.rgAssignL;
( }! b7 q: a) P/ y9 h row := assignLObj.getRowNo(GlobalDistObj);" t' W2 i% O1 B, i
if Row = -1 then -- since 707 H* i+ f; t# c7 o6 J2 Z
if lan=1 then
* Y, l0 S2 d7 p8 z7 t: z0 V3 _, ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 }* R& H9 g: n. A1 Z
to_str("in der Andockstation: \"",?.~.name,"\""));& m4 Q; n& F7 l& S% M2 K& e
else
3 s% V6 @6 n$ j: g" g. n promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 F' {( Z1 [5 K+ I! h8 I" r6 v to_str("in docking station: \"",?.~.name,"\"")); ! n! Z; G$ d% v+ f9 U& [
end;
' A0 c* V) m# c) O3 N else
) D) B6 {3 ?$ E' H0 E9 r' M0 ] @.Destination := assignLObj[1,row];: a; {1 C5 x! f% |/ O/ z- L
end;
j D# Z7 @4 S0 {! A newDirection(@);# h) L, E) g( j6 l3 {
@.HasOrder := true; U4 d+ c5 L+ I- p- U; u
end;0 \; m4 e! c+ t+ T% v1 _
end;( H3 b P; `5 |2 t
end; -- of the method
- k# _0 D& Y( v6 K2 L' q |