/* called by: entrance ctrl of the object 'track'
- r! t7 H! I, |8 Y) q1 h2 K*/" b4 F3 s; Q$ m* B) v
is& K5 D* [/ g# m' ^1 H1 F
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 n8 D: P4 }8 S' N9 q/ J) Ddo
. j" h' k$ j6 H9 c% p* S; A0 ~- U* e Lan := rootfolder.Internal.Tools.AOLlanguage;6 [- i# l! x* G0 X: R) e
if current = @.Destination -- else return8 ]5 G# ]5 e3 e% A* Z% Y9 S: U
then+ f; t/ ]2 T+ p, C0 T! y
@.Destination := void;" r9 f D3 A0 h7 K1 k/ K& V) b: i
if @.occupied then/ ]" q) Z$ p0 v6 U/ L! d
part := @.cont;
9 M% M/ V8 @$ r4 a @.transpOrder := void;
, C- l; I/ C) N5 T% t part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# l1 d6 I s6 h @,root.eventcontroller.simTime);
4 m. A" W/ r- q! k @.HasOrder := false;6 d" @& w9 O1 N* r5 G0 S4 n( `/ z) g
@.DrivingHome := true;5 m3 G/ ~* j. s0 D! @
rgManager.tryToStartTransOrder;; W4 `/ @+ }+ ~( T1 ~- ?- u9 s
if @.Destination = void' }) C# s/ _ X9 X2 @" [
then -- no transport order for vehicle @/ `0 k- g' s) B+ _: A& X& [
@.Destination :=
5 J* Y# M9 @* ]1 t+ o0 o; P0 [ F rgManager.nearestFreeStation(@,track.~);
$ p, ]6 i% Q% d, F newDirection(@); " o9 }; G0 i$ e* `1 ?! j9 d
if @.Destination /= void then" v7 H2 Y, Z7 y1 }- N6 H
@.Destination.NumReservation :=
6 j; y! ^% V2 x @.Destination.NumReservation + 1;' _6 X0 e$ a _$ I' h; b z
end;
: K! R0 S6 j- l' W3 o- N4 H @.CurrIcon := "drivingHome";" M/ Y5 d( I4 }0 u
@.DrivingHome := true;, Z! S( V8 Z3 f$ C! Y6 G- Q
end;% s7 q9 |( ^3 a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& B# y0 W1 J; w/ m5 u! `# q6 E part := @.transpOrder;
; G/ S5 @' E0 I; v0 }' r part.move(@);-- load part
* A2 w# ] u9 f ` @.CurrIcon := "load";
. W2 k/ k/ c0 d2 {( N1 r GlobalDistObj := part.globDestination;
: i- j0 Z5 B% O- ^( B& W assignLObj := rgmanager.rgAssignL;
2 q8 \' p) C) C7 G6 z- `; ] row := assignLObj.getRowNo(GlobalDistObj);) E3 a% ^) @) C! q K
if Row = -1 then -- since 70
& J7 U' a Q4 o% P# C if lan=1 then: x2 Z2 B9 G% T5 X) x+ s% g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: }3 F) k3 ]" z0 d+ h) V
to_str("in der Andockstation: \"",?.~.name,"\""));( M, z) r4 F4 ^ F8 j% t
else. B0 k9 O6 x' ]7 i
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' |6 i9 `+ }- ~0 O: ?
to_str("in docking station: \"",?.~.name,"\""));
' Y! l7 y% _) V end;( P" Q6 C+ f' `+ w! q) H6 m( g
else
6 R" S. I) M/ m) m7 v @.Destination := assignLObj[1,row];" f9 M7 k% n/ p, d1 H5 J
end; ; A; _) n7 z. z7 K6 E ~
newDirection(@);( i b3 ?# ^1 Y( [# d+ \" e
@.HasOrder := true;/ W7 q v/ G2 o6 X* u
end;+ X: C# u+ H2 x
end;7 S$ F# \9 R |; j( y& S/ S* n ~
end; -- of the method
. m, ]4 d* j' y) p" F# ` |