/* called by: entrance ctrl of the object 'track'
( u% Q1 M- ? Q3 o, t*/
; j$ Y$ u3 D# Q" nis+ [6 z( q; W' R7 v+ q$ l
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; J5 z4 n8 P: o, D+ Z
do
: m& i" j( O6 G/ b Lan := rootfolder.Internal.Tools.AOLlanguage;6 x* o! L- t- B0 g! _9 |
if current = @.Destination -- else return
6 ?( A8 w. W) ]# q* M then
. _! } w+ b5 ]4 s( v, g/ U @.Destination := void;. B# {& D; A, n7 r: U5 j
if @.occupied then, l1 N; Y0 u8 Q8 y. Y2 P
part := @.cont;
' y5 ]/ L3 k; E T- P W8 ?- m0 H @.transpOrder := void;
% v: a5 x/ F! N. Q( @7 g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 t) _) H) e. r* f( n. Y
@,root.eventcontroller.simTime);
- n6 W: a! k$ K9 S @.HasOrder := false;
f$ P3 ?' b% K4 e) N6 X5 u @.DrivingHome := true;; l9 ^* j* e, _- z4 c, g9 Y1 Y! t
rgManager.tryToStartTransOrder;
5 W+ K! ]2 ^# v- J if @.Destination = void
) S, U( o2 [- I) i; s! }, c1 I+ n then -- no transport order for vehicle @8 Y" k# S9 j! `. _
@.Destination :=$ p" l: ]; i8 G$ g/ _" J9 f# L
rgManager.nearestFreeStation(@,track.~);
) ]1 U* i, [+ @) u6 k: y, T) E newDirection(@);
; n5 P5 d) a! ~* w4 o if @.Destination /= void then7 v! f2 d! l* ^
@.Destination.NumReservation :=
4 k* c4 R( S, V; @: p( G @.Destination.NumReservation + 1;; H/ v; E- g3 }" W
end;/ }: f3 Q# P, h) A; X
@.CurrIcon := "drivingHome";
5 f4 k0 R; [5 f @.DrivingHome := true;7 Y0 u" j% U+ M2 h8 ~, M" @( z- D, e
end;
; x/ D5 H" x9 x$ d m" X2 u6 } else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ U$ @8 z( e% R( E part := @.transpOrder;9 j, ~2 P& ~8 ~7 }/ P( M, f6 K! P+ o
part.move(@);-- load part- W7 D/ V: d. ?$ |: x
@.CurrIcon := "load";
% G3 Y& h8 @2 H GlobalDistObj := part.globDestination;
% X8 c( Z+ m0 y% m assignLObj := rgmanager.rgAssignL;
3 u- @; M' M& D. [& _+ g% W row := assignLObj.getRowNo(GlobalDistObj);1 p+ `8 F% C# c7 j
if Row = -1 then -- since 70
! I: ?5 ]/ Y& S+ ]" A4 C: | if lan=1 then
" |/ N" r: L9 ~1 A promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% s* l; b8 u9 i to_str("in der Andockstation: \"",?.~.name,"\""));
8 N' s# t* R# h% l" \( c! }' n else
3 h- L" ?7 D0 h. R* i( B9 _5 \ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 S6 i& J2 j/ n
to_str("in docking station: \"",?.~.name,"\""));
5 C+ O: e$ i" c& z q end;
6 A4 B! [ H* i" g8 I0 n- i else6 m& p' \5 F% y9 F$ n
@.Destination := assignLObj[1,row];' K1 s; ^$ Y4 R& N# P0 w7 o( B$ f( B
end;
7 q) j5 Z ?. i* o( p' Q newDirection(@);
$ b* {! ^% b# n* V @.HasOrder := true;
8 F. C1 t \- c' r end;
% a+ `6 m7 a9 K/ \4 u5 T. u d end;
2 \4 v a- m; F L) g6 oend; -- of the method8 l. a/ r% |, Y7 ~6 `
|