/* called by: entrance ctrl of the object 'track'
3 w( }6 y# H% ~*/
3 s0 U3 t$ K4 x6 Qis9 F3 Z/ X9 ]2 }7 `. T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% e. W" u) \% R* ido" Q ]; m8 q/ L0 ?# T
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 c! S/ J1 e- i n' D& }# c/ V! L, U if current = @.Destination -- else return
: w, Q& P" s; P$ o) o" c- H then+ |( ?" f: Z6 i8 R {
@.Destination := void;1 v/ R J0 v7 k. z/ n8 L9 [
if @.occupied then
& N' o0 T- K/ A6 p part := @.cont;: `. `9 o3 K+ w* L8 E* U! C8 g
@.transpOrder := void;5 z+ v/ c/ a) I# J S' e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' Z) }( T: c F9 }- _1 n @,root.eventcontroller.simTime);
; Z1 U% o" Y& p ^1 B" t8 W% r2 K @.HasOrder := false;
6 D/ d2 u- t, p3 o; s; @$ c$ [ @.DrivingHome := true;4 G" f- B0 D1 L' ^# A
rgManager.tryToStartTransOrder;; A8 i* h0 Z5 m2 N& b
if @.Destination = void+ L# n% Z% l7 N
then -- no transport order for vehicle @1 b3 y0 g( _2 ?$ D# l$ p7 @2 }
@.Destination :=
{( C- a+ P6 c B9 a: `% k3 _ rgManager.nearestFreeStation(@,track.~);
% B, j8 ?" f' t" }5 O, i newDirection(@);
6 o/ H# K L# j+ S- x4 u! L/ X if @.Destination /= void then
4 O4 b# r0 f* A9 M, i6 ^2 X# q @.Destination.NumReservation :=
1 g, a- }. M: S# s/ _ @.Destination.NumReservation + 1;
9 {' p0 `0 G, |9 H+ ? end;
; v% j( Z0 }8 k; H$ S6 q+ g @.CurrIcon := "drivingHome";2 q: S* q: e$ F& E& P/ T9 s( T% l
@.DrivingHome := true;5 U0 D: p( M$ K# x+ L: H5 l
end;
, D3 _- {* @; L' y5 A7 o8 K: X+ K else -- the vehicle @ is empty, both vehicle and part are in the same dock station* r3 [% L( I) g8 B
part := @.transpOrder;
7 g6 a; @* k& w# W( O part.move(@);-- load part
3 f% p8 _" w* O$ U/ D; E @.CurrIcon := "load";
& A5 A/ ?9 v V$ t# P( f GlobalDistObj := part.globDestination;
) n2 v3 v7 w3 m) y$ m assignLObj := rgmanager.rgAssignL;
: \1 f( g; r5 [0 G' } row := assignLObj.getRowNo(GlobalDistObj);
" D* o5 O8 O4 Q if Row = -1 then -- since 70
) J# @1 \' Q- _! S, I if lan=1 then
; [; C2 x' m: g( { promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 i+ ]* r. m! q# Y' y9 ~
to_str("in der Andockstation: \"",?.~.name,"\""));& u) J( f5 A6 V3 f. e% f
else' R6 a8 L" u; \9 p2 g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; j w2 d, C/ ^# [
to_str("in docking station: \"",?.~.name,"\"")); 6 J7 \6 y/ D, c9 w4 D
end;
* X, ^% @5 s( M( f0 D, o$ _- l else7 `# [/ n9 h V( G" A& |
@.Destination := assignLObj[1,row];6 O6 x; e. A: g( s" ?! F
end; , v8 e. |; n, F6 ]- R7 c# R8 Z: w
newDirection(@);
. L! U! W! C2 U2 a7 H @.HasOrder := true;" L5 u- D1 ^* A
end;; I" b# m1 }& @* ]: V$ W" Z
end;
0 T" F4 V+ E6 h$ Gend; -- of the method
1 w7 V" [% f& {2 n |