/* called by: entrance ctrl of the object 'track'
+ k$ R$ O, H% W' o; H*/
6 [( v2 ?7 E0 C, p' Jis
, ~1 I/ T+ _: W6 d, @8 Q* }6 N part, GlobalDistObj, assignLObj:object;row,Lan:integer;. u( P) q' `5 ~( X ^
do
& @ A. A: a V0 q Lan := rootfolder.Internal.Tools.AOLlanguage;8 G! o. b% s& _ b( |
if current = @.Destination -- else return; F& c) y7 O0 N. @2 @
then7 B7 w, P' W/ ]: E
@.Destination := void;# C0 I4 J( d2 m4 q
if @.occupied then% _- c9 l t8 v8 }* w: Q
part := @.cont;
/ ]: L9 h! v# Q+ x @.transpOrder := void;$ c8 M! ~+ U2 ?& d- s# t! j3 l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ I7 T4 q2 Y7 r @,root.eventcontroller.simTime);9 y" ]1 [# U; M0 m& r4 x' Y& j
@.HasOrder := false;; `/ `) W6 A- u% R5 i& g
@.DrivingHome := true;
& J' J3 B# K7 U3 m" v rgManager.tryToStartTransOrder;; p K, ]0 I1 ?+ M
if @.Destination = void, W) m. P. n: g, h1 }$ x
then -- no transport order for vehicle @
! r& t% ?% m6 v @.Destination :=/ ~& Z5 C4 w% u
rgManager.nearestFreeStation(@,track.~);
! j s) _3 o* _# v- `; g) L newDirection(@); * b" @9 K! y$ [' n& i5 ^, w; i
if @.Destination /= void then
* K) V3 R! t; @1 f# i @.Destination.NumReservation :=6 }- ? J9 Z T$ l/ t
@.Destination.NumReservation + 1;0 f& ]+ o# G* y# {, J* Q2 t
end;& C D% `4 ?" G* [7 ^$ R+ A
@.CurrIcon := "drivingHome";& y; ~! f2 k; s
@.DrivingHome := true;* `4 X; f1 a* ^( W( a& e+ K
end;
1 {0 z Q" Q6 s$ z3 A' V3 ^: W4 d& U else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# C" @9 |" ]9 g( _7 C part := @.transpOrder;% }0 y! C) r& A9 s* x& o# V
part.move(@);-- load part
* Y1 m7 ^# {* ?* q @.CurrIcon := "load";. z5 S- @) `9 L8 L0 L
GlobalDistObj := part.globDestination;& M3 z/ b/ t8 z4 s: k0 ?$ G* R
assignLObj := rgmanager.rgAssignL;
( B* x; b# v; ?7 ^9 ^% U row := assignLObj.getRowNo(GlobalDistObj);: }# i% g r1 {" k
if Row = -1 then -- since 70
" i: T6 p; w- T0 @ if lan=1 then. Z9 Y: W7 ^6 H; N) K$ A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. P& l+ |$ N) N' } to_str("in der Andockstation: \"",?.~.name,"\"")); |! z" C% ^9 x; @! A* S
else
# P- b+ ~' s3 ]9 p, m# E* D2 ?# n2 B promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 F. s/ u; A8 u9 I2 g, F4 l T0 T
to_str("in docking station: \"",?.~.name,"\""));
' b' N- g) {0 G. f4 B end; K7 F$ r( t* ~! }0 e. H% S4 J
else
; u4 J+ b0 P3 j" d# `. t8 @ @.Destination := assignLObj[1,row];
O# }+ W8 l. x' B) F2 M end;
; z) o& Y+ M# X9 u! _ newDirection(@);0 |9 [) F3 V7 }) _+ m
@.HasOrder := true;5 P$ H2 x" c ~
end;) S# g0 v- c& K) J; [3 p
end;
$ v# l! o6 C2 R! \1 o+ n. Z0 n- l2 Uend; -- of the method
: K4 m# c% b+ W9 i2 d8 b/ ] |