/* called by: entrance ctrl of the object 'track'! T2 p; N2 ?4 D5 o! u1 T# I
*/
0 S' y( o" f% C/ K5 kis
) N- G i, I8 f& N part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' K5 A4 O% H: z% vdo
! M6 I+ k8 l9 U: c Lan := rootfolder.Internal.Tools.AOLlanguage;
& H8 g1 O! O8 i- U if current = @.Destination -- else return
q3 ~$ ]6 _& W& S9 e$ `# f5 s$ ? then
' i' E) Z# D6 b7 y @.Destination := void;0 Q* ~! `* C' Y; ?$ X; E- J/ Z; t
if @.occupied then' Q2 C3 Z1 W9 ]; R
part := @.cont;
7 s1 Q8 K2 Z( o/ _ P' a/ V @.transpOrder := void;/ o3 t8 F" z% ~! c9 G! R. Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( }. U4 F$ R+ z; [
@,root.eventcontroller.simTime);
* x" K, P g7 p7 ^* P* B) a3 W @.HasOrder := false;
7 M) d% B r5 B3 s5 T" ?8 Y( {: F5 Y @.DrivingHome := true;
6 L q4 t0 g$ L, Z. i) u$ | rgManager.tryToStartTransOrder;% h; ]8 e1 a. j+ @. I
if @.Destination = void
8 k0 y6 v) ], \6 X, m, C# g& u then -- no transport order for vehicle @7 S2 B1 A7 }1 B b
@.Destination :=; J% N$ [7 K6 N! r, ^9 C
rgManager.nearestFreeStation(@,track.~);/ G) r! u* K4 o. X$ U, t& s% r
newDirection(@); ' s U& X! d5 `, \1 j, U/ D
if @.Destination /= void then
! [4 |5 l C* N& k# O @.Destination.NumReservation :=/ n; A9 t5 k! z' ^
@.Destination.NumReservation + 1;
) c% R, E# t! Y* H# O: H* ^ end;
0 ]- Z6 i+ K0 s+ f) ? @.CurrIcon := "drivingHome";( E) i+ A- @5 Y3 V& L$ c
@.DrivingHome := true;+ J1 X( V0 r) n) g3 g
end;
. ~+ e- b# D1 ^7 ~4 t else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 G9 }$ O- a* v. n9 f5 Y/ w
part := @.transpOrder;
|" L4 K0 c) h1 [& b part.move(@);-- load part( v# g/ G$ M. J9 H z
@.CurrIcon := "load"; r$ F: M1 ?8 S3 ?/ P& c* L5 B
GlobalDistObj := part.globDestination;. y) |( l+ [7 j" u. D8 i# H" g) R; K. A
assignLObj := rgmanager.rgAssignL;0 _& R8 i% X2 O$ k
row := assignLObj.getRowNo(GlobalDistObj);! t. S) a5 [% o
if Row = -1 then -- since 70
% I# A( t6 S& v0 _7 c* Q, k2 y& n% j if lan=1 then
4 p* F7 _/ J$ e promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 R d) o' H( t0 s! ~
to_str("in der Andockstation: \"",?.~.name,"\""));
% `5 D0 R4 R w else
L% Y9 ~& \/ }' i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& ^3 L& T$ O+ u3 g# e
to_str("in docking station: \"",?.~.name,"\"")); 4 f# d6 h; E- `( w8 B( s9 i- s5 Q
end;
4 l7 p/ F& s0 H9 T) ] else1 I. x7 [) P/ a
@.Destination := assignLObj[1,row];
* M# g1 V& q. o! W4 v) q8 Q end; * R0 N, W7 X# C% H* @1 ~6 K
newDirection(@);
& F& m+ S3 B7 D: @0 } @.HasOrder := true;! d& S1 F# u8 z: @$ x1 ^: _/ {7 I
end;
/ Z( r4 ^4 f# C" \: W# I P end;
( p4 E3 D/ o% Nend; -- of the method' e1 r# s. o8 r' Z. V2 e
|