/* called by: entrance ctrl of the object 'track'
% g2 O u# R6 ^8 M' g% C7 I7 J*/( L: D% R/ G+ P$ L0 Z
is9 v2 S. g! y0 i& P2 l7 @3 c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* i9 H3 i' ?" ]/ Rdo5 g2 x: g# m9 m/ @3 i8 [2 X/ ~. X: z
Lan := rootfolder.Internal.Tools.AOLlanguage;$ W( L; t! L, ^
if current = @.Destination -- else return0 U6 c; q1 W4 {5 e$ A% f& s
then* d8 C o A' q. M [: G/ ?9 Q. R0 M
@.Destination := void;# t I4 h/ @; R, v- @' P
if @.occupied then* h, _ i3 O+ b' ]5 f9 L, q7 I2 K
part := @.cont;
/ s7 f5 [* [+ O% f/ F) T @.transpOrder := void;+ h$ Q+ r- s2 i% Z8 G" }6 w
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 \* |8 d/ `4 g& c
@,root.eventcontroller.simTime);, j8 i% O7 c0 U1 n: f* w
@.HasOrder := false;# G8 p) d Q8 ?
@.DrivingHome := true;; D1 u% Y7 k/ [5 R
rgManager.tryToStartTransOrder;! {. F6 A, [/ L1 ?/ ~/ a2 u! X
if @.Destination = void& B; ^9 b+ O* W1 J n. `" H
then -- no transport order for vehicle @
" L% r" f1 ~/ ~8 i& V) D! w1 l @.Destination :=
0 f0 d- \0 e' d; S rgManager.nearestFreeStation(@,track.~);
6 T, s# X" a8 ]: f& b# O, _ newDirection(@);
9 A [; G- L# m2 ~* t& _1 h$ A if @.Destination /= void then/ C1 `# y) c/ U. V, g
@.Destination.NumReservation :=
, ]- ^' y4 Y* K @.Destination.NumReservation + 1;3 p+ h- K7 T2 z* W* d/ _5 V
end;
% {/ q7 W! V5 g5 S" X2 J% s: K! G @.CurrIcon := "drivingHome";
# e+ u: a8 [/ u1 X, ` @.DrivingHome := true;
" t* s! j0 J$ x/ \ end;
$ z. `7 V2 G2 o/ v- d: h# R else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 _& P2 O* C8 m' @ part := @.transpOrder;% T! m4 K) Z) W/ x% `# b1 _; j
part.move(@);-- load part1 ]8 c: ?; q0 k9 Q8 o% o( Q
@.CurrIcon := "load";
5 C- C. Y$ G8 b5 |3 `; f GlobalDistObj := part.globDestination;
; z7 \- N' Q/ C3 H assignLObj := rgmanager.rgAssignL;
$ u7 ^! q! F$ N7 O row := assignLObj.getRowNo(GlobalDistObj);& R* W; b4 S. _/ B g
if Row = -1 then -- since 70+ H3 ]; k( D3 T9 z
if lan=1 then
; T. X8 S. U! Y# Q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& x) e: v: h4 N" X" R to_str("in der Andockstation: \"",?.~.name,"\""));/ }7 r+ k I$ P
else
8 j6 }* {& H5 a3 j6 ?' V; n promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 Y) @5 }: h0 t' B% y
to_str("in docking station: \"",?.~.name,"\""));
, E# N; G) N; j/ S0 z4 d+ w end;
6 \! ^. }- q; ^6 W+ ^0 L5 i else
9 i' j0 D/ W& w) d1 p @.Destination := assignLObj[1,row];
, R! V" |) z0 u, R1 j end; 2 W# N0 f" N' @1 S5 i) g- [2 f0 Y
newDirection(@);1 g( H+ g3 U# z$ Q
@.HasOrder := true;% ]: ]. o% Y2 z/ x0 Q0 m- r
end;
) T: G* F& F7 [* S9 \ end;' @; l$ t& {8 w. ~! H) {+ y
end; -- of the method
2 a6 k* i3 F0 c( p2 O; i4 \ |