/* called by: entrance ctrl of the object 'track', ]6 W h& G6 E G
*/
: w/ Z1 q N5 R3 X1 Sis. r5 g9 L9 u4 B5 h2 t; e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 C' x7 b8 e7 x
do
! j( c9 V7 _% u' t Lan := rootfolder.Internal.Tools.AOLlanguage;
7 m w* T& I8 ? if current = @.Destination -- else return
9 s! X% u1 p+ b then1 }4 s. m, b- N4 h& w2 h9 q# S+ V
@.Destination := void;
, _% Z3 @6 z3 y if @.occupied then
- w7 J( N& F. N' |2 W; @0 e+ |1 X2 C part := @.cont;; V( F1 J- T, t/ r
@.transpOrder := void;
; E' E/ w' s8 g. {7 i4 k# A part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ c; S5 m* B0 u' v @,root.eventcontroller.simTime);
1 J d# n; Q0 `3 B: K* J# S @.HasOrder := false;1 a/ \1 k7 t9 [! }
@.DrivingHome := true;
1 n: c2 D& _- s+ e/ [# n6 ^. K0 C rgManager.tryToStartTransOrder;3 f! {5 o0 @; c6 G3 y4 |6 j
if @.Destination = void
! U! ? b- w1 G7 Z then -- no transport order for vehicle @; D# I0 x" n2 [3 g3 J8 P
@.Destination :=( w5 i) i8 H' t& ]- d$ _( c
rgManager.nearestFreeStation(@,track.~);* A+ S u5 D; R4 P) e. h
newDirection(@); 9 N0 ]8 G3 M% q' ^$ F
if @.Destination /= void then! ~* @: Q h* k: T$ p# o
@.Destination.NumReservation := }, [2 Y9 k" p
@.Destination.NumReservation + 1;
) r& J# _6 H+ @ end;2 f5 I, N; U" O
@.CurrIcon := "drivingHome";
" R V( p6 s2 M+ q0 k @.DrivingHome := true;0 W3 d% x S% o# T! J' V! a2 _
end;
* L# M4 x9 s- K. m! u else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! K# G8 m- i+ g* i0 m; r* I q part := @.transpOrder;# K+ E6 w# K8 V7 y3 r/ I
part.move(@);-- load part. \' T0 d* C8 R1 R
@.CurrIcon := "load";- [& F2 I5 w/ B
GlobalDistObj := part.globDestination;& P' a# I' j% i g+ M! K
assignLObj := rgmanager.rgAssignL;
+ R$ N2 n6 i1 o4 c) x/ \ row := assignLObj.getRowNo(GlobalDistObj);- K" L, V4 I9 }" q' K# T, q
if Row = -1 then -- since 707 B. P4 N* q3 F# O
if lan=1 then7 R# r4 i+ K7 N" V6 g3 y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 D4 x4 d3 d3 z# |
to_str("in der Andockstation: \"",?.~.name,"\""));
$ Q r Y0 n/ j* [ else
/ G! A3 l4 }" j: |. z& h1 \3 J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 o- _7 e6 G5 `% ?! K to_str("in docking station: \"",?.~.name,"\""));
# O4 V/ Y" w! g$ i end;* X& W) A5 w9 g+ N- r- B7 B9 U
else& A0 j, i; X, O/ i: K
@.Destination := assignLObj[1,row];
% U$ n% n) [) F9 ]- {4 W end; 6 {7 N" V0 R2 e8 P- s
newDirection(@);
8 A- w" O, k9 _7 _0 w2 ?! ^ @.HasOrder := true;0 X7 r! T5 v& ]: \) S- r t1 s8 b
end;
! L4 m" `2 ~( q& `' e j& B& h end;
( W S( u4 Z. E* {- T) S- r5 c' Uend; -- of the method0 f% N+ |$ [6 d9 Y; X2 m
|