/* called by: entrance ctrl of the object 'track': T- V, J! W% h }. z! `/ U& k
*/% k8 R, ~+ V# g' x4 e$ [8 R
is
1 P; H/ ?& B8 T part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 i3 L. |1 `1 P% `& P) W) |
do1 _1 Q2 |0 ?0 D. G& c
Lan := rootfolder.Internal.Tools.AOLlanguage;
; T0 A3 C" [) k! ^( Z if current = @.Destination -- else return
* [# g! O- C2 N4 N& L1 d then
# p, x3 V" Z3 j3 [ @.Destination := void;
% A2 I6 r" z$ O if @.occupied then; B6 K+ O! T) x% N# z4 S
part := @.cont; O3 [5 i3 ~( d; ]7 J9 t
@.transpOrder := void;
" `. U0 m# `& j" h3 c" P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 h q' M) z' B. M4 @! Q+ c @,root.eventcontroller.simTime);
- N& e' U9 g8 M @.HasOrder := false;
/ P* Q& E! e! ]5 L# O @.DrivingHome := true;
1 m4 D& ]5 T. e rgManager.tryToStartTransOrder;
7 q! w, @ m! C: r if @.Destination = void
0 ~4 l* i7 a' _2 \ then -- no transport order for vehicle @
1 e4 d) e; G) k0 C& x' K @.Destination :=
+ c$ ]1 C- E2 {# t$ W rgManager.nearestFreeStation(@,track.~);
' w# G- c7 M9 n# i newDirection(@);
: S/ u% G) }# o' M' e if @.Destination /= void then/ S' P+ p9 ^: X- |6 o
@.Destination.NumReservation :=
; R- ^, V2 d V @.Destination.NumReservation + 1;1 w: j+ d! B& @3 o; N; [) y
end;* T; b3 m" l! z, |; x
@.CurrIcon := "drivingHome";
7 e4 Q; H( D$ @" ] @.DrivingHome := true;! A8 A* y( P' z/ \: K5 r
end;
! b" s4 M, ]! ^6 n# c else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 k1 P( r' Z" g2 v7 S0 u$ p part := @.transpOrder;
$ b/ K7 x- v* ?' @ part.move(@);-- load part. y( j, m: j. N" n! M) b6 x* v) \
@.CurrIcon := "load";4 }2 f; o7 w: \# E% [& f
GlobalDistObj := part.globDestination;
" o! `, q: U( Y assignLObj := rgmanager.rgAssignL;2 ^ i- r8 S. V
row := assignLObj.getRowNo(GlobalDistObj);7 j" X% k( ]; s9 N
if Row = -1 then -- since 704 A$ j" t6 N8 j
if lan=1 then
0 y1 R2 }" \$ X3 R: o v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 O3 l5 R# S# J& C1 ^5 A; L$ { to_str("in der Andockstation: \"",?.~.name,"\""));& y# h6 o9 t; }4 Q+ @0 l
else- c# N, i- F3 ^. {* R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, \. J% V& S+ y+ U: T' t' d( S to_str("in docking station: \"",?.~.name,"\"")); 0 M. ?) @/ X6 F# j. [/ f
end;4 }& A* T% J, s
else
- _) i6 m% S2 X% h3 z @.Destination := assignLObj[1,row];
! O& j- p+ X4 Y! \8 M3 z0 b end;
. {, F* u$ g* p3 z6 c newDirection(@);( J5 {; V" P/ g9 R3 `. ~* V
@.HasOrder := true;
+ T, y! \* v( q8 i# I5 U: ]! A end;& o5 p. {! |/ C0 c* {
end;
3 G5 y0 |$ z, w0 t$ [) Yend; -- of the method" G U' K- B6 E
|