/* called by: entrance ctrl of the object 'track'* n% n* `( {9 P& w3 S: j
*/1 T* M; u' `. l% i; m/ a
is$ b! c$ k, b5 {$ u9 i
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 r# X5 u$ }/ o# ~8 J/ g% }do
0 w( U, x1 ]8 p% l) Q Lan := rootfolder.Internal.Tools.AOLlanguage;, |, }# D' J& c1 w
if current = @.Destination -- else return
6 e6 D( f, |% C then
7 K; ^' s* c2 j; i2 | @.Destination := void;
( u; Y8 C0 h/ J- W! a if @.occupied then
; c" T& D5 F: F9 C part := @.cont; P+ m7 k6 n$ E7 ~7 a" g+ W, V
@.transpOrder := void;
1 }, I: }+ O* G part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ U; p7 U7 h' V2 i, R
@,root.eventcontroller.simTime);
$ J9 @7 z1 B( n @.HasOrder := false;! f' `, y! {: H9 w( k
@.DrivingHome := true;( y; n( K9 `- O- O% R
rgManager.tryToStartTransOrder; i4 ]: _ r" I! G
if @.Destination = void( i& r2 I+ h; {* L6 {
then -- no transport order for vehicle @
' i, s' x6 X& R @.Destination :=
8 D2 h5 |" f/ S6 K$ j3 {: ` rgManager.nearestFreeStation(@,track.~);
$ W/ F2 E4 ~. y newDirection(@); : l1 P$ p$ X D# J
if @.Destination /= void then1 c8 @7 ^4 m; |" C7 I
@.Destination.NumReservation :=
0 v L/ f- h/ E, Z4 J @.Destination.NumReservation + 1;- X! v6 b# F( O3 v
end;
. v" |& }! o* c* f @.CurrIcon := "drivingHome";
. Y; K7 X' J8 D0 f @.DrivingHome := true;" `" ]* K' l0 h1 |/ j- z
end;( V9 ~* x. ^! M6 G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" a% K1 L! X+ G# K% ~% c+ T+ W" t part := @.transpOrder;
3 P5 w9 o) |3 G! q: g! g part.move(@);-- load part) N7 y3 Z2 v& ?7 f
@.CurrIcon := "load";
* P3 R# @0 @& h/ p7 J GlobalDistObj := part.globDestination;
* b, L( Y, G' v8 C3 U6 Z assignLObj := rgmanager.rgAssignL;9 o( t* @* L/ I+ _8 u$ _* @
row := assignLObj.getRowNo(GlobalDistObj);
* Z8 j: m& X9 R& N5 C if Row = -1 then -- since 70
1 |; e3 J; M* Q. B- B9 g if lan=1 then
1 s# {2 Y$ O {7 w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ w5 \ ^1 p7 U% S& g! Q
to_str("in der Andockstation: \"",?.~.name,"\""));
x# Z4 K& c8 t- {+ r, \ else
' y7 J% c w( o& n E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 @' P5 a' {) l8 ?
to_str("in docking station: \"",?.~.name,"\"")); & ~ s8 n" _- H9 C
end;! }; ^: }6 k$ D# `+ y
else
% Z) C3 [9 J" l V; H @.Destination := assignLObj[1,row];0 m4 D' i, ~5 j4 b; a y
end; * }( {) F/ t9 B) B0 v
newDirection(@); Q& Z x+ z/ T- W z
@.HasOrder := true;
$ x* ]0 { {" \ end;0 j) p3 n5 W& V. {, }$ U! H
end;
" d) n& u# r4 H3 @- W9 Rend; -- of the method
4 \( U5 W% l; a" e* l3 | |