/* called by: entrance ctrl of the object 'track'/ U8 @* T6 u( m
*/
. I! ` M8 h4 a" ~is* _9 k* j! H% s- X% V7 N; z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 K- W7 j# _0 R5 t. k1 j% V2 @
do
4 r* W t# o: w' x q- u2 l3 Q Lan := rootfolder.Internal.Tools.AOLlanguage;
& ?5 H8 k7 j/ [8 ?$ M% R% }2 y if current = @.Destination -- else return/ F8 l$ }# t/ z6 i
then2 @2 G: p0 ?- @. A- B; J/ f
@.Destination := void;+ K% o; P6 ?0 g: F0 e! N
if @.occupied then& b6 T M+ f7 k! m. ]2 X$ R
part := @.cont;
8 ]) a* E e7 N# u E# I: k* U @.transpOrder := void;; d" g, H) U: h9 m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& H2 W; o: W' {0 \: Z# o @,root.eventcontroller.simTime);: D: h. V# t/ E* Z& ?
@.HasOrder := false;
) g5 P& F* T$ G# M( A7 U) D @.DrivingHome := true;
( ^# V$ Y" w% e rgManager.tryToStartTransOrder;
; c Q) ^) Y, z) ^9 h7 E3 ? if @.Destination = void
; N: W& W/ K# ^. k0 o8 t) j2 r& K then -- no transport order for vehicle @( R; s& N8 ?0 F b( v
@.Destination :=( M- O1 o( m. f# i3 v9 | y. ~
rgManager.nearestFreeStation(@,track.~);
# u# q# G. j8 Y5 [5 n& U newDirection(@); + x# t; C# y( A( C
if @.Destination /= void then
# A6 o& J' n: |- c: A* Y' ^+ G# N. [; s @.Destination.NumReservation :=1 z# M6 n& R* a% ]2 F
@.Destination.NumReservation + 1;3 }; u$ i% m# [. g$ ]1 S$ V0 X
end;
( N/ B9 \7 V! B/ v* A/ m C @.CurrIcon := "drivingHome";
- }& r, L# j1 F& Z y @.DrivingHome := true;) _ u/ i. m$ Q+ e6 E! K; W" Y
end;2 |& P" _. b* b3 u7 S j
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- N! k5 I- G/ S. Q3 O
part := @.transpOrder;: O& s" F, h3 b: l! U* A( B `3 w4 R4 ]
part.move(@);-- load part
: }4 _$ W3 j+ S! v1 T8 Y @.CurrIcon := "load";
+ S" C/ u% v! I8 r GlobalDistObj := part.globDestination;
/ A n" o) n# N9 J' {( M/ h assignLObj := rgmanager.rgAssignL;) q( Z' v$ d8 O( L3 ^
row := assignLObj.getRowNo(GlobalDistObj);
2 v$ J$ U1 g6 G8 E; s if Row = -1 then -- since 70! I" f5 f: f- O$ ?8 K
if lan=1 then
8 P- \* W) P0 P7 \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 V1 R' V E' a! ~8 a
to_str("in der Andockstation: \"",?.~.name,"\""));8 O5 ?1 S. S+ b1 J! F3 |. j) h- l
else
6 Y7 X$ W4 ? c+ F1 R' T f: \+ } promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. {+ a- v6 _/ |5 f to_str("in docking station: \"",?.~.name,"\""));
4 y! y% ?6 e; g7 D end;; ?1 _9 D+ g+ Y
else. R! v1 X1 Q/ Q2 D+ j# D; `% ^' N
@.Destination := assignLObj[1,row];
}1 H( Z/ _1 ~. l: g end; 9 j* {! Z; Z# V6 k! Z
newDirection(@);4 X* H( f8 j& ^+ @; u
@.HasOrder := true;
9 k* A! X" a8 B% u1 R- [2 V' r+ ? end;! X5 J; {5 Y% e6 f) o
end;
) a9 b7 ~) _ K* `end; -- of the method4 Q+ p/ @) K! Q
|