/* called by: entrance ctrl of the object 'track'* h, i) v8 X q
*/
8 k4 n& ]* k, g8 A) P! }is- a. M* z% c) v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" v' ^& c" n) ]- q7 `$ f7 _do
]1 P3 {3 J' W- P: @8 ~. z Lan := rootfolder.Internal.Tools.AOLlanguage;
/ ^% s1 j4 b! I" ^* q2 R if current = @.Destination -- else return0 @8 ?$ a5 F& c( d4 {5 r# ?- x3 F
then
" a5 q$ ?) t7 j1 I- o d' J @.Destination := void;+ G5 g$ E. ]) |/ D% h5 d
if @.occupied then6 |$ H- Q# j2 @* @5 C! `+ ?
part := @.cont;
" t. O3 o3 Q1 _5 H! Q @.transpOrder := void;' ^6 X* S7 x1 Z; _" N* `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 x/ S; C: \5 ~$ k1 d& f8 A0 r+ l
@,root.eventcontroller.simTime);5 W% x, q* i$ t6 H$ N1 Y
@.HasOrder := false;7 b" g% V# w5 j. }
@.DrivingHome := true;. m' W, w! {/ H* `) x
rgManager.tryToStartTransOrder;0 Y5 ~2 C2 s! _0 `0 V% c* v" K
if @.Destination = void
& ?( }: u- R- A then -- no transport order for vehicle @. N. g& k f$ |, {
@.Destination :=
- r4 q6 I8 i+ W: x- L rgManager.nearestFreeStation(@,track.~);! q7 V+ y' Q U* [6 w
newDirection(@); / |* y9 U4 x" L6 x, P, }( h
if @.Destination /= void then
l% H# D! x' Z! d( u @.Destination.NumReservation :=) l/ s: r. |) i. x' d
@.Destination.NumReservation + 1;, X" n: }6 z9 x* z- `6 G
end;
4 ?1 y7 i$ k. X @.CurrIcon := "drivingHome";0 q/ M( j: h- p; e+ j) X% D6 x
@.DrivingHome := true;
7 n! Y$ h7 l: f1 S1 O: j t end;
# v; j }/ h2 j4 S. r$ g: Y, S else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 w& e0 h1 J) e8 Y part := @.transpOrder;( F# Z8 l1 ^; A6 f
part.move(@);-- load part' B% S# ]# |) K
@.CurrIcon := "load";
6 }: Z7 c/ J b) o) l9 ] GlobalDistObj := part.globDestination;
! p L( ~6 e( w/ n assignLObj := rgmanager.rgAssignL;$ R' b) F2 K) D, I0 Y1 T y
row := assignLObj.getRowNo(GlobalDistObj);8 j# h- C" K4 r
if Row = -1 then -- since 70
( k2 g; C: M9 g+ z' H if lan=1 then% D5 |" @# J( e# z. ]8 b
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; X$ w1 u2 k2 R n! H to_str("in der Andockstation: \"",?.~.name,"\""));
% N7 L9 `9 H1 Y# S& [ else; p6 H9 S9 A( k4 b1 L7 b, y: w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) K' y+ O5 s! T: ?
to_str("in docking station: \"",?.~.name,"\"")); ) F0 ?; t, b# A
end;
0 Q( y: B/ o: C W3 S8 L! ~ else5 N) C% J* m" d, W$ P* o% _" ` |
@.Destination := assignLObj[1,row];
( K( S. R: m& M+ V2 n end;
9 Y$ P" d- {' {, e/ C, b4 T' X newDirection(@);
, Q( ~ C7 a* [, M$ O @.HasOrder := true;
+ H2 \3 B0 |" e& u3 Z' X$ B end;
2 g4 a* J; v# r9 `# `& S! i2 n end;
4 v9 D" V0 D2 I0 b* {; X R! |end; -- of the method
: H( Q& N5 H4 U0 I% f |