/* called by: entrance ctrl of the object 'track'
: p. T7 B0 A8 m: x$ V2 @" s*/
7 U, O% a5 p3 `is
% R0 c+ ^) r8 |3 |, U) @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 [) U t4 Z* C3 Bdo5 I. m @2 y1 u6 ~* d
Lan := rootfolder.Internal.Tools.AOLlanguage;7 R( v3 r- a- Q. ?
if current = @.Destination -- else return: \8 P. M! U$ \& b5 E2 _
then
% P$ U H0 n5 ~1 h0 U @.Destination := void;5 ]% h0 R+ H% I \- g
if @.occupied then
# b T* u( V0 W" t. o- _: U0 C part := @.cont;8 X- g @. X9 H5 j! [7 F5 b
@.transpOrder := void;
- b+ E. e& f3 C, i2 @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ ^) l9 F& K8 {* S6 V4 t& f
@,root.eventcontroller.simTime);- r& J, R! L* J" i1 i2 |
@.HasOrder := false;
h4 _$ J* \/ T' X! H @.DrivingHome := true;. s& ^& @& r/ y- @# Y
rgManager.tryToStartTransOrder;' z- f$ ^, h- j
if @.Destination = void( @: K% E2 c3 K. K* m V" x b2 F5 ?
then -- no transport order for vehicle @3 `2 o- X* Z& f& k! f2 t5 E8 {+ Y
@.Destination :=
, W, a# k/ `4 m( t rgManager.nearestFreeStation(@,track.~);
7 J2 q4 p$ v* F: M n9 S newDirection(@);
/ H3 u/ @6 H) p! A" ~8 F5 J: I if @.Destination /= void then
- s0 T2 L l4 b- u' g @.Destination.NumReservation :=
$ r% b, m2 p) z @.Destination.NumReservation + 1;
' c# }& Z+ L' ?" y4 | end;
2 L8 e; R9 O1 g+ z1 q) c# q @.CurrIcon := "drivingHome"; o3 @& i, H [1 d: z
@.DrivingHome := true;8 U; @" Y6 B6 F! t& ]: ?+ R
end;
5 b) t. L; c/ o- F8 o% [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 b) Q6 M8 I5 A. ?5 b
part := @.transpOrder;
3 b: ?% X0 a' E part.move(@);-- load part# ]1 ?! v& N. C
@.CurrIcon := "load";5 I9 P% F: _! L
GlobalDistObj := part.globDestination;6 V X' e( ~& O7 T2 V/ r! b
assignLObj := rgmanager.rgAssignL;% R- f5 x3 g/ `
row := assignLObj.getRowNo(GlobalDistObj);* C- w( {* W/ e+ ~
if Row = -1 then -- since 70
5 ]0 a" B" [5 r if lan=1 then
( |+ m/ W- F5 d- M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- _* _9 q& c; ?3 _5 } to_str("in der Andockstation: \"",?.~.name,"\""));" H, C2 j' I; E! b# F' m2 q
else9 [$ A9 ?7 {8 N
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 _8 \) `" f% ^( a. m( y0 q- I
to_str("in docking station: \"",?.~.name,"\"")); + X: Z# D7 V2 s; m. E) z; [
end;
& U. |5 n9 N1 {6 z0 z else
. D9 |0 z: Q' R4 d/ N @.Destination := assignLObj[1,row];
, W8 m. m/ q6 J8 H end; * d5 q5 n, P7 O: Q8 n
newDirection(@);, E9 H& k) ?+ d# ^2 G8 Q2 S D5 {
@.HasOrder := true;
. i- ?% q" b. ^ end; k# Y( M- Q8 y e% w0 {
end;
6 W& I4 p+ P& ~; Fend; -- of the method/ _! D4 _8 Y9 a( Z3 P2 O* z9 T/ F
|