/* called by: entrance ctrl of the object 'track'
~0 F+ {* w0 G0 w/ l9 m+ d*/% L- K3 Z7 U% u- Q7 I/ S X
is
( X* v0 k( i `8 D' Y& N& V4 q part, GlobalDistObj, assignLObj:object;row,Lan:integer;% }6 g) [) n" S! H+ z
do4 y$ k0 i0 N4 S- v# b, o7 `/ k: M
Lan := rootfolder.Internal.Tools.AOLlanguage;8 j9 z) y: I9 n' y a1 j
if current = @.Destination -- else return
; P& S) t: S% g9 S" i2 } then( A- ?3 |; ^5 h5 V
@.Destination := void;" z, n( T. P: c/ e! `
if @.occupied then
/ I; i: g6 E3 s, |! L# M part := @.cont;1 I$ C: N6 @: q& {
@.transpOrder := void;: N* @$ [/ s5 \/ z& _! v0 R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- n4 P* k/ i8 p @,root.eventcontroller.simTime);8 d' f0 f4 P* L( t" [
@.HasOrder := false;
! p" `: |! p5 |& X: G* w6 | @.DrivingHome := true;
/ X* Z- I# p" D# { r+ Z# v rgManager.tryToStartTransOrder;( l+ U% r' A0 ^7 T
if @.Destination = void
- V. e, Q9 u0 z" r6 }) | then -- no transport order for vehicle @" A/ }: ]4 U1 B0 X& W( Z
@.Destination :=: g! s& n( F# A: ]+ }
rgManager.nearestFreeStation(@,track.~);. z, E* O$ T0 m- w4 a7 L; i
newDirection(@); . J# w- r- D! Q! _2 }5 G
if @.Destination /= void then
4 \( W) a/ _1 m1 G0 ] @.Destination.NumReservation :=
+ n/ ~8 H8 J2 s9 Y' ?: U8 K @.Destination.NumReservation + 1;+ c6 q0 A" D. a/ A7 U# _3 Z" \
end;
6 S% j* L8 [: ~ @.CurrIcon := "drivingHome";0 e: P6 ?- }# ` r9 j
@.DrivingHome := true;1 E; [4 L: B. l; I0 ^! d
end;! F5 b1 \- H) ^3 p9 w: [( s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 I' n) v1 ]0 v) J, n I
part := @.transpOrder;
3 c6 f: k# ?5 C$ Y2 p5 v0 F9 J6 z part.move(@);-- load part
, D$ |4 F/ L% n) a @.CurrIcon := "load";! p: p9 S7 x$ b8 K( E$ e9 c
GlobalDistObj := part.globDestination;; J, { i5 h1 ~
assignLObj := rgmanager.rgAssignL;
& E( i8 t3 } Z9 k" D" [ row := assignLObj.getRowNo(GlobalDistObj);: G- {- l* I: j3 G( h- i! e/ X3 r
if Row = -1 then -- since 70
1 m2 w8 a4 Y1 C9 u% \ if lan=1 then
6 _7 K1 V7 w/ k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 z! Z: u6 Y) M( g! Y d to_str("in der Andockstation: \"",?.~.name,"\""));
5 W; K. `% K4 d- C else& H) K* a6 o) o( y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 R' o* L& H0 d0 }/ E" j
to_str("in docking station: \"",?.~.name,"\""));
( s4 _* \. |2 X3 r9 r2 F, E* v end;9 h/ ^+ j* Q' u5 t: c" K
else
) ?3 X- h. P1 z6 Q3 ~ @.Destination := assignLObj[1,row];$ O0 _$ P% X8 N5 f" g
end; % R5 ?( U3 r0 N+ R! J; A
newDirection(@);
! A1 ^. h3 [( S* L9 K4 B @.HasOrder := true;: [0 K3 \, w0 c8 r
end;
6 ]' f$ c# l' s$ c8 y end;
+ U1 t3 {! M# a' nend; -- of the method
. b5 x( ]: [: } |