/* called by: entrance ctrl of the object 'track'7 {& h; Q8 O! W- ]8 [2 K8 Q8 e) i
*/2 E2 u( L! A4 X" ?
is( R, @4 a; f3 Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# n/ Y3 g( r+ V+ s9 C& x, V4 ~. C0 U% ^do1 Q' f& X! X7 o9 Z: N: B4 M$ |
Lan := rootfolder.Internal.Tools.AOLlanguage;. P6 |! Q; f3 [0 u
if current = @.Destination -- else return. C+ V U8 h1 T* w
then
; u3 b2 J# t2 [1 y0 \ @.Destination := void;
9 d: T: |9 b# ?0 k if @.occupied then) F, B, M8 t9 ~# l4 n
part := @.cont;
* u5 E Z8 p2 i& P: c) _" S @.transpOrder := void;1 w9 K5 d6 M, f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 `0 h5 [9 `6 P( R/ r. d. t @,root.eventcontroller.simTime);6 s8 _$ V: E4 e
@.HasOrder := false;3 d$ a. ]! D/ M8 T2 P3 }
@.DrivingHome := true;- G% }( x( J4 x7 a7 J* h7 X
rgManager.tryToStartTransOrder;
! E _# l+ s/ b1 |. Y if @.Destination = void
, D, m& H# R% H' J- _% W then -- no transport order for vehicle @
/ M- J; T2 A6 W. c9 v! i @.Destination :=- L( U% e: h+ i8 t# a
rgManager.nearestFreeStation(@,track.~);7 \8 g$ s5 c ^: C v9 G; e( @
newDirection(@); - l8 x. s' N: A
if @.Destination /= void then' _1 w6 D; I2 v% o$ A/ |" @. _/ F
@.Destination.NumReservation :=+ p5 n, E @4 r, ?
@.Destination.NumReservation + 1;7 y4 O/ P# Z+ M( X
end;
2 r! i- p. x d! X3 C I# v! j @.CurrIcon := "drivingHome";
( g0 ]& Q/ A _! \0 _9 w @.DrivingHome := true;. L% b% n; I( o# o2 ]
end; ]4 ^9 l6 q' j' D& R% \
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- e2 x5 L/ h) r. T+ r
part := @.transpOrder;, {$ k: k& @1 U4 n, z3 i5 u
part.move(@);-- load part
! c4 j% W. D7 \4 K @.CurrIcon := "load";" r' y$ @$ a% }% Q) W
GlobalDistObj := part.globDestination;* o8 Z8 E% Z7 o' f1 d
assignLObj := rgmanager.rgAssignL;
+ X! T+ _0 p3 i0 Q# x row := assignLObj.getRowNo(GlobalDistObj);
# x% c p% X& {& v if Row = -1 then -- since 70
/ o# \7 ^/ j; Y3 o( c# \- ]* d if lan=1 then
) Q- W% l( q1 L5 e( M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( `' V. q1 c5 B1 y to_str("in der Andockstation: \"",?.~.name,"\""));/ E" `& c, z- O2 Q
else7 n8 Y7 u/ a: A2 _, I# X$ M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) m1 {3 ?9 G. l4 r2 ^ to_str("in docking station: \"",?.~.name,"\""));
5 c( j" U$ H1 W- Y8 L end;
( ]( P B, P' S0 k4 e$ { else
; X4 C$ G: N+ H @.Destination := assignLObj[1,row];8 m! h' p; V% x0 F$ F4 x9 [* L
end;
, k6 U' X: T- O ~8 y6 H# }2 c newDirection(@);6 L" n- H8 C0 b. R" j) |" H9 A
@.HasOrder := true;$ l6 Z1 Z* j3 ]/ k( ?" x- I
end;2 {/ I4 G1 ]) Y) a a5 J3 L/ U v
end;8 H- _9 Z- s3 D5 o# S+ F
end; -- of the method
3 ]7 X) B( P6 W( I |