/* called by: entrance ctrl of the object 'track'
$ g( x1 O% M3 q8 R*/; Q7 J0 U4 Y' p6 m b
is
: K! y; u, h3 M6 ]4 W+ y$ [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* C* \+ ?: ~. h8 m) \do2 T1 \8 `6 l( }2 ]% \ k" t
Lan := rootfolder.Internal.Tools.AOLlanguage;
' g" b5 ], ]& E. b3 U/ l" { ^/ i if current = @.Destination -- else return
) l) O) f/ }: ]: Z, s# a then, j' W1 h1 f3 c' c
@.Destination := void;2 E$ k" R* d. Q$ G8 V. t# K+ \8 n
if @.occupied then1 |( W6 c& ?( I7 S
part := @.cont;
$ \4 C" \. b! t, m0 x @.transpOrder := void;$ p" j" Y; w b, I* j, r
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( @6 ]/ ~& J% v @,root.eventcontroller.simTime);- N; m( L7 Z; u# f4 J" y
@.HasOrder := false;
" W1 n9 _* y/ q, O/ K @.DrivingHome := true;, g+ x e3 V0 O; d- G
rgManager.tryToStartTransOrder;
/ s6 \1 c6 Q: C if @.Destination = void
5 U& t- Q5 ]% k; R0 k8 X% D& U. B then -- no transport order for vehicle @
$ [( N' q6 j+ x8 n @.Destination :=
* ?- M" c+ ~' I5 K: X rgManager.nearestFreeStation(@,track.~);
( r3 F' u; t2 Q1 q" m5 p7 L* ` newDirection(@);
7 ~9 z/ T/ q: ~2 u0 ` if @.Destination /= void then
6 j6 D6 I* ]. C* E& }+ |) `2 S @.Destination.NumReservation :=) x# I6 f, D; O h& O
@.Destination.NumReservation + 1;
9 |) g7 A, E' c" |! m# m) Q9 i end;. Q- r, Y8 T# H& f; W( w1 M+ r1 k
@.CurrIcon := "drivingHome";
' n9 I% }/ h1 D9 E& u4 e. Z4 ?& { @.DrivingHome := true;
+ @( i" h" k% X6 a9 G6 O f2 E end;! ^- s$ w4 v; [7 P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 k+ t" s: B& d
part := @.transpOrder;
( G3 [8 w) o% Z/ ~ part.move(@);-- load part. j, O: s/ e0 T" j* \
@.CurrIcon := "load";
! ^: D: M- y: ?) L) \ GlobalDistObj := part.globDestination;
. \( C. K. s; }8 u) K7 y assignLObj := rgmanager.rgAssignL;( h) T7 o j- N; f+ \+ {
row := assignLObj.getRowNo(GlobalDistObj);
& T* \4 c# W3 }& G0 C if Row = -1 then -- since 70
$ a2 R v, k& C if lan=1 then
; j6 R( p5 Z2 S) ]7 G0 S" p promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 U8 w( w _. t D1 b t: f to_str("in der Andockstation: \"",?.~.name,"\""));
( {9 m2 ^6 ]' _$ E# ~* x else
) e$ X1 }1 G- ?! u4 v( Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. {8 Y1 y: y, y( n) F& r+ @
to_str("in docking station: \"",?.~.name,"\"")); 6 d# ]! s1 K c/ p
end; |. R. u- m: `+ j6 D
else: K& X0 X! U+ |+ z' |: a1 b
@.Destination := assignLObj[1,row];
2 V7 u( q- P: F0 G% f5 r5 L end; 4 L6 F7 U+ l4 g' r* C" g* t
newDirection(@);- ]0 V/ v, x) b& z6 G1 b% W
@.HasOrder := true;
0 e; O! N& f7 L end;
" ~+ f7 [) ~% z6 l end;
: P# D C$ W& B. r7 k+ [8 Cend; -- of the method% C) [. d. v8 u9 u$ ^# Y* ^
|