/* called by: entrance ctrl of the object 'track'0 P$ Z4 e1 ^6 b) x* _/ N- ^2 Z
*/$ h7 K& N2 P ^
is3 s( a2 J2 A1 T5 l, g3 m" j( x) F
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 q) B* y- A! ^' Ido
: m& T. _$ b" d- }, W6 R Lan := rootfolder.Internal.Tools.AOLlanguage;' v1 A0 C* I' W S# o) H+ J
if current = @.Destination -- else return! S* a. N m0 x9 M1 D4 y
then
$ r( |# s- c4 b: J% a6 S7 @ @.Destination := void;
; C; L; q+ r) m. M6 V if @.occupied then
- C4 E+ G7 X0 H1 R) v5 ~8 p part := @.cont;
1 O' G0 {0 B+ G6 q @.transpOrder := void;! g9 s0 z8 b- e' d
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% ^7 Q, i/ Y+ u2 m, `2 W) Y
@,root.eventcontroller.simTime);) \" y% T$ U6 S/ Q
@.HasOrder := false;
7 X6 K, h } a# F& ? @.DrivingHome := true;7 j! U. O; F4 r; b
rgManager.tryToStartTransOrder;, l& _+ K- ]0 C; K
if @.Destination = void# g( z7 u5 X8 M
then -- no transport order for vehicle @
. _5 Z( m5 Z: w @.Destination :=
1 d* t: F# h+ U5 a) ? rgManager.nearestFreeStation(@,track.~);( o$ h2 N# u2 P6 F: Q
newDirection(@); 6 M4 {# [0 f7 I) r8 s
if @.Destination /= void then3 K8 L1 @' d0 j) d* k
@.Destination.NumReservation :=' U; K3 d) B2 \
@.Destination.NumReservation + 1;
* Z( y+ S2 H: o! D2 \1 L end;
. N7 i% j& n- s+ x9 L+ z @.CurrIcon := "drivingHome";+ Z) C) m0 F/ m, D' g
@.DrivingHome := true;2 H9 O7 D7 m; k! ^: N" C" y3 n
end;; g% i& ~" A q6 H. B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 I3 _! Y- O" e& O part := @.transpOrder;% @7 ]/ ?* K3 n, g3 t( I7 k
part.move(@);-- load part' o+ n, K) @: c3 \
@.CurrIcon := "load";% g7 ?5 w- ^- w% r* m
GlobalDistObj := part.globDestination;, e% T& b, v# n
assignLObj := rgmanager.rgAssignL;' u: i5 \9 q3 u( _) k4 i9 A+ R
row := assignLObj.getRowNo(GlobalDistObj);8 j# f% T m3 Q7 q: z. O; F5 w
if Row = -1 then -- since 70& d0 k L+ D; I/ J+ K( A
if lan=1 then5 @9 G4 \% q* M$ m6 t. F: n
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" D/ z' ]( D4 j to_str("in der Andockstation: \"",?.~.name,"\""));
* i5 ?, J3 W; W! k else" f/ U6 g6 [; x! L9 I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ E1 a7 T) e" l7 f- X9 j
to_str("in docking station: \"",?.~.name,"\"")); 7 }' ?& q( i8 J* O: ]. i+ M$ K7 p8 U
end;
' q5 {* n) j' R i else
3 ?, [; k3 R7 n+ H5 r1 a @.Destination := assignLObj[1,row];: e4 y0 ?, a' |( G7 N# A
end; 2 R$ u8 N8 l. ]& K. Y% v. |/ |
newDirection(@);0 a* L( `+ C% B" N
@.HasOrder := true;% |$ h3 n3 J2 e" |# r- ~$ J
end;9 B) w6 q g% B- P% o/ D3 Z8 _
end;. ?5 V$ @5 @9 X _3 G
end; -- of the method$ I7 ?+ q! U7 N. ?1 @+ Y/ b
|