/* called by: entrance ctrl of the object 'track'
4 J% @( p+ E; i# R% K*/+ | G& b8 A- A( d9 y
is3 v! M; X4 t5 U3 J) [
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* E7 G# ^' g, ldo
( Q# `9 p( M" q, g. g Lan := rootfolder.Internal.Tools.AOLlanguage;) D( j7 l1 W& |$ j$ O
if current = @.Destination -- else return# N: a {2 x8 r/ L% u/ \0 ~
then2 c1 |: O0 m K
@.Destination := void;
/ F8 r! g' Y e: A8 p0 h if @.occupied then* J: r: B P) ]
part := @.cont;3 h* q- }, m9 w" n$ D; r4 ?7 t4 l
@.transpOrder := void;
; u' Q; G+ e5 H T2 K$ a6 A$ a part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 W" M$ Y9 H" F. {( R: ?) U0 s
@,root.eventcontroller.simTime);
: Y4 C8 O" l( w" V7 X( ? @.HasOrder := false;
* z& Q: @# c" r ` @.DrivingHome := true;
4 q3 e& i3 }6 R; R rgManager.tryToStartTransOrder;( @/ y0 Y" Z. j# H0 M& C
if @.Destination = void1 u6 w! |8 x4 D8 ^; q
then -- no transport order for vehicle @+ t" K0 I# H5 g. {
@.Destination :=
" l! i, W$ N2 O; b& ] rgManager.nearestFreeStation(@,track.~);
# j l, v" I( b g" M% i- n newDirection(@); T0 z1 A7 K" q+ [+ o# Z0 u: D! r
if @.Destination /= void then
& Y1 m, n' ]+ S+ Y m; u) u2 B @.Destination.NumReservation :=
0 |, j2 ^) z/ X- G8 m, w0 C @.Destination.NumReservation + 1;
* B& S8 R8 y j$ c9 v" E end;
3 u8 N+ M0 G& E* S* j4 X' {# w# P @.CurrIcon := "drivingHome";
1 X% a% l2 _5 y9 ~' Q @.DrivingHome := true;
8 f, D6 ^0 J1 U2 K end;
+ n( }' k D' ?9 M' o else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! m6 L: q4 Y+ V" ^ part := @.transpOrder;8 M: `4 U$ r W- W7 c! f
part.move(@);-- load part5 }' X& I9 g3 S+ g1 n- _
@.CurrIcon := "load";
( N- q! r9 u( o! k$ ]* O. S GlobalDistObj := part.globDestination;; S* j0 Q7 \' V5 g
assignLObj := rgmanager.rgAssignL;% ?4 }7 ?! {+ O: }4 |/ H
row := assignLObj.getRowNo(GlobalDistObj);( a7 @; O7 |- L0 u1 ^# I! A/ ]
if Row = -1 then -- since 70: B( c: X' U% ]
if lan=1 then
e8 }6 C( m: V* c5 D9 R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; w! w- E! j- D( B5 _' b8 g
to_str("in der Andockstation: \"",?.~.name,"\""));& }# M2 @% |+ ~/ R
else, u3 ]# B8 T" _6 Y, ]/ j& r
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% a* r- d5 b T7 I/ \ to_str("in docking station: \"",?.~.name,"\"")); 8 {! J* x8 v6 {4 O6 j
end;
+ Q' f6 C; k4 J5 }. A; [5 W: O else" N7 M& b. J9 w6 @* E, G/ m
@.Destination := assignLObj[1,row];, C! e, y* U) ]
end;
$ u& r) Z5 b) D% }! \# m newDirection(@);
/ W- B% [% E% X% w% l @.HasOrder := true;
0 M) T- P/ Q1 [( B# U; U. q end;
. \/ {. e g0 e end;
+ g' b8 |$ t5 [4 ], C9 G2 iend; -- of the method! R) @- x% W" v X( j! M' R
|