/* called by: entrance ctrl of the object 'track'
+ [! S2 G/ |# m" E*/2 `$ Y! {6 }9 w( i7 F
is
) T0 _ H3 |1 X7 U) S. K part, GlobalDistObj, assignLObj:object;row,Lan:integer;! s, t8 w( m) Z
do2 n; [/ g/ H7 e7 `
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 b" N0 U, B& ]3 T! t if current = @.Destination -- else return$ h' _: p6 y! b! j7 X
then
8 g, @" K- t$ ?$ i0 H. M: H @.Destination := void;
3 t; W+ t6 u$ \ if @.occupied then6 L1 L: J v4 r% `
part := @.cont;
9 q$ v! M; n4 a/ S8 `$ a @.transpOrder := void;
! F7 ?% h; A+ n' t1 d: \/ @; r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ T$ U3 U) S* f2 q4 a* a
@,root.eventcontroller.simTime);
+ `/ I, H9 t( X, R @.HasOrder := false;
* u7 J `4 W0 x3 ` @.DrivingHome := true;
6 A1 y- P# K# Q+ l4 k8 e) j+ W) Y6 s rgManager.tryToStartTransOrder;
8 K0 l7 x* l# Q$ q" V if @.Destination = void
& r8 g% h& _) X- [+ A" f2 E then -- no transport order for vehicle @
( {: ^# x! ]) X @.Destination :=% D5 b+ C* \4 ^0 c3 ^
rgManager.nearestFreeStation(@,track.~);% \7 i# P. Q! T2 _/ M
newDirection(@); 9 }' [; [, b2 [0 F7 ^
if @.Destination /= void then
* m* f( s' Y+ @1 W; w [- f6 Z @.Destination.NumReservation :=0 d! h6 k; I( v' ~3 m
@.Destination.NumReservation + 1;
8 t' ?; Q0 o! I) [ end;
+ E0 a/ Z# l+ A# C; z8 h9 M4 E @.CurrIcon := "drivingHome";
2 x8 g& [$ J% d5 P6 D @.DrivingHome := true;% t$ f( |- r- h6 S9 p8 I2 k6 s
end;7 T" |+ I I# o6 f7 b2 X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station, l& `$ Z# x) f9 y# e
part := @.transpOrder;
% s! O" E1 u) a& p% I5 P) q- J part.move(@);-- load part6 b: X9 l: g. N3 P
@.CurrIcon := "load";5 G/ i# h) E# z3 k; w7 G' |& D
GlobalDistObj := part.globDestination;, R$ Q1 ]* n3 W. i7 h+ O1 i
assignLObj := rgmanager.rgAssignL;) u/ F8 K6 E$ n% ?4 Z
row := assignLObj.getRowNo(GlobalDistObj); m- D5 P6 m$ }
if Row = -1 then -- since 70
! e! D# n( `9 c* R5 u6 X E if lan=1 then
) n% c) N! y3 l* o) f# O! Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) w2 P, Z! H2 a7 Q8 W+ N to_str("in der Andockstation: \"",?.~.name,"\""));
4 h: x6 ^( A. O, ^( `( ~( R else. l* a5 r- F. x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ A6 [% S6 ^* s* V$ _- Y _+ k, i to_str("in docking station: \"",?.~.name,"\"")); 2 e. q0 u2 h& V5 O# J2 y
end;* H3 e' W/ ~. Z4 n. L4 i& p! F, U( e" O
else
, `8 E5 O3 F g2 S0 _: m @.Destination := assignLObj[1,row];$ f' D; [* d% h' l0 s C) w* w
end; ) q1 h& a( B, G3 }
newDirection(@);3 [& \8 Q3 G: x B
@.HasOrder := true;; f, ~- I9 a, Q; W' d4 K4 b- Z
end;( k4 f4 ]( ]9 ?6 o" }( X
end;
1 V1 k g) x+ C* }1 w+ O9 Pend; -- of the method R( d& d9 h! ]. k
|