/* called by: entrance ctrl of the object 'track'
& [6 d" Y6 n* u- z z5 r*/
8 O: R2 d; u" Q% s1 eis
* ?! s+ g8 o5 C9 e8 P0 [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;# E; f6 U5 P& _
do
( y# J8 ?: }3 I. r" m' k Lan := rootfolder.Internal.Tools.AOLlanguage;: U2 r# t( k# w _1 y2 q* h* L0 y8 z
if current = @.Destination -- else return& O8 _( ^, ~( _2 K
then/ K: X% D) g( n5 F7 e! k" H4 N
@.Destination := void;
; S0 E2 R* L* k if @.occupied then
2 @( A8 s" `1 d2 s part := @.cont;
% H' F; Y3 a% e: \6 G @.transpOrder := void;
' Z1 ]( L0 M# O% o+ \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( E/ C* x! R9 H# G6 w# a6 E
@,root.eventcontroller.simTime);
% }0 n- J: N1 z3 q; M7 U: ] @.HasOrder := false;9 ?* t) }2 W! L2 b: r. X r
@.DrivingHome := true;
. K+ @% O( M- Q! p8 w/ K rgManager.tryToStartTransOrder;+ r, i4 d( W2 }/ g/ b: s# H
if @.Destination = void
, C3 p2 ^. N- ]# X0 w- Y then -- no transport order for vehicle @8 ]8 X. j" r ?1 k6 q* E
@.Destination :=3 i$ T0 B' |$ v3 i9 E
rgManager.nearestFreeStation(@,track.~);5 h9 ]% C+ x/ D% Q6 F% A
newDirection(@); \3 {6 W3 c# ] E
if @.Destination /= void then+ y/ f+ w" x: N# Z# q* D
@.Destination.NumReservation :=9 ^! c! k1 h. X
@.Destination.NumReservation + 1;
2 D- [$ e9 W& D5 ?; Y1 n end;" d o6 r* c- B7 S
@.CurrIcon := "drivingHome";
) o8 I" H+ U" S$ X7 M+ {! ^& ^ @.DrivingHome := true;. s2 x$ P: g) C% a) \
end;3 X$ }6 y$ v. K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ o" p( X+ K# s2 H part := @.transpOrder;
% N3 O h6 v# ?0 @$ a6 g part.move(@);-- load part* n, Q; _9 A l L5 P" S
@.CurrIcon := "load";3 c2 y, T! j: ?& F! u" R5 S4 E% }
GlobalDistObj := part.globDestination;/ a0 v: X! b5 J8 ?1 j
assignLObj := rgmanager.rgAssignL;
1 F) ]9 Z1 Z+ h3 k) j row := assignLObj.getRowNo(GlobalDistObj);
% j, I# Z3 e* c/ g2 ~) T, s if Row = -1 then -- since 70; J! _7 t* Y& r* W1 P3 @- L
if lan=1 then9 v0 P9 K! R) Q7 r5 u+ L0 ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- e, S5 f7 S4 ^1 V$ q to_str("in der Andockstation: \"",?.~.name,"\""));
- ^- Y4 e5 W0 \- X else
) I3 w9 x0 C! }/ _, ^6 Z+ X promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ n ?2 |. }+ l; h
to_str("in docking station: \"",?.~.name,"\""));
6 i9 G, u9 T C8 @1 ?7 C end;
+ F1 b4 B" G& o7 e else" P/ V& m* H$ G5 j
@.Destination := assignLObj[1,row];
0 v( e2 @% X, Q; q, n6 j* b2 C$ ~ end; - T! c/ y" K n6 c0 n- |
newDirection(@);: g. M( q/ ^4 h! O+ j# ?, @
@.HasOrder := true;
! d$ s i, l' o" ^# h end;
0 W7 A3 k1 P. F/ @7 u end;
& m2 _) Q0 Z3 S# P$ P7 A% _end; -- of the method
( ]& w9 y' m7 K( A! o: ^ |