/* called by: entrance ctrl of the object 'track'
* e+ m8 b1 w* g( Q*/
7 L/ n* d4 z9 Y6 `% {+ Y, R, Cis# X0 C! E3 \; s) W/ q; P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 F; V y6 c9 g/ E6 |0 m; z
do
' s1 f4 [# [% x! q Lan := rootfolder.Internal.Tools.AOLlanguage;: B0 E, V0 z0 r' P3 J6 U
if current = @.Destination -- else return$ @, S. S+ g) @ w* Z
then) N* C& J7 {( Y1 H4 m
@.Destination := void;
/ Z' R% ?& @. T1 o if @.occupied then. F7 |8 g# D# n# K- O# y3 t: `
part := @.cont;
% J- Q$ q, X$ { @.transpOrder := void;
/ g* Z- N1 r! J# w( P: X( F part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 ^- X! y4 |, K5 Z( p: v% Y5 |4 j
@,root.eventcontroller.simTime);1 Y+ ?$ M% E, N9 y: f' [
@.HasOrder := false;
1 @& J5 D7 i4 }6 T& x @.DrivingHome := true;4 N! J, I$ _8 W: u" `
rgManager.tryToStartTransOrder;
8 Z- a3 \& m4 G: @/ e" V if @.Destination = void
7 n2 ?" W3 I2 C) K8 D; ` then -- no transport order for vehicle @
4 ] F8 | x7 D3 Y @.Destination :=; I M, n4 D% p/ c
rgManager.nearestFreeStation(@,track.~);* \7 m& ?+ Y; N- g( a) L3 H
newDirection(@); 6 V V; e2 M( o9 I5 J! v
if @.Destination /= void then
- P1 N, N1 H8 A, W8 ? D2 }- @ @.Destination.NumReservation :=. ~# j! }3 W6 q: I5 I( R6 @
@.Destination.NumReservation + 1;
! s& g; y; V8 c } end;* r2 `/ x. O4 H {0 D* e# d
@.CurrIcon := "drivingHome";" U! F5 M9 C3 P" S5 q
@.DrivingHome := true;( }6 ^/ q( S( I4 B5 s4 B8 ~! `; X
end;
; p% ^1 a6 M2 q' z else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 |: g0 t% {! } D
part := @.transpOrder;
% V; N& M* F0 D; w part.move(@);-- load part
3 L' q, O: C5 q; A5 s+ Z" Z @.CurrIcon := "load";
, ?& j) E0 k, C0 x! E GlobalDistObj := part.globDestination;
1 u# u. y& {% d, L, p% ^ assignLObj := rgmanager.rgAssignL;$ M: `- a1 B- j/ p2 ]. A
row := assignLObj.getRowNo(GlobalDistObj);
# `6 }+ _; H* R" e! A2 d4 T- t if Row = -1 then -- since 70) E: b) I" w8 o: `/ z6 v
if lan=1 then
- e" l2 J5 I& C! T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 {8 S/ u6 [0 j4 |, U/ X3 _1 r' i5 c to_str("in der Andockstation: \"",?.~.name,"\""));
# X5 I! g l( X else
" A+ T+ `: T* a7 ~/ u: F2 V0 ~/ g promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 V* r: m8 h/ f {, d to_str("in docking station: \"",?.~.name,"\"")); * o* z3 O5 D4 W# m$ s9 V M6 z8 {+ n
end;- K/ l! Q9 {; y) s4 ]3 F" T
else
, b# j! ^ E: O2 L, K @.Destination := assignLObj[1,row];5 A# u8 c1 ?9 U9 }
end; ; b! Y2 y. L1 ?8 o. G* i
newDirection(@);$ M5 Z4 j* A0 ?$ W5 k1 V( w
@.HasOrder := true;* O( `0 q& u# }8 h- q. ^
end;8 H2 b5 c: M- R" i( k7 m1 v* N' v
end;
. L# l |6 b2 ] m% uend; -- of the method/ ~5 O6 I6 }& a) w1 T
|