/* called by: entrance ctrl of the object 'track'
3 z, t$ {+ J: `1 `6 O- P/ f*/
7 }+ M! j/ O/ R: Dis2 Z$ E* G J' j( k& L- }0 Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, _3 d* j; g- U$ v! T Y5 h$ Q2 {do
+ Q. H6 X5 }' m' v Lan := rootfolder.Internal.Tools.AOLlanguage;! S; z! x* x, D( e4 @- X
if current = @.Destination -- else return
. Y5 S3 r3 R9 Y% w/ R( z then
% y! n# z0 R: d" a$ V @.Destination := void;" k) Q& J1 L; [# z. N
if @.occupied then
6 ]: c& n/ T* i$ P" q) m part := @.cont;
" u. } t7 a p0 r2 a @.transpOrder := void;8 F) r1 y0 x! Q7 I& u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," B" G3 A6 O8 @, ]
@,root.eventcontroller.simTime);; i; R8 _" I$ F" _
@.HasOrder := false;
n% C" Z' C1 S. T. ?+ R4 t3 c+ H @.DrivingHome := true;( h1 v8 X6 K" ^
rgManager.tryToStartTransOrder;
5 |& o$ L8 v& w) V if @.Destination = void
f5 y5 w$ V8 |( x, o' v then -- no transport order for vehicle @
2 n6 z& @8 Z1 f3 d @.Destination :=
# }: k/ C* Y; ^7 k) p# H! s0 v rgManager.nearestFreeStation(@,track.~);) E7 U7 Y6 E; A- b
newDirection(@); ' K; i5 T( i6 ?9 x
if @.Destination /= void then
4 \7 f( e9 `2 {7 e @.Destination.NumReservation :=
/ p( L W9 W ^9 v @.Destination.NumReservation + 1;% B( q# D& k d5 p' q3 O
end;
- \, x" x+ i' t @.CurrIcon := "drivingHome";
" w0 e$ M8 a" u: y" | @.DrivingHome := true;
% d# G& H3 O4 ]( b' J end;. Y0 _- `/ g* g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, C- E1 J" c1 e7 y+ |3 f& F. q- X part := @.transpOrder;5 P4 [) U+ b# e( t! n: z9 h5 O
part.move(@);-- load part
5 ?% }2 d& P% L" q* X1 I1 w) s @.CurrIcon := "load";& G/ T. \, O3 a9 x
GlobalDistObj := part.globDestination;& ^. P* x+ a1 d N
assignLObj := rgmanager.rgAssignL;
9 Y. s) d% E/ R6 r( t- ~( I4 g row := assignLObj.getRowNo(GlobalDistObj);8 {. W7 d- y& w
if Row = -1 then -- since 70' s3 I9 C! d' U
if lan=1 then6 o4 M+ _4 q7 z* z9 \5 g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 I2 _2 H, }& b) i$ Y
to_str("in der Andockstation: \"",?.~.name,"\""));
/ [! y: K7 ^5 y3 U else
5 h8 M/ m* x' L: s5 N promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* c, ^3 w% A) J& a) {6 Z
to_str("in docking station: \"",?.~.name,"\"")); 1 n2 u' Q2 d6 B* |
end;( v+ V2 e- n9 _6 f" X# F- Y" x
else
8 B' O7 e) E9 z/ e5 T1 a @.Destination := assignLObj[1,row];$ r' z1 J9 B' f7 {& _
end; , o+ [8 ?6 m( }7 D- L/ U& U
newDirection(@);" _9 X4 [1 x2 m' i
@.HasOrder := true;
0 W/ R+ X9 A7 C+ l w' _- \ end;/ d; [ V/ s% _5 j3 f+ C4 ?8 N
end;
* E f3 ?4 l: g2 M7 J$ Kend; -- of the method3 ] }3 a% R+ O' z
|