/* called by: entrance ctrl of the object 'track'8 [; v4 o+ ]2 U/ c6 G( T$ `* _3 P
*/( N" _) T" o/ j9 U3 X4 d) x2 O
is. F G5 b1 g) A& }7 _! P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 f6 H; V# y% q/ P3 ^do
& T. Q4 V8 T: C Lan := rootfolder.Internal.Tools.AOLlanguage;
+ K4 x e8 z' N2 z" b6 e if current = @.Destination -- else return( x1 N1 b. q, h
then
# Z3 g! `& N+ c2 l8 V7 n @.Destination := void;
0 y* ^) N" Q5 [- u( y4 G$ k, k if @.occupied then/ V7 i" q1 t2 a& W# X
part := @.cont;
1 a6 M g' S) L4 X- J @.transpOrder := void;; R. ~4 T5 q/ Y9 @6 d( v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& U S; Z( O, ]
@,root.eventcontroller.simTime);
; D- |6 i4 X- m# @ @.HasOrder := false;
# u$ ~7 B) w4 p% P, m @.DrivingHome := true;
8 h5 z* P9 j0 g3 L rgManager.tryToStartTransOrder;
% G$ G$ o L [- r2 i a2 K; ] if @.Destination = void+ ?/ R+ ]% t* I6 j/ I
then -- no transport order for vehicle @+ i' z: x( | x0 r: t' s
@.Destination :=! q" `) J; F$ m) r3 U7 c
rgManager.nearestFreeStation(@,track.~); M; v% m H7 G
newDirection(@);
. ]5 l& ]% }, N6 C& A, S( Y* F if @.Destination /= void then0 u; c/ F/ E# \" |& G9 V& `
@.Destination.NumReservation :=5 v p$ n! w6 N; W2 P
@.Destination.NumReservation + 1;
. D( B+ p: c' M- C0 u% { end;* M+ k' U3 w0 W4 ~7 ^% }1 ]
@.CurrIcon := "drivingHome";
3 A9 x8 K" u- l3 T4 e @.DrivingHome := true;
. ~+ {1 x0 h+ |2 r3 M, _, A6 @# r end;
" h3 W2 b) X/ C) p+ W! `7 x else -- the vehicle @ is empty, both vehicle and part are in the same dock station. t$ I( w# n( p
part := @.transpOrder;9 u. }) Y2 C9 ~* `$ O
part.move(@);-- load part8 X0 \3 F( ]. l# F
@.CurrIcon := "load";
f8 b( W* ~ o- I- i% z! _. n$ @9 n GlobalDistObj := part.globDestination;
7 _0 l3 l- X0 Q0 E# U7 v7 e& C assignLObj := rgmanager.rgAssignL;
8 ~9 X$ B5 q H. |" u- ]% o row := assignLObj.getRowNo(GlobalDistObj);. F. w. h t1 @; E' {6 z9 B6 z
if Row = -1 then -- since 70
2 R: B8 _. b1 d' r! X if lan=1 then2 j: U/ j& G% K$ | z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ w' l% t, O% m. z! \$ F, V
to_str("in der Andockstation: \"",?.~.name,"\""));( J* g0 u T: C, b* o9 G
else
. L+ j! S( ~( K0 C1 @# |1 Z; x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 b0 b! _7 I7 _ V) w to_str("in docking station: \"",?.~.name,"\"")); 0 {7 z7 d% v! b) d7 Y
end; l+ v* X4 Y, F; L5 E
else
# g. D3 y' ?$ U E( ]6 e @.Destination := assignLObj[1,row];$ d4 q- V4 t0 x3 m& ~
end;
l# M3 n2 @" Q& j; X) V newDirection(@);
' B0 z# Q9 V% p7 c, x% R @.HasOrder := true;$ B1 s0 V+ Q% Z; b* g( w
end;
8 R o( a& o6 v end;( F! B: `) ~; S7 ]
end; -- of the method# b- P# n; ^: B( i% P) o3 ]
|