/* called by: entrance ctrl of the object 'track', G# l& Y+ C5 [# b. K6 Y
*/ A, G( _8 k8 @, D
is2 Q: _4 p5 Q* u: N6 i8 G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 @$ L4 _" s/ v Q) Rdo
& Y5 y4 {- R8 f0 y f' ` Lan := rootfolder.Internal.Tools.AOLlanguage;5 ~4 D# j& b$ K6 f
if current = @.Destination -- else return+ e9 P; y0 q7 c1 f0 I
then
) g- y9 R' v4 l9 ^0 s @.Destination := void;( m) D" I7 I9 a, c9 {8 Y& {
if @.occupied then
1 z# R* g- J3 b( X; f* R! q" L part := @.cont;: }* }+ d2 J H1 ^5 i; t* y# i J
@.transpOrder := void;
+ h7 g1 ^6 q1 f! c: K) {6 g; ]* M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# P$ L' V* o$ l* b0 q( y @,root.eventcontroller.simTime);' S( i3 ~1 M2 x ?6 Y
@.HasOrder := false;
8 m! M1 w8 n$ B' m+ L% P) h @.DrivingHome := true;
5 g5 g4 n7 w+ ^6 A+ W rgManager.tryToStartTransOrder;
, X) ]) |$ n( {/ t" f+ }- t% l if @.Destination = void
5 @3 |7 c; h& z6 m3 ]* q2 [, K6 A then -- no transport order for vehicle @7 I0 B' j$ c# V& B
@.Destination :=' ?8 ] r2 Q1 v2 u' u3 B
rgManager.nearestFreeStation(@,track.~);! k) [: m+ r, q9 O
newDirection(@); ! `# {! Y4 p) m8 U1 ?' w
if @.Destination /= void then
* Y# m$ Q* R% t f @.Destination.NumReservation :=
/ B6 D6 H6 B5 Z @.Destination.NumReservation + 1;* ~, ^* t. c7 y! X9 p& W' N" i3 X
end;
' H1 C! n5 S2 X) U5 E& q0 ?- m @.CurrIcon := "drivingHome";
F/ T/ X* g- B: `) u' B+ i6 ] @.DrivingHome := true;
' d+ n& Y' H8 J end;" l# C4 g0 t: s1 @8 q, f
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ ?9 ]6 F% e$ q3 f part := @.transpOrder;
0 D9 X5 ~* Z; R+ b$ D0 F; C part.move(@);-- load part
2 h4 U4 Q9 k& w7 g' e @.CurrIcon := "load";
% P4 w! C8 @6 Z( { GlobalDistObj := part.globDestination;
$ k5 d' G& V# l; ~, _( y assignLObj := rgmanager.rgAssignL;9 B& ~6 y" A+ v" L1 P$ ?
row := assignLObj.getRowNo(GlobalDistObj);8 d5 ?) ?. y5 ~9 Q o
if Row = -1 then -- since 70: k4 W0 b! w2 x2 X% L1 [$ J
if lan=1 then+ L6 U9 U) y1 ?1 W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- S* h5 I! ]: l" T: G/ a0 ?
to_str("in der Andockstation: \"",?.~.name,"\""));, X. Q a* @7 d
else
0 N; _0 V) ~& o9 T8 G; ^$ U Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, a }. J6 L/ ^, t" I2 V4 u' o
to_str("in docking station: \"",?.~.name,"\""));
* X( d2 J" |+ i: \1 c/ l end;
Q# U) g# ?" K* T- ~ else
+ B1 E$ _9 j! |( d @.Destination := assignLObj[1,row];
7 h$ n: ~4 O, z9 r% T end;
% F9 u' r9 |( ]/ C0 @( Y# Q newDirection(@);
4 P2 }8 I l; [! y, r# U @.HasOrder := true;* h1 M/ D: q) D) j) \& @
end;
, F3 L9 h, s( H# c9 M' ] end;+ y) ~- ]/ E; h# I8 R6 J
end; -- of the method& W& q3 ~, n* B2 \$ V1 }: {. U
|