/* called by: entrance ctrl of the object 'track'$ Z' ?- h% u. [) Q* o
*/
9 l# w1 k' n% W$ Q6 tis) W/ I8 x, w, b% }) n* d& O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! T/ m! `$ \. C; a2 y$ }$ M
do& M; t5 \0 }3 y7 G
Lan := rootfolder.Internal.Tools.AOLlanguage;' @" X+ I, d1 p! I
if current = @.Destination -- else return
+ l; S" W8 E4 b% K3 a- j then
! Y% u/ P' \7 c5 J5 K @.Destination := void;; Z, }+ c' W9 i g0 N) t& I+ q3 g. r
if @.occupied then
5 w. o: R( b8 N$ `8 X7 n part := @.cont;
, t" U/ q: |1 k0 N8 Y/ {2 h @.transpOrder := void;1 p3 O- J* w b0 i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' f/ b! E2 a7 S0 Q @,root.eventcontroller.simTime);) \9 f$ b2 E. Z, A
@.HasOrder := false;2 O; H5 v7 b* U% v+ o; H3 l
@.DrivingHome := true;: H1 P. A7 ~0 W
rgManager.tryToStartTransOrder;
* `7 c8 g/ u/ h4 z5 @. p if @.Destination = void6 \- T! w/ Z! X& n$ C
then -- no transport order for vehicle @5 S! k2 h* O- P( p
@.Destination :=% f" ]5 _; t0 S9 \7 \2 m# F
rgManager.nearestFreeStation(@,track.~);$ P, |$ W/ b, {+ K& @# o
newDirection(@);
9 T* j% I: e( }1 R l! R if @.Destination /= void then2 `3 ?( G& |' ?4 q N6 e: g: r4 c
@.Destination.NumReservation :=
- U4 y: i s/ u3 x3 B7 ? @.Destination.NumReservation + 1;' D9 Q" N& ]) ^
end;8 U6 ?2 V6 ?9 X9 K+ H) w
@.CurrIcon := "drivingHome";3 n. @2 F; w2 I! }: Y% r
@.DrivingHome := true;
: V- \# }7 f. d2 R! A( F! k end;" r& ~2 O0 \7 u1 i1 T
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 r, [$ A3 n; q part := @.transpOrder;
3 m& O1 W( U& w part.move(@);-- load part/ b1 b* K9 S& \6 h2 V, p6 F& y8 I
@.CurrIcon := "load";
# T0 D/ C" m# S; g( p GlobalDistObj := part.globDestination;
2 n* @+ U3 D% s assignLObj := rgmanager.rgAssignL;
8 a; ^1 ~4 U! c0 Q9 \ row := assignLObj.getRowNo(GlobalDistObj);6 ~0 q$ Q. p; Q7 ]3 I5 {' L
if Row = -1 then -- since 70
6 C8 s$ n( W/ Y' e$ K% s- M% W if lan=1 then
' r, o8 {$ [; j/ P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# X9 X! a* N; G4 j* V; Y to_str("in der Andockstation: \"",?.~.name,"\""));- Y" m& H _# w3 b$ J
else
4 f1 S) b: ^+ M" p# H' i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: h; f: o3 b C+ w( s to_str("in docking station: \"",?.~.name,"\""));
2 X) S/ a Q' J$ j# s) \! T end;! W. h8 t, |, m0 b
else
3 }4 r$ g: I7 F# d0 Y) Y- W @.Destination := assignLObj[1,row];( _ X% d7 B: A) P- e, |
end; & G8 A9 d- Z6 _# T7 z
newDirection(@);2 P3 R4 Y6 @" E$ S8 V
@.HasOrder := true;- R/ n( p0 G& L. I: |. I6 o+ u P
end;+ B1 s. d! V4 B8 ~2 L
end;" l: ~7 A; a- v/ w
end; -- of the method% `4 r/ x, k! _) N
|