/* called by: entrance ctrl of the object 'track'
" g K. R3 ~) C+ Q, q: E f*/
+ Z; w. W) Z& D2 t2 s1 D' I1 mis) x8 x8 K* j5 f, V4 p: u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# G; x& N2 y0 n: R) k. v# t
do! _! \6 F* F: T2 s, \! c9 |( @
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ v7 X1 m* d9 B+ Z! ^: D if current = @.Destination -- else return% F/ S# ~* N$ B$ ?( O2 S' j/ n$ W: x
then
9 W! ~' K u! j) U- P6 s5 r9 r; d @.Destination := void;4 \1 i' r: h, Y) Y& u* M
if @.occupied then" r9 g1 I ^& \ H
part := @.cont;
9 j. s. E$ w2 _' O! @; C @.transpOrder := void;' B+ f1 R# p( h5 a# z* [1 {. G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! O& ~' x# q; i& L: Q8 u2 Z8 |
@,root.eventcontroller.simTime);
7 @/ p) x3 ^: q6 B- }: }: ^ @.HasOrder := false;5 M1 Y4 j+ r* n# A7 }/ u$ f
@.DrivingHome := true;" H; |# S4 y+ E& R9 U5 z0 d) K
rgManager.tryToStartTransOrder; }3 M( @# h) t- u0 O
if @.Destination = void D5 z/ i# l) W, c9 V
then -- no transport order for vehicle @' `( _* P( W h7 X# b1 \# R' ~
@.Destination :=/ b9 e( H8 M: W- {5 [
rgManager.nearestFreeStation(@,track.~);
2 j/ D1 i3 T6 i4 D newDirection(@); 6 A9 |% b; V5 @# x& v- r( }
if @.Destination /= void then) b9 {: g# U% b+ r& Q
@.Destination.NumReservation :=1 K; l, _! Y4 t
@.Destination.NumReservation + 1;
0 p' J T6 j, ] end;
% X, {( _+ Y! ]% y# C6 { @.CurrIcon := "drivingHome";/ r2 u7 R* ?5 j3 c: l
@.DrivingHome := true;
$ X' ~ H8 \* \: q end;9 [1 n0 u* b* m7 c. H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 L% o' a) i, _6 P. z5 U% x4 Z8 E* r
part := @.transpOrder;; v$ Z# Q8 f9 O) c2 e4 v
part.move(@);-- load part+ \# g0 W8 W+ \+ ]3 }& N. Y" m
@.CurrIcon := "load";" ]5 W" B3 }, y/ Z! s2 A9 m9 ~
GlobalDistObj := part.globDestination;
3 B% }: \: R9 `9 `% A0 _( r5 \ assignLObj := rgmanager.rgAssignL;
. o5 u# |, D8 J5 X9 M$ G. ~/ R row := assignLObj.getRowNo(GlobalDistObj);
( n2 [9 _* n2 Y if Row = -1 then -- since 706 l4 l" i, Z; B- g
if lan=1 then
) W- X- x" P' @7 c* Y) z" c* d$ p7 c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ U9 N& j7 E# a2 T S. S! g to_str("in der Andockstation: \"",?.~.name,"\""));
% F+ G0 e+ ]8 i1 Z3 ^ else7 S! \, K9 B4 D8 H9 F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 L: s' s5 P+ H' U7 F, B
to_str("in docking station: \"",?.~.name,"\"")); " K1 r' u0 \: p9 J3 O5 H
end;$ K6 X# V8 T! Z% j8 f
else
2 U& ` t3 e5 K @.Destination := assignLObj[1,row];
: b+ ], v. z! J4 a# ^ end;
1 Z$ Z% m% v( A* M# C2 F8 U: w newDirection(@);0 R/ D( l# f+ ^& y& @6 w3 ]2 {0 ]
@.HasOrder := true;
+ T* {3 v* O3 x X1 S* C end;
" B" B. ~4 D0 t% n) ^- } end;
. E. o ^ `/ [) V7 rend; -- of the method8 F$ R7 }3 ~- a3 b
|