/* called by: entrance ctrl of the object 'track'! }, e2 }8 E% L
*/
1 X0 e, V9 t5 R7 V3 D* T- `, g! fis
8 r# H( s0 L' B; d! x& V4 e part, GlobalDistObj, assignLObj:object;row,Lan:integer;; S! P9 C) C5 H6 j1 R
do
' h6 }: [/ F3 V Lan := rootfolder.Internal.Tools.AOLlanguage;+ K2 ~; {6 H8 X. e$ t9 `! d, g$ @
if current = @.Destination -- else return, ]: V3 {8 ~, u! z7 Y
then
9 W; T: g; w5 l) Y0 b/ p @.Destination := void;6 ?8 ?" f% S5 ^# ?
if @.occupied then
: e- r$ h$ b7 D5 \5 d' O part := @.cont;( j/ P* x5 K: I# \5 ]5 E; X
@.transpOrder := void;; }% k4 t. r0 L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ u; ? e+ Q0 Z9 q: j @,root.eventcontroller.simTime);
8 v& [# u# v/ Q9 m% n8 ] @.HasOrder := false;
3 V4 }$ J m+ D" k( e" h @.DrivingHome := true;- y+ M$ d2 K- N5 t3 [; [
rgManager.tryToStartTransOrder;! p8 d. Y+ p& N8 z! ]: K
if @.Destination = void
6 n5 J( `$ V) q+ C then -- no transport order for vehicle @
, `% y7 n5 x; T" H2 n8 @( r @.Destination :=
$ d6 L" v2 t" Z7 K( s7 G rgManager.nearestFreeStation(@,track.~);5 T9 r4 L0 D$ I" {6 c# K
newDirection(@);
8 Z1 z. A5 Z% b' I7 B. N if @.Destination /= void then C* G- z* t! B5 i5 x
@.Destination.NumReservation :=$ o$ [$ h1 K8 X+ K7 R% L
@.Destination.NumReservation + 1;
; ?; K- k L7 d# S: ^4 o5 h( ` end;
$ R; {2 r7 T1 G( f$ z4 T! K9 D& V @.CurrIcon := "drivingHome";
# U# u/ ` b! [- h @.DrivingHome := true;8 t( a. J$ `1 o/ {/ R
end;
2 T0 h) M7 k) C; E. K5 N else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ w' L9 ^9 T$ M G7 c3 \9 D! I part := @.transpOrder;! L5 b+ ~+ r$ v9 I5 C4 K" W
part.move(@);-- load part U; C* p1 N6 g" [7 `) q1 \
@.CurrIcon := "load";) h& ]0 Q2 G: e$ O2 @% S0 m
GlobalDistObj := part.globDestination;
6 }# }* S/ T+ t2 O) ~) L assignLObj := rgmanager.rgAssignL;0 u/ g& K& P8 f% M( _2 H, o, _5 V
row := assignLObj.getRowNo(GlobalDistObj);% g; E/ e! J6 E5 w5 A; h7 B' [
if Row = -1 then -- since 70
' Z. A, m/ U0 Q1 X* ?& ^. w. n if lan=1 then
; b# V3 A7 J: T2 [! D8 }+ N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& |, t/ |- ^( `* ]6 T
to_str("in der Andockstation: \"",?.~.name,"\""));( F% S$ e) b3 r0 Q: D/ w0 x- I
else
* B9 @- a4 e, q8 ^. k8 ?: o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( [, S4 m8 m( t% g0 x to_str("in docking station: \"",?.~.name,"\"")); ) k' I, v/ [! E( n
end;
! X F2 g! A9 K* o else3 L1 M9 F' D( R _5 G
@.Destination := assignLObj[1,row];; l6 X8 V8 J1 s. _8 Q
end; # Z" R- P" o( }% V
newDirection(@);
5 X3 N0 m( `+ c& y @.HasOrder := true;4 |1 b( e# M# [- C& T
end;( Y' K: _+ K% f
end;, @; u4 O8 j" H2 T
end; -- of the method! M0 w$ w3 t! E4 \ C7 C3 o6 F
|