/* called by: entrance ctrl of the object 'track'/ x8 v3 x7 K. Q+ h" A4 t/ N
*/. a8 g& m8 I$ }7 N- R
is5 V9 t* W5 m \7 Q! T2 _0 X Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* D2 i2 R0 H5 \4 H+ d) M: h; |
do
! f' K4 w1 ^% s$ m Lan := rootfolder.Internal.Tools.AOLlanguage;( p! d: P c; S2 ~
if current = @.Destination -- else return( e9 v( W/ S g$ L4 ?
then
& Q+ a) D' R6 L; n/ ]1 ~ @.Destination := void;
3 ?& L, F9 |% l: Q& E# | if @.occupied then
3 a( O( s! l$ i% }% p/ B/ }* e: l/ s part := @.cont;8 X1 {/ n: D3 S7 |
@.transpOrder := void;
( h) D, L8 y& e" j part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# ~1 F) t$ B& |$ ]( b @,root.eventcontroller.simTime);' P8 H% I2 e: p) K2 U7 R# }) X5 [# n
@.HasOrder := false;2 J2 K" _( R7 B2 _
@.DrivingHome := true;
( a3 p- z9 J( G2 O: G: h rgManager.tryToStartTransOrder;; N+ I* Q6 J+ L( G$ }
if @.Destination = void
: p3 ~# S5 H. ^9 y& P) C then -- no transport order for vehicle @, Y6 b" T% {3 ?! Z: I
@.Destination :=
3 ~% h2 s6 x$ i) t+ A rgManager.nearestFreeStation(@,track.~);
/ s, f! u. D" l7 x2 R+ i newDirection(@); " u; [ l. }# Y, k q" O
if @.Destination /= void then
# B6 W+ c. Y# ]- z @.Destination.NumReservation :=8 @8 L& C& ]( k1 Q/ F- T! A
@.Destination.NumReservation + 1;. e; H, V8 g$ p. a3 }
end;+ R8 N/ C5 w0 b6 U
@.CurrIcon := "drivingHome";. }$ U4 o% N: E+ z
@.DrivingHome := true;3 h8 M3 c, T# C
end;
! e8 u- X: J6 J+ | else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ z- j6 z" e0 }8 S0 D
part := @.transpOrder;8 K+ U, w/ ?+ O7 I
part.move(@);-- load part% c0 `3 l1 }# T. O6 Q4 W0 W2 k! c
@.CurrIcon := "load";1 |" _4 Z4 t9 Q/ t
GlobalDistObj := part.globDestination;4 i8 k" D4 G# ]( M+ h! L. T% c
assignLObj := rgmanager.rgAssignL;
% L5 H7 F: J) T$ x- G$ d1 |8 b row := assignLObj.getRowNo(GlobalDistObj);' g8 ?) Y! h) j/ x2 X# n: [
if Row = -1 then -- since 70+ Y, K8 u7 @2 k
if lan=1 then+ o g {; Z u2 e+ h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. {) ]; r1 a2 J. h% f
to_str("in der Andockstation: \"",?.~.name,"\""));9 M! U! e% N4 R! Y; I5 i" l
else3 {; B4 b/ {- e3 v& K; Z# C9 u* k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ b! Y6 m2 {' k- Z/ N; R. ^
to_str("in docking station: \"",?.~.name,"\"")); : G$ w/ q) P+ d5 K
end;, A3 M: J2 h/ a: O, K
else( s' a. E& h0 N$ V" ^" P! x
@.Destination := assignLObj[1,row];$ P/ l/ U' L+ I
end; 8 N) W! s; l1 W. f/ U" m
newDirection(@);
: m( T, I; @+ u5 X0 ]& z, ^4 C @.HasOrder := true;
1 ?5 r D. k, x" n y( Z1 S end;
r/ I7 [$ T+ s+ g. \9 D/ ], A% g% d end;
2 _8 T, v! @6 _8 w: Rend; -- of the method' [% p. ]% e# V. k- k# S% ^
|