/* called by: entrance ctrl of the object 'track'0 r# d* c2 {6 H% H
*/
3 ^, U+ [, A5 v4 B9 mis1 n! T# A7 B) ~; o) @0 @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) ^8 m v& _7 q; S$ S! V- S
do+ L- j8 ]% K2 `$ C! v
Lan := rootfolder.Internal.Tools.AOLlanguage;5 B9 i* x7 P. `( ?3 ^: U3 G
if current = @.Destination -- else return+ m" X! W# p# h
then" S( X' T' {$ L4 [: Q; O
@.Destination := void;
# F5 ]+ S$ l* \1 Z! n" j1 d+ ~( y) \( o if @.occupied then- q- F3 p6 u4 T: {* v ?' `
part := @.cont;
/ \! _: ~2 ^1 ^ O5 m$ N2 X @.transpOrder := void;
& g3 F$ U. g0 U' n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 Y3 b4 j$ D% o2 }" T @,root.eventcontroller.simTime);# w1 D$ R7 E/ q) i
@.HasOrder := false;5 o$ |2 @' ]+ H7 Y& p6 z( j
@.DrivingHome := true;1 R$ n6 O4 f% l' {0 e0 Q
rgManager.tryToStartTransOrder;1 s8 V4 m8 h- I- {
if @.Destination = void) s2 t( M* B4 x/ s
then -- no transport order for vehicle @7 B+ D( P( t: ~9 Z* [2 X5 D7 E
@.Destination :=
# A' |# M# r. `! M rgManager.nearestFreeStation(@,track.~);% p# b4 S6 @! Q9 V% r
newDirection(@);
' o' J) n% X! }0 f8 x! m if @.Destination /= void then( T8 B. Y# E+ E2 i. J3 Y P. g" Z
@.Destination.NumReservation :=/ U3 E8 \& W: A& Q
@.Destination.NumReservation + 1;1 r. o) ^2 J8 O! p
end;
* e- y' ^/ U \! t ? @.CurrIcon := "drivingHome";
: L$ y$ B- N- G( k! H, r( | @.DrivingHome := true;
, @* d6 {* ]( @2 A( r6 S end;
0 b( D/ q5 d; }2 s( e else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 b3 o" z, u# l) i @& ~
part := @.transpOrder;
( \& z0 m2 w5 ]5 n' @, | part.move(@);-- load part
' U# b" V# C# C) U @.CurrIcon := "load";
6 }/ | z1 I! Z. c2 l: E- a GlobalDistObj := part.globDestination;
" M- U4 b" F& W: u assignLObj := rgmanager.rgAssignL;: h4 W! v) H2 f! ?/ V/ |% u
row := assignLObj.getRowNo(GlobalDistObj);
+ T& E* e2 {: A; |7 u0 @ J( w if Row = -1 then -- since 70 I9 a# _, M6 _4 X! E; H
if lan=1 then
' B2 l$ t9 i' o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* M- m) r7 O* `" I/ p
to_str("in der Andockstation: \"",?.~.name,"\""));
& q& N) {7 X3 n# b5 i' ]/ K% { else
* i( j V S4 b/ H) z0 y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# J; i$ G9 Z+ `" [: J
to_str("in docking station: \"",?.~.name,"\""));
( |- V4 c) ?% q: `4 k end;
5 ?% _! V0 S7 u% o; t& n$ S. U9 B else4 M' g; p6 [. \: N0 [
@.Destination := assignLObj[1,row];/ N% p$ ]+ j5 @; z
end; - y6 }# h# v D' r
newDirection(@);7 j. l# a3 J, Q4 |0 s1 t; U! d
@.HasOrder := true;
& I' j4 h' z: {2 x! J end;& @2 b0 f( a0 R2 D9 J/ P- d
end;, M; B9 c! F0 w5 O* S8 I! ~) ?" n
end; -- of the method* ~1 l+ w# j0 W
|