/* called by: entrance ctrl of the object 'track'' l2 ?+ m# U8 y, G
*/
8 `& S* f6 F+ ~+ R2 \" Z2 x: b# `* xis
! U' ^2 F, C, {2 U7 n! B part, GlobalDistObj, assignLObj:object;row,Lan:integer;' H5 G# B. F h2 [' f! p
do
" i8 W' y; x+ N' _0 M Lan := rootfolder.Internal.Tools.AOLlanguage;, O4 [, g+ X) @" M* ~0 n. A
if current = @.Destination -- else return
6 Z5 ~4 I0 b; p then0 m: d* r& H0 ]6 ^# V; m
@.Destination := void;
$ b- b( ^) M$ G, p9 q if @.occupied then
/ o8 S, c& V# B, d8 @: [ part := @.cont;
0 {0 n4 \( N$ _. C4 Y0 j/ A @.transpOrder := void;
8 d/ K. C, x* F* b) R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 {/ `! m& s) U8 Y
@,root.eventcontroller.simTime);
! Z$ Z* M: t$ B. j @.HasOrder := false;1 Q( ^! u1 _5 P" P$ s
@.DrivingHome := true;
c& n% \+ z' D- D+ U! a G rgManager.tryToStartTransOrder;
, D. U. O4 @- Q7 o if @.Destination = void& u d$ ]% U: `1 ~9 P" M1 ~ m
then -- no transport order for vehicle @0 d! V' _: }+ v$ Q2 Z. G; Z6 s0 S
@.Destination :=% {$ w+ N" r+ G- R- i
rgManager.nearestFreeStation(@,track.~);& m8 X: w' w1 e6 ~: v6 ^( V# S
newDirection(@); 3 M5 k; X# v) t3 B3 I/ f- t; c
if @.Destination /= void then1 U) x# X+ R- _6 _
@.Destination.NumReservation :=9 `# C5 D5 @ o
@.Destination.NumReservation + 1;4 O0 p& d% l" ]. u" v
end;
* ?+ m* F) K' V @.CurrIcon := "drivingHome";7 A' R# S1 N% Z$ C$ c
@.DrivingHome := true;
1 O9 w6 y: v" L2 T! _ end;9 h* h( E* E; c( q$ H& Y2 ~/ x7 Z# E3 ]
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# o8 T9 r4 \8 E3 Q& f9 P part := @.transpOrder;
/ K& B3 \; S3 [9 h) ~ part.move(@);-- load part6 y& b0 v' G7 [+ `. p& M* m+ S
@.CurrIcon := "load";4 A$ p. O2 }6 I
GlobalDistObj := part.globDestination;
& f1 g. S0 F+ u assignLObj := rgmanager.rgAssignL;% [/ x2 A" d# ?$ k* ^$ Q
row := assignLObj.getRowNo(GlobalDistObj);
- y' `4 J8 i) } if Row = -1 then -- since 70
1 A& C# \& }) A) a- N5 h1 P if lan=1 then
5 i0 j. _# d) s# ^7 V2 V promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 P R& O7 B7 Z# `7 j! f
to_str("in der Andockstation: \"",?.~.name,"\""));$ N* o3 j! K6 o; h4 H
else
/ e+ {4 V/ y+ ^6 F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 U6 d- u: b2 h7 f" R1 { to_str("in docking station: \"",?.~.name,"\"")); : S R* l8 {6 S0 p
end;8 L+ q1 w- x' {0 b2 g1 d
else
% _) _# e6 f) _, c$ G' s9 p @.Destination := assignLObj[1,row];
$ y$ y! y% i1 J6 Q8 o end; 6 i. c6 n7 R: d5 z; }
newDirection(@);9 a8 W. `3 F5 D" _. Z' x
@.HasOrder := true;# j0 |5 h* j# g* \4 F
end;
3 T+ D6 H$ \2 I end;
$ k9 c$ X) I' K& `9 v1 oend; -- of the method
/ v9 B% L' D; x: S$ ] |