/* called by: entrance ctrl of the object 'track'( W5 y. L2 D4 K" M# Y
*/
0 h( }# W0 y9 p: g9 f/ @8 T- Vis9 b4 Z3 z; m7 w. Z: c! Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. c' g5 X6 @2 O3 K8 m2 E5 N7 c1 Z7 \do5 Y# Z4 s- t/ _8 B: ^" W
Lan := rootfolder.Internal.Tools.AOLlanguage;% C1 n9 J; k# L" R9 f, W: X$ v
if current = @.Destination -- else return6 z: ^& G# ?5 t
then1 y% z2 W. S6 ~' z S
@.Destination := void;+ f: t8 h8 ~/ s: L
if @.occupied then
; z" B4 v5 v! Z3 S1 q% @# K part := @.cont;! I E9 r, T% s" T: z
@.transpOrder := void;
6 B1 V' g4 \, ~- F y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; I% @1 H0 u6 m- y8 [, ?* f @,root.eventcontroller.simTime);
: {3 D6 H0 z& R' } g! Q1 B; s/ [ @.HasOrder := false;
/ u: R. O% k% N @.DrivingHome := true;
9 @, k! M. o: o" Q- k rgManager.tryToStartTransOrder;
1 h5 c; Y) K9 R+ x if @.Destination = void# r5 x7 |" q9 T" [- H! [# Z) }
then -- no transport order for vehicle @* b; K0 i3 g0 F5 M: F
@.Destination :=4 B1 S9 c9 N1 z* i" E0 X
rgManager.nearestFreeStation(@,track.~);
4 _0 I d* {# W+ f, t newDirection(@);
3 [1 k. i0 Y; S& Q if @.Destination /= void then
A7 i1 Q0 D7 ~/ V7 q2 o# ` @.Destination.NumReservation :=
% d6 o( a( p9 ^% h @.Destination.NumReservation + 1;+ t& @. F7 N* g; L6 ]5 i
end;
+ I5 ^4 X" O, a: ` @.CurrIcon := "drivingHome";
2 L2 _4 L# m- d+ i* g& ?" i2 ~ @.DrivingHome := true;. \2 b, b1 H7 D( ?8 q) C, f; T
end;
& w' i. _ O$ {8 z n else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 t) p0 I& [" [, J) W part := @.transpOrder;; c; R f' y, G9 g
part.move(@);-- load part' f2 E4 N( E; v- c. t1 Q
@.CurrIcon := "load";/ M$ F4 }3 | r+ f) A+ Z, m
GlobalDistObj := part.globDestination;; C# @7 C- G8 }3 O
assignLObj := rgmanager.rgAssignL;' u, X* U+ k. R+ n4 a. x2 v
row := assignLObj.getRowNo(GlobalDistObj);
U- Z, c4 ]$ O( w7 q if Row = -1 then -- since 70. ? m a! H) {# O5 i
if lan=1 then
6 z. p6 I7 P( g# N! {+ v( n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 d9 A, _' Q+ A
to_str("in der Andockstation: \"",?.~.name,"\""));
+ ~: G* E3 `; N- _% }8 i. Z else
9 _- l/ l, \0 g5 D- z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 O+ O9 {2 h$ t5 `! h to_str("in docking station: \"",?.~.name,"\""));
" n: p8 \. H! f! F9 ~: |: A' E8 Y4 L end;
5 X+ l$ S% u, ]; t2 R7 G9 @ l6 L else. i* _4 n( S$ l7 Z# X
@.Destination := assignLObj[1,row];
4 [+ C, T: b& { end; " t* G& x" \7 A/ }
newDirection(@);
/ [- j1 |; \' Y/ j% y+ f3 A1 | @.HasOrder := true;
& h% {7 L0 t+ l; {% ]. G* S end;
, `& n2 W4 I$ h% { x' I$ @& v, `0 F end;
" W9 c. l, j# b8 Q2 J2 [+ Yend; -- of the method9 ~+ n0 W+ ^4 i/ R" ?, W
|