/* called by: entrance ctrl of the object 'track'
y1 H3 Y% |5 T; Q3 b! i*/
0 u9 ^5 C4 z/ K" J6 Mis( w# F D9 [ S' |! U% T" X4 ]. t
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 X, M) W$ z' L" e$ M
do
) R. Q: f$ ]' b6 m$ W& X Lan := rootfolder.Internal.Tools.AOLlanguage;) e& g' x. n% _
if current = @.Destination -- else return
0 c& U" k7 V, Y7 ] then
% A7 Y0 m# g3 b% G9 p; | @.Destination := void;
3 Q: s! T6 q/ S6 l if @.occupied then+ D( r! |0 R, _ C. d/ @+ O/ v
part := @.cont;
/ W- c' h2 F# X% G. c3 x+ P @.transpOrder := void;) R& k; H6 b5 b7 A) L5 ], i' F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) U4 t; Z" H/ |+ }3 m' O3 h @,root.eventcontroller.simTime);% _3 Q r5 f: l8 M% b
@.HasOrder := false;
" T- `4 W* m, k5 ] @.DrivingHome := true;, w8 N l4 g/ y2 }
rgManager.tryToStartTransOrder;' I/ e7 ?% }0 H, m
if @.Destination = void5 K6 Y) F C* |$ t; }+ v/ I+ i2 @6 k
then -- no transport order for vehicle @4 D N* A! R* t- U
@.Destination :=" A7 [" Q/ P$ R! y6 T
rgManager.nearestFreeStation(@,track.~);
* i' Q5 n+ G% |& j/ e I! l" f; x newDirection(@);
; u- C% r$ _4 c: Y" g if @.Destination /= void then
4 S; Y% i! f. w G# M @.Destination.NumReservation :=, v# r* L1 d9 |6 m9 f9 ]* u
@.Destination.NumReservation + 1;# q: U, V6 _$ `) s
end;2 X) b" T0 R P1 x
@.CurrIcon := "drivingHome";, I: v1 B- v1 Z1 w
@.DrivingHome := true;
( @6 m. ~# S% ]9 V4 I4 y, w end;' f8 ]1 b5 U% W y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- h3 ?' \1 w7 ]9 |9 q part := @.transpOrder;
) d6 D" I& |4 K' w part.move(@);-- load part# B& @* ~- P- Z: ?0 C, ^
@.CurrIcon := "load";
6 {+ i0 {! g4 h9 a/ _' G) i$ ? GlobalDistObj := part.globDestination;
* t$ _* C# F* ^5 m, ^* c assignLObj := rgmanager.rgAssignL; ]4 w( x6 t& T
row := assignLObj.getRowNo(GlobalDistObj);0 M! H# W( c) X4 I' i7 ^
if Row = -1 then -- since 707 b7 u' ^ n" X; S) m
if lan=1 then
) b" B/ I( K* v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 K% M* Y. l8 B M. y, E" a: C to_str("in der Andockstation: \"",?.~.name,"\""));! x+ M# S0 m8 \7 W3 g
else6 N, N5 Y7 ?4 _* o" P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 g/ Z5 l" z+ q6 e- [6 X( ]7 M to_str("in docking station: \"",?.~.name,"\""));
+ }/ [, U+ t) M7 s$ w) A end;
- Z# _; W; x; E% s* w) o else; H0 u3 ?2 p5 z4 L9 r
@.Destination := assignLObj[1,row];" g: `! i7 @) ]# m Q
end; 1 q& i% j2 y9 C, w- P
newDirection(@);* S7 i8 v6 W/ J. h
@.HasOrder := true;- J7 D1 B! x# Q# {
end;
6 G2 [" r) h) w0 X end;
0 R2 s- {7 Q. R* b+ p6 A2 Cend; -- of the method- N9 z2 I* d& P/ l
|