/* called by: entrance ctrl of the object 'track'/ D3 d% Q' c w8 n: g
*/
6 P! j& F* h' W6 Z6 e O# y7 @is( F1 b5 t5 F, T# T1 b. m( X9 p8 x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) d1 K3 b0 J9 }do
% c# g& {" k5 _9 M) l, |4 p) l Lan := rootfolder.Internal.Tools.AOLlanguage;
) Q" g% g; O) Y0 U, E) Q8 O if current = @.Destination -- else return' J) }" ?+ X* m5 D& S6 j7 E3 c
then5 {1 P8 F, m5 n) [- X. A
@.Destination := void;9 U3 _" K8 c& w& G8 H( y y' J
if @.occupied then
6 j- o( S4 J3 c: v6 g part := @.cont;
/ D% S! ]! e U$ z( q, J @.transpOrder := void;
. v/ F) H# S* w3 w part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; {1 L( a4 M! a1 a8 Q @,root.eventcontroller.simTime);8 m# T) h& I# M6 X6 f
@.HasOrder := false;
* R- T( n! b& r( v4 \ @.DrivingHome := true;
' b4 _$ ?5 ^. p. r rgManager.tryToStartTransOrder;
. x% Q: P0 H/ t$ e. u; X3 u% y if @.Destination = void
5 E. @' _5 k4 N. K, | then -- no transport order for vehicle @
) q# ~( M. C( ]0 ^5 h' A @.Destination :=
( M6 J4 @, j% d' V: ]- m& B e0 p rgManager.nearestFreeStation(@,track.~);) a6 W* P: @" Z! W k
newDirection(@); 4 \" R, g1 ^7 D; t. N5 Y
if @.Destination /= void then
2 g o* h" n' R" g4 q( B3 l/ v @.Destination.NumReservation :=
6 g( z6 j; F }* v4 _) r' q @.Destination.NumReservation + 1;0 W* ~# I/ i- K7 E0 k
end;
8 G3 I3 D" Q7 R$ G2 m @.CurrIcon := "drivingHome";- e, x( i+ V8 O6 l+ |
@.DrivingHome := true;0 u( y& I' _ ?8 m G
end;
" A$ I7 ]5 R" R- @# X _- F4 U else -- the vehicle @ is empty, both vehicle and part are in the same dock station# d& N9 _; d( }# A( s1 P
part := @.transpOrder; c8 ]4 |0 F' T! w/ c
part.move(@);-- load part
* m# I, N0 b+ H, \* } @.CurrIcon := "load";+ }, S1 |! ^" u1 v
GlobalDistObj := part.globDestination;& `4 c( E# F+ H
assignLObj := rgmanager.rgAssignL;5 R( D% x% |8 h0 e4 K5 I
row := assignLObj.getRowNo(GlobalDistObj);
& [- h4 V+ B! t, Q( a if Row = -1 then -- since 70
: m. V% J A0 C. j7 k9 z Z. j! A if lan=1 then
6 F& i5 I9 R+ c6 } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ K8 @/ D* l- @" _4 _+ L to_str("in der Andockstation: \"",?.~.name,"\""));
$ n5 ~, o# |5 j7 Q1 s else
+ o% A; L b* s+ ^2 G) h0 J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; m5 L7 L0 ?' a8 M% f to_str("in docking station: \"",?.~.name,"\"")); 4 ?% M/ p( ^: u G# n
end;
# j' R6 y8 D( T' J3 n C4 H else
( O' J# f! P& Y2 Z# k6 j! D, { @.Destination := assignLObj[1,row];
+ E7 _$ _' K+ g' ?" f) O3 s9 B end; ) x) r) [, E5 h/ h7 @" r6 D
newDirection(@);
: i& o, j+ o, n0 l @.HasOrder := true;+ y$ o) l7 [; \- _* @3 g
end;8 f/ c+ F( O. s( `4 l
end;
L s) e/ i2 Hend; -- of the method
3 _2 J& d: x3 E4 ~) ^ |