/* called by: entrance ctrl of the object 'track'7 ^# `9 \. q3 `" H; E- } N8 k
*/
' \9 c5 n; u, Wis
6 R8 X% ^* u1 `6 L0 M$ N+ r U part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# b# Z) Y) M) O1 z& G4 Mdo4 `% [) a2 @- c
Lan := rootfolder.Internal.Tools.AOLlanguage;
i+ q* y r ~0 X. k7 X: f' R if current = @.Destination -- else return$ n7 |) |7 @# E. R5 u6 g
then8 h K% O& F- z5 ~, I
@.Destination := void;! W2 [) a8 p" U( r8 G2 D$ X
if @.occupied then2 x5 G# s+ U2 Z: Y" Y, p
part := @.cont;: k/ D1 g' ^7 k
@.transpOrder := void;
# E) ? Y1 x$ ?/ K. R1 @$ _) B1 w part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
c U, \- i3 N& ?, r1 u I6 I5 [ @,root.eventcontroller.simTime);4 F$ O2 ?. v" ~% ], `1 S; ?: w+ J
@.HasOrder := false;2 I ~8 i3 Z3 z
@.DrivingHome := true;
. x ]3 L& W: f8 s rgManager.tryToStartTransOrder;2 d( d+ l( i4 K' B3 f( p: h
if @.Destination = void
# H, o0 f- f% i/ w) P& y( m3 R! m7 B then -- no transport order for vehicle @# l( q4 b4 h4 g1 U1 L
@.Destination :=& t' h0 a' m8 s9 J: E6 R
rgManager.nearestFreeStation(@,track.~);# z, Y* ^/ F8 T) `3 _& y9 r
newDirection(@);
+ K+ p0 {& z5 G if @.Destination /= void then
. v- o7 f+ n# a4 s @.Destination.NumReservation :=( x- A6 \4 ^% ]4 m# j
@.Destination.NumReservation + 1;, c- I; f1 T G( r, u3 }
end;
" R5 U1 S& e+ ~) j# e @.CurrIcon := "drivingHome";
% c0 Q- M1 _& Q$ X% y: L @.DrivingHome := true;
' x1 R& W1 x) y" n3 E2 \3 P3 c end;
+ _$ t4 W/ M C& `; D9 T else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* P X( r* G8 Z( g. W part := @.transpOrder;5 | o8 N: [) K; a
part.move(@);-- load part% Z: n3 k! M. W/ ^1 U" e1 ]
@.CurrIcon := "load";6 y5 Y' D2 U4 u1 {# q
GlobalDistObj := part.globDestination;3 }' z; i" G! ?7 }
assignLObj := rgmanager.rgAssignL;
, O6 G/ p# g M5 f9 Q row := assignLObj.getRowNo(GlobalDistObj);9 Q# k4 h7 r) g0 G" Z0 O. d
if Row = -1 then -- since 70
1 W, j1 o/ y$ M: L Z' v5 s if lan=1 then
# m- U( w7 l; p4 R; q4 M, R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# X: M0 y; o& R to_str("in der Andockstation: \"",?.~.name,"\""));
0 K0 y/ N3 J# t0 M else# G0 B3 }. E" A. J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 K- u4 C7 @4 `; V2 e) {
to_str("in docking station: \"",?.~.name,"\"")); 5 z# S0 Q5 ? G9 K! b
end;/ R/ g" t4 g2 K6 x
else7 E8 U/ W( U' }. j( m
@.Destination := assignLObj[1,row];# R, {, v: v8 g# _% r7 @' k
end; - k) e9 V8 q7 F& z& U2 s- m6 T
newDirection(@);9 P8 C3 t6 Z' {! V" o
@.HasOrder := true;
, a A; k5 z: ^ end;
" h4 o! x. P4 c* v end;: O' B8 t3 `" [3 f3 Q/ u
end; -- of the method( @' ~7 `: H4 N; H) Q4 F8 }, t
|