/* called by: entrance ctrl of the object 'track'6 d! t5 P3 z& |; |" i/ h, d
*/4 ]# O0 ?( c; w2 n& q) ]2 ]2 ~
is
? W: R* x4 }) S: K6 `; z) i) A part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 ^4 q( O) Q# @( b/ J
do
! q: [8 O; o, w# S% l6 B& [ Lan := rootfolder.Internal.Tools.AOLlanguage;8 `$ u) T$ e: U, H
if current = @.Destination -- else return! V* e: R1 n! o
then1 {: Q; i. I+ p, S7 [/ G- w( L
@.Destination := void;
, `2 D3 }. t0 J! v- s$ P if @.occupied then
0 A' M8 O& E7 Z; ~ part := @.cont;
0 d) @; E: T. j8 [! x" m @.transpOrder := void;* e, Y+ k+ U0 \: x3 y% y$ C( c/ Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ c+ [- C* B; E% k' Z5 ~7 D
@,root.eventcontroller.simTime);
. c* [$ M) h) }, J$ d @.HasOrder := false;9 e1 M5 T6 N- ?# |, Y% t" e
@.DrivingHome := true;
& [2 H" t( n D( E. T$ h6 c rgManager.tryToStartTransOrder;8 A, e6 a- W, p8 g8 J7 }
if @.Destination = void( d) P& _; z' N" y0 _9 `* p
then -- no transport order for vehicle @9 E, |+ E, o: r
@.Destination :=5 _5 F8 h7 T# Y: _
rgManager.nearestFreeStation(@,track.~);7 F, j5 T" A8 N, i
newDirection(@); 4 J2 n" a3 g% I& \# O8 b
if @.Destination /= void then P% K* b( T, j1 Y
@.Destination.NumReservation :=: l& C. W) @1 i. D
@.Destination.NumReservation + 1;
. }1 m7 R; x1 x9 A) x end;
' i5 b1 v) Z) j @.CurrIcon := "drivingHome";6 r: P; F8 o& z5 X/ R2 R; X% H; h
@.DrivingHome := true;+ {0 _; q, P' V+ T k
end;
6 U) M; i! Y4 n9 x' L else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 _$ L9 H) e* x% d, {
part := @.transpOrder;5 [. h1 V; b; q8 [: u/ S
part.move(@);-- load part
' ^8 Q8 u. Z9 ]! ~8 q: T: G; p @.CurrIcon := "load";
0 h7 p3 D. Z1 U0 O3 F GlobalDistObj := part.globDestination;
: g" {/ ~% v3 K* k6 c assignLObj := rgmanager.rgAssignL;
) ]+ {- e8 r! P" K0 L% {# K row := assignLObj.getRowNo(GlobalDistObj);
; p* R* y6 o: [" ] if Row = -1 then -- since 70
# L7 x- M% b) l$ } if lan=1 then2 n& o! _4 Z- }, ]. V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 T- W$ {3 ^' l v
to_str("in der Andockstation: \"",?.~.name,"\""));
; y t# Z6 o+ i6 L9 I else
$ w4 l$ \! q, T. M5 l$ D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 B" E2 ~1 |- {" f to_str("in docking station: \"",?.~.name,"\"")); 8 ^ X' c+ t! g/ k
end;) J9 R9 Y0 L" ?+ J: R
else6 k" K% K2 i; U& P8 J
@.Destination := assignLObj[1,row];
/ q" }+ V& L1 s8 A( ^3 d& v' q2 N! v end; 5 K! ^! a+ L! Z
newDirection(@);
0 i6 M( G0 Z7 L @.HasOrder := true;
/ K( [3 T: |# c7 M end;
, M$ s! f* f: u0 L9 h end;
5 Q. F0 T* T( Jend; -- of the method
. z# z# X1 m1 p- ? y y; t |