/* called by: entrance ctrl of the object 'track'8 g! ~5 W. V/ ~' K8 @% _
*/
- T2 I5 j }& @is) D1 Y3 Y& A1 x7 |
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 b- E: _/ t: l+ z6 o
do
2 x! c l1 q: r Lan := rootfolder.Internal.Tools.AOLlanguage;- F" l* g/ ~! r/ _+ m J, W, K
if current = @.Destination -- else return3 U1 q) Q0 P D" Y
then
4 i: w. G9 W! k7 d- U: U @.Destination := void;
8 R- j( W. S/ }' p& R8 [" T3 d; G if @.occupied then9 n l: F8 ]$ s, Z/ T+ h
part := @.cont;
* E) D* ?/ A+ y" f+ I @.transpOrder := void;
$ U# X; L! y% D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 I1 n: d4 s, f h2 X. Y) w @,root.eventcontroller.simTime);
( Z+ G4 X- y9 F' i% z) s @.HasOrder := false;
5 a! Q3 k# F( i5 g( }; X+ @3 D, i& @; }/ Q @.DrivingHome := true;
+ Z* D$ Y, Z6 }( M# U% h rgManager.tryToStartTransOrder; C- y1 ~* d4 l R) K% V& D
if @.Destination = void
+ x4 q1 x0 Y' k then -- no transport order for vehicle @
7 a Q, ~9 z* [& K @% Q0 c @.Destination :=# Z3 M" R- `: ~+ j% ?3 P* g2 M& @
rgManager.nearestFreeStation(@,track.~);% u! H Y; Q2 f( U
newDirection(@);
( `4 X; R$ U/ w$ K- i( E: l2 Q, { if @.Destination /= void then3 ?, n: [4 g$ c- o! r) d, ~9 s
@.Destination.NumReservation :=% Z7 s2 z: }/ ?' ?9 j0 v" r* b) b
@.Destination.NumReservation + 1;
* w$ m2 |. U+ b+ `0 H- G( B/ i" P% B end;4 h; ?: y/ Q4 c F) [0 z
@.CurrIcon := "drivingHome";
* T& U4 K- L8 c" s8 E* x/ T @.DrivingHome := true;" Z- M0 b. d+ A! x- G7 B
end;
9 v+ P- O( s' K# @( Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) L8 M7 u/ m; m+ ~ part := @.transpOrder;
( o+ F V6 A& }" x9 a V' g" c0 R! v part.move(@);-- load part
& N L2 {3 Q& K4 I+ U* j0 e, N8 A @.CurrIcon := "load";; i# t1 d9 `9 K8 C2 Z6 l
GlobalDistObj := part.globDestination;6 Z4 b! f8 b) H
assignLObj := rgmanager.rgAssignL; E$ h+ A0 B! o- V: \
row := assignLObj.getRowNo(GlobalDistObj);$ \+ O- K' ~& x# |
if Row = -1 then -- since 70
( M: N+ l* Z8 r if lan=1 then
, q+ f3 A! d4 I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% n3 @2 k# g- b+ Q8 ~7 V1 @
to_str("in der Andockstation: \"",?.~.name,"\""));
3 G1 L& B" ~: j else |5 H' P3 L1 v' ~% q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; J8 y' H: V; p8 H* T" h to_str("in docking station: \"",?.~.name,"\"")); . `4 d6 _& ~0 f7 F# `0 h
end;
6 }! N1 G3 y* _6 ^: r) Z6 d else
* h8 j4 E, c8 M( q' c- g @.Destination := assignLObj[1,row];# v& B [5 v& f* q, @4 z5 L
end; ) U* k- f% E7 h& ]" B; N
newDirection(@);) ` }1 `, h w9 ?; T
@.HasOrder := true;0 g+ ]+ o& {( e4 Z% u( g6 |
end;
7 P: O" p0 j2 P% S4 N, B end;! t' @5 A: k |5 a
end; -- of the method
) P* c2 b9 Z/ }& }# u2 S |