/* called by: entrance ctrl of the object 'track'
8 L5 K7 I: e) W, {3 d: V1 D*/! \5 @' W' Y" A5 z0 b, R. X
is
0 a( p: D* F4 A5 O: ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;. K$ D" _7 h& i. p5 q
do
5 y' f1 E: F9 V) K Lan := rootfolder.Internal.Tools.AOLlanguage;
; l2 {+ e3 K! z) n if current = @.Destination -- else return8 E: F. f0 \; q
then
6 ^, g6 z4 H. R* i j( d @.Destination := void;5 @: @. ^* i2 W4 d* ~. ^
if @.occupied then; z, w$ w9 d" f# v" Z0 L
part := @.cont;5 ?3 v; m# `9 a7 n a4 r
@.transpOrder := void;. s1 t* i, H7 ~- F6 t4 D+ C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- r5 ?- ?% j, U; N( |& _
@,root.eventcontroller.simTime);- W5 |2 O5 J! m( ?% f6 K" i
@.HasOrder := false;
3 {: p3 X% x: V @.DrivingHome := true;1 Q3 q2 [$ g" A. s( ]
rgManager.tryToStartTransOrder;; ?% R. }1 q9 D# }" _( V
if @.Destination = void0 z; k6 {! g( \5 p
then -- no transport order for vehicle @! n9 R& e4 W9 y5 @2 d0 Y
@.Destination :=% J7 o+ ?8 S: Q9 z: H. {- D! G
rgManager.nearestFreeStation(@,track.~);
& `& d) |: U) [ newDirection(@); / [8 Q8 O8 Y4 W3 m$ C, r( f
if @.Destination /= void then
2 y/ m% p- K. j. X @.Destination.NumReservation :=
. E/ y6 D. [5 Q" }& ~# | @.Destination.NumReservation + 1;1 |3 @7 L+ Z; j2 W7 r4 M% b$ t
end;
+ S; z+ G% y: P) u$ Q0 c& a! | @.CurrIcon := "drivingHome";
. b6 z9 P% ~+ h6 I+ D& i! s @.DrivingHome := true;
$ b9 Z6 U" Q. o! a& t end;& u, B% l- M& H# Q7 s, y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station x6 I2 h$ R/ X, `
part := @.transpOrder;* z, n! R# y% ]4 @ v0 A( x& T
part.move(@);-- load part; R' @5 ~! T% U" j
@.CurrIcon := "load";
9 k, t: t8 {: [ y4 J8 w GlobalDistObj := part.globDestination;6 L1 x! m3 W% K
assignLObj := rgmanager.rgAssignL;' q* D' V5 c0 G n0 G3 q$ M
row := assignLObj.getRowNo(GlobalDistObj);) f4 h7 d: t- c9 e5 A, |
if Row = -1 then -- since 70
3 \# ^ \% X0 h( |0 s5 U4 M1 A" d3 l if lan=1 then0 x3 ^4 \1 d- D9 ~# y4 o$ ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 S, S0 p' \. l- Q
to_str("in der Andockstation: \"",?.~.name,"\""));' |; T' x/ \' k. K. {! f
else
, P6 a2 _' A' { promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( A8 L9 s7 x& q% f to_str("in docking station: \"",?.~.name,"\""));
# R: p( P, X) D8 z6 {' Y end;
h5 ?& y! ?: @ else
- ?( O3 P6 q7 ?, {7 a$ [( C @.Destination := assignLObj[1,row];0 v) Z! _( \ f: ?1 n6 R
end;
( E% T" l8 y0 X6 T newDirection(@);9 w' S* S8 M: _* M+ G
@.HasOrder := true;; T+ F- i0 N5 C1 @9 H6 K( t/ c8 x
end;
n1 v5 U) N( e+ Y g5 f6 `7 K end;# _# p2 Y- v" J2 h& X7 Y
end; -- of the method; F( q2 U8 U9 _+ {+ z' E# ^+ N
|