/* called by: entrance ctrl of the object 'track'5 L' L" h+ n1 j: n& B3 e
*/6 C& @$ L3 E2 Q w! ?
is+ `" ?) E8 Q, W" v) u5 F' ?7 h0 @, }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' Y4 b2 f) y, |% C, E1 w, @; e8 zdo- M- X) G# q% }4 s9 _. t- |! O6 j
Lan := rootfolder.Internal.Tools.AOLlanguage;
- W& ^9 [) w& F2 l7 ]6 ^6 \9 Y) } H if current = @.Destination -- else return: ?1 o- b/ g' ]7 k- Z# U, k
then
" d9 m$ o! y1 _) w8 I @.Destination := void;
; l7 h4 ~$ ] e6 A2 h if @.occupied then
/ e! T0 B# @( a: r part := @.cont;
2 Y7 K7 k: ^0 ?+ f& Z9 A @.transpOrder := void;
, C# v; I7 ?; y$ U* g) J) \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: W1 h2 T: w Z- r0 N
@,root.eventcontroller.simTime);
; @2 C& j5 Z8 `; { @.HasOrder := false;
) s1 Q* Z, E1 @ U% I5 A! K" L @.DrivingHome := true; e% W# ?+ _ d' |' i" ]$ z- K
rgManager.tryToStartTransOrder;: D$ h& W8 b! S! ]2 d; U
if @.Destination = void
" p2 x; P6 M2 ?1 R then -- no transport order for vehicle @0 M* n3 L4 e. s ?+ |3 @, `+ ~6 i3 h
@.Destination :=. K8 w* [* i3 Q* S$ G/ m; J
rgManager.nearestFreeStation(@,track.~);: V9 G+ x6 `9 F" o( g1 y" ^) n
newDirection(@);
6 {! ^5 }4 e4 A! D+ ^9 p if @.Destination /= void then
$ A6 a' W, b# c6 r$ m @.Destination.NumReservation :=
6 O0 F0 i# P& D) g* y @.Destination.NumReservation + 1;
& G8 p u9 }4 y @8 _) z* z# s$ l2 l end;: @! j1 i; n7 n0 ~% }+ A
@.CurrIcon := "drivingHome";
0 ~ D+ ~$ t, s6 D: \/ p, {; w @.DrivingHome := true;
5 e$ t: e. c. D3 q end;) s6 W1 k7 d' h3 m' g9 j: a! G8 n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% S0 [3 o& h5 d; b2 m1 f/ | part := @.transpOrder;
" u; I; m& [% \ part.move(@);-- load part! W% F" i% f- f1 A
@.CurrIcon := "load";( T5 J3 K( M* h. f+ R+ s! w
GlobalDistObj := part.globDestination;5 V' F5 [8 F' V0 r
assignLObj := rgmanager.rgAssignL;
% l; L4 ~/ Z6 @* s8 h0 z* y9 ] row := assignLObj.getRowNo(GlobalDistObj);! Z2 f' v* N2 ^9 r. d# H: A
if Row = -1 then -- since 70) Z( n r! G5 C6 z
if lan=1 then* D. z/ _) ^6 D/ q4 }* B4 X2 }" p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 _$ I5 U7 J r$ m7 y* v to_str("in der Andockstation: \"",?.~.name,"\""));3 Y& [7 ]8 o2 R2 z7 Z; B: d! e
else/ V# l2 C! g# B/ b1 R, a
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; L$ C$ P9 C3 ?2 P+ S- S2 z4 E4 A to_str("in docking station: \"",?.~.name,"\"")); : l& z; m9 A- K$ p0 A
end;4 @. {, w! b' L1 G
else
3 g" j. J) l) d( [ @.Destination := assignLObj[1,row];
5 t' b' S# a; z+ q* @" l end;
# Y( Q3 i$ l5 \# {* e: D8 G2 x newDirection(@);
* \# G) Z8 z. h" I6 p @.HasOrder := true;
. P% b' |# o& R2 @' [ end;
: v! I- L, s6 D. O3 t end;0 E! [" L, C+ H. M2 t6 w
end; -- of the method
. _/ G) {* m: m |