/* called by: entrance ctrl of the object 'track'
6 a9 H9 I) Q& x% ?*/
8 W+ {; V# _! c) R" c1 ~is$ h# q8 i+ a- N; ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: e6 z/ D; h8 _4 n8 Udo$ C' |9 I% V* m) \- w
Lan := rootfolder.Internal.Tools.AOLlanguage;0 l% p4 C/ p% s. J1 m) E
if current = @.Destination -- else return
* L0 f h4 H+ U. I& O then' r! Z) F- w: I3 S0 g" } n
@.Destination := void;
2 \; M# p. L. z' O" p if @.occupied then+ c" w" k. U0 ?/ v
part := @.cont;
& ~ B* p& ~) N8 i' g4 v @.transpOrder := void;
$ [1 e9 _( [# ?0 D. r! N/ J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* x3 z0 D" L! Y: o% |) f/ g
@,root.eventcontroller.simTime);
+ I1 F0 w& t0 u* `( ~ @.HasOrder := false;
1 D7 x6 H P" |) z1 G8 ?, H @.DrivingHome := true;$ f& Q5 |1 R7 T
rgManager.tryToStartTransOrder;
. t4 L, S; M8 B3 _; _7 ?( ]& Y9 T if @.Destination = void
O. v7 j& @6 i# s7 H8 L then -- no transport order for vehicle @( b! g. p9 u$ E3 J: I
@.Destination := f; K2 K4 M/ S+ G0 r& X" _
rgManager.nearestFreeStation(@,track.~);) Z( l; m& g4 R! b) f" e
newDirection(@);
2 E& U$ c) {. o! t8 K: J" | if @.Destination /= void then
4 ?6 ^! K5 u7 x; | @.Destination.NumReservation := M8 Z' L2 v" }/ D2 h
@.Destination.NumReservation + 1;2 L* {) \2 R, v" n4 ^" ^+ v2 `) _
end;* K3 y3 w0 [+ K) g$ y* O/ F
@.CurrIcon := "drivingHome";# S9 W3 a1 x' Y
@.DrivingHome := true;, p; w/ T5 v# B' {' h5 z* [
end;
0 e. H$ Q6 K$ m8 i6 O, s9 c# |6 ? else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 e( S% [, w0 G, n/ U4 Z& L
part := @.transpOrder;
9 [& u* h6 x, l& W# e7 ~: W part.move(@);-- load part
+ a3 L4 a" p/ [# Z( P# [4 M @.CurrIcon := "load";4 X$ W; I: R9 V1 Y4 Z7 [4 o
GlobalDistObj := part.globDestination;0 K0 J! I5 }( E! ~7 y0 T8 X
assignLObj := rgmanager.rgAssignL;
0 z9 ]2 `) I2 B, n% Z' k row := assignLObj.getRowNo(GlobalDistObj);9 Z5 l% s: S# L# I
if Row = -1 then -- since 700 f$ z' `1 a {0 a }
if lan=1 then. u7 _" l5 P1 N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 l4 M6 Q. q- e; n3 i7 s to_str("in der Andockstation: \"",?.~.name,"\""));
& k1 G& ]9 S+ ^7 R else; t/ J0 B1 U: F7 e6 P! Q8 ~! Z7 M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. b+ a2 {6 i% I; k7 ~ to_str("in docking station: \"",?.~.name,"\""));
& h4 u$ {0 `% v2 Z end;1 R2 V9 U/ ?2 G8 f2 w! A
else, S- L1 e+ T! L' r- U5 D
@.Destination := assignLObj[1,row];
! F- x. Y, [$ v& v! p5 f end;
# H" G- h4 A4 [6 z" D& `- Z newDirection(@);
" C! _2 Z& h3 l' C7 N2 I7 U @.HasOrder := true;; t ]4 v/ }; [" ]
end;8 W& i5 y; F/ T/ o0 \* u$ f' z. x
end;
7 m, `/ ~1 `6 F6 g* i: ^/ q4 uend; -- of the method3 ~/ a# U f* I. f- \, Z
|