/* called by: entrance ctrl of the object 'track'! C5 y9 ?" z7 V9 G! w; i
*/: m' N* {4 @ I8 H0 P3 K$ G# q
is0 i& z5 P+ u1 C; I. ^. A/ N
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! y V' w0 l M4 J. e t2 r0 ^( T
do4 v: [/ ~# p" C
Lan := rootfolder.Internal.Tools.AOLlanguage;$ z( v! {" l. d4 R/ d6 t) \1 g
if current = @.Destination -- else return
9 [: x; g P+ J then
2 Q2 _6 a+ Q6 ~: `9 m1 W# E @.Destination := void;
; D# q* o; @% h; p0 M$ \ if @.occupied then% i& l9 P' |$ w6 [" Q
part := @.cont;, _( t" W7 l- S6 v: Z
@.transpOrder := void;
3 k( a; `3 L" [ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* o6 x2 |6 y0 M6 g5 U @,root.eventcontroller.simTime);
, M4 |( k2 ^$ g" w- m. s, T @.HasOrder := false;
' g" S1 ~) F5 i& j @.DrivingHome := true;1 ]! Z Q5 K2 Q, D
rgManager.tryToStartTransOrder;7 ]% }% }/ }' o8 q! T
if @.Destination = void
3 {, {# t: V' F; u then -- no transport order for vehicle @
* K3 H" B# j9 z9 ?( ?0 \4 G* l* a @.Destination :=2 D2 w5 C& E' b4 Y
rgManager.nearestFreeStation(@,track.~);4 v: d% z, S s4 E+ M; {6 [. P1 ~
newDirection(@); 7 W2 P8 C _' a8 V/ i# x
if @.Destination /= void then
- _2 V2 }- o0 @, y8 r& h& k @.Destination.NumReservation :=4 ?) B1 u; t( g. b
@.Destination.NumReservation + 1;4 r+ @5 G* C- S3 B/ t" e: k5 o
end;
! A7 j. P" i( H, G/ {7 M0 h% M$ f$ | @.CurrIcon := "drivingHome";: @1 Z _( z; Q$ _* x: ?
@.DrivingHome := true;
$ D. O& z; y9 I3 c end;( Q6 H7 V: L2 V3 F" H( e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 [1 D5 ~! `3 w1 R* Z6 U part := @.transpOrder;
' ` Q; T' p( M$ Z o, c+ G { part.move(@);-- load part
/ f( f6 K0 M- O2 g0 V. ]4 } @.CurrIcon := "load";7 m* t6 w8 y6 b9 X$ m0 ~
GlobalDistObj := part.globDestination;( |. X, M$ a+ W
assignLObj := rgmanager.rgAssignL;
# Q6 g6 d$ }4 Z" g2 j row := assignLObj.getRowNo(GlobalDistObj);
/ C9 H/ _7 N* F' _* \ if Row = -1 then -- since 70
- a6 ~6 |, ?+ t# r/ ~3 @+ h9 T% A$ g if lan=1 then1 \+ a- ^, P o: e* z5 w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. u1 m# m* C; H0 x5 S& }
to_str("in der Andockstation: \"",?.~.name,"\""));/ H9 i3 A8 H" j4 Q- u
else8 {7 ~" R z& m* d( p
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. o2 _( h& r: Q( E4 W; s
to_str("in docking station: \"",?.~.name,"\"")); % \! n& w" T l7 M$ \ j, w
end;
2 J+ {/ j& A7 k% M; `( { else
Z. l; Q4 w# a @.Destination := assignLObj[1,row];
' c# u2 c7 _+ p' H end;
& G: W) ^5 {! i' o, { newDirection(@);* Q! i1 P: h8 a
@.HasOrder := true;" N7 M' o3 ^6 B
end;
$ {6 J( l8 R `2 S' W. ^ D$ N6 r r end;
d' v) ?! I( W, vend; -- of the method5 k6 }) c" u _' @/ k3 H" _
|