/* called by: entrance ctrl of the object 'track'
, ]$ ~4 ~, t4 j @: s*/
! o" ~8 d3 |! i5 [1 `8 O( Wis
) K* |( z( E& c$ l) |' v) H W part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* O0 y }" p9 e% x1 r8 Ldo. c7 U8 q P' F+ ^4 z/ h
Lan := rootfolder.Internal.Tools.AOLlanguage;% @- D; Q4 ~6 K
if current = @.Destination -- else return
9 J4 h6 a3 f) k4 W then4 v& r* s, n8 y4 H* K n& Y, m9 m
@.Destination := void;
/ J& o2 Z/ s3 m& f/ w7 n9 [ if @.occupied then
+ ~( s2 k6 G9 H2 z. i+ K part := @.cont;& `+ n- _3 b0 Z, c! e
@.transpOrder := void; c: f1 I o- p. c" i n) g( n$ a
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ C5 }: H$ S9 v9 w @,root.eventcontroller.simTime);8 V' w* D. Y, O
@.HasOrder := false;
1 N- G: F4 } [2 w8 y4 K; u& } @.DrivingHome := true;
* i; J _& b. m/ ~( `9 [# n/ { rgManager.tryToStartTransOrder;
0 ?7 U; P2 M+ _& S" c* J4 Y if @.Destination = void
( t) S1 S4 O* y7 F then -- no transport order for vehicle @* M2 A# d% B. p2 |5 S
@.Destination :=3 W, {- d7 `( ^
rgManager.nearestFreeStation(@,track.~);
. M# ?! l$ y2 T; u8 o( ^9 J6 w newDirection(@); + o- L5 V2 o- W) y3 Z3 B& z- R t
if @.Destination /= void then' v. U8 v( B0 ^
@.Destination.NumReservation :=
9 Y7 I: k: T% n# i @.Destination.NumReservation + 1;
4 y, i) G, l4 `' w1 f( G# s end;
. z- \" o, Y6 t2 p @.CurrIcon := "drivingHome";# G0 G- z! k: w, m# C5 g0 |! h& \
@.DrivingHome := true;
2 [5 z {* z: l* K7 \0 F. E end;" r& V; W+ Q% H9 {
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' u5 u7 n( U3 w3 i part := @.transpOrder; l; V4 d1 g" ^5 t
part.move(@);-- load part1 _# R. ]- ]" R# Y% w9 Z( c
@.CurrIcon := "load";
* B( U) Z( U4 W. k4 X& b# A GlobalDistObj := part.globDestination;
; H) j& {* R( s0 X- |( L/ }" f assignLObj := rgmanager.rgAssignL;
. o8 z) G4 F# K( S row := assignLObj.getRowNo(GlobalDistObj);
G+ B5 F) J0 n5 E5 o( B2 A if Row = -1 then -- since 70; d' `/ U. B* U7 Q! |! W3 C
if lan=1 then
* d5 v' @( `! e0 \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& M+ t' E- e% T( z* a3 F5 O: P
to_str("in der Andockstation: \"",?.~.name,"\""));
. P2 V7 u/ I: Z' H" G* Z" n2 a else
3 k p/ O0 j8 ^2 B8 a! p promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 w7 W) z, z; `9 d
to_str("in docking station: \"",?.~.name,"\""));
: L6 w4 |: m( ^* { end;: [5 a) n0 [9 D. L
else) N+ `' \2 ]3 @' @2 y' c
@.Destination := assignLObj[1,row];
& M6 O6 H; A V; x end;
7 h: u' l& o3 t {1 C- C7 y: ? newDirection(@);
1 ~% J$ q7 X: R8 X: v @.HasOrder := true;. `3 I3 e) Y& {
end;: |; ?3 C* P# _0 ~
end;7 N/ X! \7 ^5 [ t# x
end; -- of the method* E( p C$ S# t' b
|