/* called by: entrance ctrl of the object 'track'- G3 Y9 w( s: S9 B# d9 J0 `
*/9 t1 ~6 j, E- I! ^
is
9 S+ |0 \9 I. f! O2 \5 S& x part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ s$ q4 n2 d: o6 w! s! V/ I! g
do
' R( K9 a" l6 h) b( \6 B3 t Lan := rootfolder.Internal.Tools.AOLlanguage;
( O% m' H) i( P* j5 B if current = @.Destination -- else return
% T3 D$ @7 D6 q5 Z6 z* X then% D) U6 [7 Q* x9 ]1 t) ]% S
@.Destination := void;
3 P* {* g+ ]+ I+ R if @.occupied then- A9 J+ b% C3 W, k! `& \: P' d
part := @.cont;; F3 A6 G( T% b6 ~; L9 l, A( s$ M
@.transpOrder := void;
' {% g/ |5 Q1 E5 x- |& D8 E part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, X- ?( T2 u6 ?# O$ H+ L; I
@,root.eventcontroller.simTime);& y: v) v: F- p% K
@.HasOrder := false;& w+ Y9 o/ b( T2 v$ R. {' D5 t9 L
@.DrivingHome := true;
% V- b) b3 y1 H/ \ rgManager.tryToStartTransOrder;9 g# `' J* d) j1 l6 ~7 ?7 c8 }
if @.Destination = void0 i2 N* G5 W* @& p
then -- no transport order for vehicle @% j, l5 U: V* E; C R o4 l' e
@.Destination :=3 R1 k% i5 F& Y/ A- ?
rgManager.nearestFreeStation(@,track.~);
2 v0 a8 f/ r K5 R: d newDirection(@);
8 C6 I- e4 k8 K' D* t/ C if @.Destination /= void then
( N4 `/ r5 m+ ?8 ~& h# l, _( H% e @.Destination.NumReservation :=1 V# G2 X. h& J2 N( g
@.Destination.NumReservation + 1;
; T4 H: |# }: W% C* H) J end;
( Z' `7 s/ ^& m9 t3 i @.CurrIcon := "drivingHome";
& x, X) W: H. E. w! m @.DrivingHome := true;; o. e2 L6 h: |# X& r/ g0 c
end;
P0 T1 r( [* _. b' O else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- w% x2 c0 w2 a5 u part := @.transpOrder;! W! m: O' n' B# U# v$ X8 g% m- V
part.move(@);-- load part5 r# Z2 s( z& @. j; a
@.CurrIcon := "load";/ Y7 g9 Y% o5 o* d( i2 |" i$ Y
GlobalDistObj := part.globDestination;8 j! Q+ R! y0 |# y' a9 X
assignLObj := rgmanager.rgAssignL;5 z( T, t" H: j" d
row := assignLObj.getRowNo(GlobalDistObj);8 i _( }( l. a' i# g3 E
if Row = -1 then -- since 70, f) x) `1 D2 J6 {- l1 y
if lan=1 then/ w7 d' i% P2 \3 k: \+ a9 W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& o+ ?5 d7 m Z; P+ F% o
to_str("in der Andockstation: \"",?.~.name,"\""));
, ~. h: @+ @ f' ]7 e else
# O) e0 S4 Q/ z: b. u i( g: S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 y- R4 H F6 [: H: q( o to_str("in docking station: \"",?.~.name,"\""));
! q5 U/ ?6 b/ g; B end;5 `% P% w9 ^+ { W1 \
else, x& ]& J' a9 Z0 }6 j4 ~4 F& r# e; j
@.Destination := assignLObj[1,row];. o8 s5 Z, J* c. ~6 m9 Q7 A+ p
end;
8 a. C5 |1 V5 |" N" ]+ Z+ v newDirection(@);
/ u( b' \ `9 k* W @.HasOrder := true;
2 w( o& p [( q% o" _) Q/ ~ [ end;5 |1 X* k7 T Y/ D
end;
# e+ E! y: J* {3 _& e! hend; -- of the method; @" K: @4 ~ B& P. O( R) D* ~
|