/* called by: entrance ctrl of the object 'track'0 C$ k2 M# b. I! V4 B
*/, ~; G/ `) [ I7 E4 t
is5 s" G3 p0 w9 ]# o& r& j
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 s$ F2 Y9 A; \1 ^+ udo" n8 @9 |% L- G+ M
Lan := rootfolder.Internal.Tools.AOLlanguage;+ G8 a6 L i) X/ z2 L8 z
if current = @.Destination -- else return
, Q0 w) Q4 H: c) l then
^: y- {" z. U( g- j. e% ~ @.Destination := void;( l* S" n9 U) Y" u$ e6 e1 M* n% J* O
if @.occupied then
; z) w. `3 A1 l2 @5 B7 n7 m/ a: B5 I part := @.cont;( s" ]8 W2 x* H5 Y
@.transpOrder := void;& K" r2 e" d: w, z, O! ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- d: `/ y% Y6 s+ k6 T
@,root.eventcontroller.simTime);! K; e* B5 k1 J+ g5 K. t8 c5 \
@.HasOrder := false;0 R( m3 n) K$ X7 y. v
@.DrivingHome := true;% s1 o# {2 Y5 w& P$ f& Y+ ]
rgManager.tryToStartTransOrder;+ p7 ~! D" t! ]- ?* K" n
if @.Destination = void
* @7 _/ ^( u# G' X6 _ M! } then -- no transport order for vehicle @6 ]: R! j1 y, _' a4 T& S3 W3 \! {0 j
@.Destination :=8 f8 M. } H& ~6 F2 d a
rgManager.nearestFreeStation(@,track.~);
9 b3 a; i( {2 J( p7 J" l5 G newDirection(@);
* E( r# ?& H5 w& n7 U, A. B if @.Destination /= void then
1 v9 b7 F2 l2 B, {; |+ P @.Destination.NumReservation :=# Q" n' Z4 U8 j8 a* q4 j* H
@.Destination.NumReservation + 1;/ |5 p" F& R3 d+ Y: K: d8 i2 @! N9 t
end;
2 d+ k2 Y( S# [2 \; v @.CurrIcon := "drivingHome";
% Q' s2 d6 e! g3 p \/ f, ` @.DrivingHome := true;
m a# c5 S( `$ i( [/ U& n. ` end;
1 T3 J! Y$ `! b. K else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 N0 h% P& s0 [% t- u- ^0 v part := @.transpOrder;- k5 W5 o2 K( D! [% E# q
part.move(@);-- load part
, l0 h: d6 ]8 x) }) E @.CurrIcon := "load";# V7 E! F% l7 F1 [. R: L g/ C& n3 U
GlobalDistObj := part.globDestination;
1 u$ _/ N# {' n" p( C. Z assignLObj := rgmanager.rgAssignL;7 E9 o7 O/ d# S6 ~! \4 C
row := assignLObj.getRowNo(GlobalDistObj);' Y: a+ F2 \, T1 ^' \" G
if Row = -1 then -- since 70
@ X- M) r6 T W) t1 r+ v if lan=1 then
0 n: X( P% W. n ^, w, N2 w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. r! O; l- @1 r6 Z' ~0 s to_str("in der Andockstation: \"",?.~.name,"\""));
9 X8 b6 h8 u1 W else2 T, u1 M% A- T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; ]% A! Q7 ^( }4 ~8 b2 Z to_str("in docking station: \"",?.~.name,"\"")); * X! l s0 H1 U @
end;
; F# X. @8 @. i7 v8 N. e else% u" G! S4 J; J6 I
@.Destination := assignLObj[1,row];
* r: ], K6 m! f) S4 e end; 8 d6 b/ [ \1 L" c! V
newDirection(@);
# S5 \' n$ S. E @.HasOrder := true;
& Q# x9 D( ?4 `. E end;$ C7 I- G" l: ^! Z
end;
: n/ D& T1 r# Zend; -- of the method
1 s1 }/ }! e5 j |