/* called by: entrance ctrl of the object 'track'
. Z+ T( k6 h" N0 X& C*/
. {! o7 O- d5 H* P. w2 k, bis9 y% J) S0 x4 x- \4 a
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' U ]# E: `2 J
do1 Z! u1 C2 t! [; H) |$ v
Lan := rootfolder.Internal.Tools.AOLlanguage;
, B. B2 @9 ]9 U: U8 A: F- M' w if current = @.Destination -- else return
1 q. p9 I/ L9 c4 L* S# D; V then4 ?3 D3 d: T" `, Z6 [/ Z
@.Destination := void;
- N$ e! T9 M& N9 ^9 a# ~9 v U if @.occupied then& B; ?; H% A8 b6 P: \$ H7 ]
part := @.cont;
; ], Q0 u4 o& O" L, r. j3 c @.transpOrder := void;8 _/ k/ W, F) \- G/ a; I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: O! G& k! s# y' `6 ^* m A) }
@,root.eventcontroller.simTime);. H; h. I. B* j2 w/ _
@.HasOrder := false;/ R2 u: o) ~, H9 z' u- h
@.DrivingHome := true;' x* o6 [/ A$ e; u+ K( f7 ?+ M2 g
rgManager.tryToStartTransOrder;
; n. F$ ]+ d! t7 h if @.Destination = void* c" |& E) ]) u$ c# u
then -- no transport order for vehicle @
+ i6 s/ {- y7 ^$ ~( m @.Destination :=
* u8 P6 S0 L" K/ Z6 W1 S rgManager.nearestFreeStation(@,track.~);! W2 U# |- u- L0 R" d
newDirection(@);
. r9 P' i l0 w+ T( Q* M9 T6 a if @.Destination /= void then }+ r5 e' ] {1 e, F, n6 |
@.Destination.NumReservation :=' p3 u4 d$ g+ f# R" U4 u6 a
@.Destination.NumReservation + 1;
4 l8 q) e9 E4 _$ y6 w% N( D' P4 e end;6 X( m% Q6 d: c& W& e! F
@.CurrIcon := "drivingHome";% W0 Z6 m. Y( W; `( g* Z
@.DrivingHome := true;4 m2 x) S$ K8 A ], o
end;, H; x- s: r4 Y8 z3 a- {% A
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 @& a. T; r9 W$ }
part := @.transpOrder;, `# S3 B2 {9 ^" Z7 ?3 r
part.move(@);-- load part3 ^+ k* w! D& M1 r; }9 F! y/ b( z
@.CurrIcon := "load";
1 X* r0 Q' p5 I: z1 } GlobalDistObj := part.globDestination;( b. H$ q; C# o$ }5 x
assignLObj := rgmanager.rgAssignL;5 A3 f1 G" |3 I l5 J$ [- T
row := assignLObj.getRowNo(GlobalDistObj);
- [! j+ V! W3 @: q5 l6 I if Row = -1 then -- since 70
1 g" [6 `8 J$ k& E, K if lan=1 then& A! t9 e3 _5 }2 v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! q5 t4 \7 l9 @- \: Z4 {# @2 \ to_str("in der Andockstation: \"",?.~.name,"\""));" I/ J8 o: {" z4 B: X. Y% m" o
else! q1 f2 b) A, z$ H; G! L- E6 v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* ~# l+ H& \ Y to_str("in docking station: \"",?.~.name,"\""));
# B+ c- U R8 p! Q5 _' F( d$ ^. { end;
$ x1 V- F8 s a0 Y6 r else
: y+ a2 g N+ C' m @.Destination := assignLObj[1,row];
$ `5 Q9 M* E: z) O7 C9 _: K8 ~ end;
- c3 k: h5 k1 h+ g9 r newDirection(@);
" y+ S% l$ o5 t9 ]9 K* l* A6 E t @.HasOrder := true;
( v& A+ S& w) S& \9 @7 r0 V! I end;
7 X$ l' R# D; F R" N end;
3 Q! W9 \# ?$ I0 P; @end; -- of the method
M% q* g$ T9 ~/ y |