/* called by: entrance ctrl of the object 'track'! [ [2 y3 x; j
*/9 T0 D* M/ _! t9 q. m$ L9 v3 }
is
+ h' P" l* S4 N2 o. [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;- n, R ]) |) ]& J
do
' I* S6 D, Z2 I: } Lan := rootfolder.Internal.Tools.AOLlanguage;
* n( Y" ]5 c; _% z* ^ if current = @.Destination -- else return. s7 S. v7 j! e- @( d
then
l$ U" z6 g: k @.Destination := void;+ v% H, ^% q( q Q
if @.occupied then
" m* G2 S+ ^/ l( q( w C part := @.cont;* O( Q8 G" g/ p
@.transpOrder := void;6 x& J2 W- [: \0 Q4 h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 P4 E- C. f8 j9 q' O9 i @,root.eventcontroller.simTime);
9 v- a. M! A* J$ ` @.HasOrder := false;5 n5 ]3 I8 G' s$ d* B- {3 Q
@.DrivingHome := true;4 \: I8 ~1 q8 u0 F
rgManager.tryToStartTransOrder;
% C' P& V. }- X7 ^; q if @.Destination = void" A T& H5 l7 \+ ^# d
then -- no transport order for vehicle @% z( R2 F" E& G# r5 F
@.Destination :=
" L ~- q0 G. i# w' H9 r& s" H rgManager.nearestFreeStation(@,track.~);5 f6 Z' C5 u# m
newDirection(@);
5 P* y' |5 \1 R1 ? t, ~ if @.Destination /= void then
3 f5 Y) s0 D: a6 }( Y" i! Y, L @.Destination.NumReservation :=
2 l% k1 `; y0 W; ?) R! j% | @.Destination.NumReservation + 1;
7 m* v, S' @# ^7 y end;6 A6 F) r, J- s. v
@.CurrIcon := "drivingHome";
- ]% I% f( z- q# h+ L5 N @.DrivingHome := true;
% c) r6 I* h1 |% c; X9 P" x, S- ] t end;
& M* E+ F- g) T else -- the vehicle @ is empty, both vehicle and part are in the same dock station }6 Q# d* c# G6 [% K/ Q: ^
part := @.transpOrder; h2 c# }4 D2 Z2 C/ K) Z; Y
part.move(@);-- load part* G* I5 H3 d* T4 d; L/ T
@.CurrIcon := "load";
6 W3 M: x( n7 S0 A GlobalDistObj := part.globDestination;9 X; W8 Y9 b8 v8 n3 j! Q
assignLObj := rgmanager.rgAssignL;
0 V8 p0 L% g0 U+ z# _' x: j7 j3 J* G* w row := assignLObj.getRowNo(GlobalDistObj); ?, I2 g) a( D8 E* }) Z7 t
if Row = -1 then -- since 70; _& J2 P. D3 k' t$ S9 a9 |( T
if lan=1 then
6 }& E' S( v+ t$ H& I* x5 C8 w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," Q6 ?2 b9 E) i6 O# I
to_str("in der Andockstation: \"",?.~.name,"\""));
, F, W. r1 R8 ^9 K else
; k2 m* `8 |6 ~# B6 k, }1 ?/ w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( ], Q9 s: K$ }
to_str("in docking station: \"",?.~.name,"\"")); 6 o* @: e% K: f, m6 V+ {5 g
end;7 A( O2 o# Z* T( W
else6 ~* z* T% U/ P& ]0 S; d
@.Destination := assignLObj[1,row];
3 k4 }4 M5 W2 v end;
: e" u9 y5 u/ l$ v+ N* _7 x4 F) ` newDirection(@);; c3 K$ O. C# m/ U' R
@.HasOrder := true;
7 K9 F2 f- `6 U- B" b end;
$ [3 \! u e) l7 E& e! E9 A) F end;* b" d$ u( W/ Y; a/ m
end; -- of the method5 ]3 s' ]5 p# O: _. d. A* q8 ~
|