/* called by: entrance ctrl of the object 'track'
2 N# p, P& m: p: q+ j*/
, m. Q' j9 A+ B y" O( d# ^* ~is
: ~! o3 [6 ^+ v4 @7 B' e part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 s5 |/ U( s, ]9 Z8 b; G$ ?
do2 W6 p/ V+ Y2 E, I& }0 i
Lan := rootfolder.Internal.Tools.AOLlanguage;: t( K' k2 P7 I! J6 F
if current = @.Destination -- else return
' h; Y% g/ D/ i* Z then( M$ h0 g4 k/ P
@.Destination := void;
4 f2 c- `5 P+ d if @.occupied then
' w) g- m: r, x1 W part := @.cont;3 \* ]; w% c7 U
@.transpOrder := void;) ^$ Q" p1 p7 H& G, z# T9 L! W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ z$ w3 X( V; y5 _ @,root.eventcontroller.simTime);! O( Q% ~& L& z4 V0 V1 D/ i
@.HasOrder := false;5 ^$ x$ L$ E+ P3 ~0 ^- H/ |
@.DrivingHome := true;
) U5 A6 K' _( g& W( |. l, n0 g rgManager.tryToStartTransOrder;
4 [9 D$ O$ R# p if @.Destination = void* ]. R) A( R0 r2 i6 ~' V5 L
then -- no transport order for vehicle @
2 Q9 Y: a g/ `% H; d- U) Y @.Destination :=/ b+ p4 i- i; l7 G: J( q
rgManager.nearestFreeStation(@,track.~);7 T. o U- ]9 U, o
newDirection(@);
( ^/ `4 w* U& ^ if @.Destination /= void then3 u! U$ t$ q( x8 a- [
@.Destination.NumReservation :=- F1 d: t& m- e3 V( O( F% j
@.Destination.NumReservation + 1;
) m# F6 O3 K" A( r1 V$ m8 B$ z end;
/ l! J" }' a; y+ T4 Q# ^. Y @.CurrIcon := "drivingHome";0 g" P' A$ n8 f8 a8 y$ T9 ~! H
@.DrivingHome := true;
% P2 n9 p1 w; H end;" q9 g1 l8 y3 ~: t7 F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 I3 w' C% ]) V5 ~( Z# d
part := @.transpOrder;
L: K+ J6 W% h$ ?$ w2 ]. K( i( i part.move(@);-- load part# q( u: `6 ]1 u0 T5 {2 l. |
@.CurrIcon := "load";* J; s2 y8 P) g j$ ?$ `7 ?0 U
GlobalDistObj := part.globDestination;! t- K7 I8 Q( p8 b
assignLObj := rgmanager.rgAssignL;
/ O5 }" k- y1 q row := assignLObj.getRowNo(GlobalDistObj);
) e# V8 B# p; W6 K! u0 v1 D' R if Row = -1 then -- since 70
5 e( a# T' T) q if lan=1 then" o A$ O) D- W) X7 j5 J0 @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# m: I W4 Q/ y: i* A to_str("in der Andockstation: \"",?.~.name,"\""));
( u: Z) X. w8 _: H9 B0 {7 K, { else
, c% t/ ^* d6 @" A( k( W7 m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
w; q( S* N# J to_str("in docking station: \"",?.~.name,"\""));
- S- c% D: j$ z) ?% _ end;$ w2 h1 x; Q& H- w$ E
else, v9 n9 U# N5 c1 \# M
@.Destination := assignLObj[1,row];& `( I4 }/ d. W: {& U, j
end;
5 ]4 O. b9 {/ p. g4 K newDirection(@);$ V9 n* ~ d$ f3 ^
@.HasOrder := true;
/ I! \, E/ W q/ ^& w! x% ? end;
' U7 R, x7 k. X% D end;
4 J& V! {& h9 C) Tend; -- of the method
6 x6 Y( t3 u7 o2 }/ a4 f |