/* called by: entrance ctrl of the object 'track'
; K$ B4 O8 v0 T( _ J7 g+ J5 u5 ?*/5 r# i s- D& D
is1 N9 d# f# f, C* w! Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* L2 M% Q6 w6 U5 h+ B, \* e
do
% R+ h$ c# n: l+ {4 F- U1 y Lan := rootfolder.Internal.Tools.AOLlanguage;5 B" a7 P4 @6 C) e
if current = @.Destination -- else return
+ e1 i2 C# ?( B then
7 I2 ?9 Y) ]" m. \# } F6 X6 y, A @.Destination := void;. g4 d% D0 d5 F- Q$ |% P
if @.occupied then# P' X4 |: }6 e: H, B
part := @.cont;4 o' J+ J: H/ y
@.transpOrder := void;% h; f. T! e6 m1 z3 C9 `2 ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 R& ^. } ^4 `7 y$ ?" B @,root.eventcontroller.simTime);
5 E5 A$ x W+ x+ \ @.HasOrder := false;, g1 g) C8 a6 ^, P: M1 b
@.DrivingHome := true;, @$ ^' z1 \: j o( ^1 u
rgManager.tryToStartTransOrder;
( |9 \5 F: P T4 }# b# M% _ if @.Destination = void
: p6 y1 k1 _: @8 g9 p; W then -- no transport order for vehicle @
" z1 ?; z! j* I& q% Y @.Destination :=6 J% J. `, j3 _4 q/ O
rgManager.nearestFreeStation(@,track.~);
- d: X* E3 t9 b/ m* z newDirection(@);
. H: C4 X6 C1 E' B* x) H if @.Destination /= void then _" p- W$ P2 M% \
@.Destination.NumReservation :=3 B3 ?. B2 a1 v1 z* Q5 d
@.Destination.NumReservation + 1;. V" T6 N# B8 i6 c* z+ r1 I- U
end;
7 H! I5 ?2 J1 _( B @.CurrIcon := "drivingHome";- V8 P1 g. s& z5 W
@.DrivingHome := true;, N5 E/ a6 U. z/ U O
end;
; V- Y. O9 o( W+ @9 s) E else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 K x% [# x4 O3 j part := @.transpOrder;
6 q; Y- L) Y6 E. N* n. X" T part.move(@);-- load part
" p9 T$ T. U; B# w* u+ s7 i @.CurrIcon := "load";* a# }* d0 @ ?
GlobalDistObj := part.globDestination;
0 ?9 i" G% X$ B8 \$ ]' g& O# l( x( v assignLObj := rgmanager.rgAssignL;% w6 J# W" s S5 G; p* P
row := assignLObj.getRowNo(GlobalDistObj);; } O2 v. ]* F0 T, y8 `
if Row = -1 then -- since 70& M: Q2 e: ]0 q0 }! g
if lan=1 then
2 t; v. y: N6 U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 n$ z( q: O! S1 g. }; h r
to_str("in der Andockstation: \"",?.~.name,"\""));! a+ f9 y1 T7 L$ V7 M+ w7 T5 D+ W
else& P( q( U, @/ R {; d4 {$ |: S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; D! O4 z5 r' \
to_str("in docking station: \"",?.~.name,"\""));
7 ^: S3 @% p$ f; V end;
; \, Q' F3 a) G else
6 y \7 s* v& @% _0 _. y2 P @.Destination := assignLObj[1,row];
; Y8 r l. }2 A* v: }' a end; 9 O: s% U+ f, q6 D" M% ]
newDirection(@);
& u& a* K7 d# w' Y* E+ ` @.HasOrder := true;5 T7 i. W: {7 d5 V
end;/ S9 L& ]& x6 A/ ^7 e8 S0 ?8 E
end;6 r- d0 R4 U* R
end; -- of the method
7 k0 _6 }6 d4 ^+ M$ z" }( B |