/* called by: entrance ctrl of the object 'track'( ?7 G9 ` f& d7 Z' T6 r
*/3 F/ e" V3 A! g$ `* _3 K" [' j s0 _$ L, m
is
7 V( g. M/ f, i& b* x8 x/ ^+ O& W part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 i+ J! m' j- D r) Jdo
# ^" G* a }$ Q7 c2 Z. u Lan := rootfolder.Internal.Tools.AOLlanguage;% K8 _' H J; @2 I, c* l
if current = @.Destination -- else return
+ r1 E! Y1 Q- o1 v then5 L; q$ ^! X5 L$ e
@.Destination := void;
8 t# v, ?3 _+ J if @.occupied then
; w+ J$ r/ [9 ] part := @.cont;
; _ N4 f$ f3 ~: |8 @( n9 O, E @.transpOrder := void;
" l/ e! z7 B- K8 S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 z! b _( G( x% F0 h @,root.eventcontroller.simTime);
! }& F/ f0 ~/ b @.HasOrder := false;. d) Z! p! y3 m) H
@.DrivingHome := true;
5 K3 z1 C+ w3 K) a5 L. K- M' k rgManager.tryToStartTransOrder;9 T3 r2 e0 e3 c' j) f8 ]
if @.Destination = void0 Q2 D7 W8 j( {" j% D5 Z% T/ y
then -- no transport order for vehicle @
5 w6 _4 y: b* M @.Destination :=
8 L0 b" [9 I2 _, t ?8 D rgManager.nearestFreeStation(@,track.~);
4 i; O& S+ i4 k newDirection(@);
: n' C5 t; N) f& }* a/ ?( e/ A if @.Destination /= void then
6 H! N- r+ T/ \: l$ N7 ?" M* f @.Destination.NumReservation :=- X9 l1 n6 f2 D1 N; P( X) ?
@.Destination.NumReservation + 1;: F; H4 \$ I6 s- f0 E9 O6 f
end;4 V7 w7 b6 F5 @$ C" H' }' O
@.CurrIcon := "drivingHome";4 y$ I9 Z+ z6 k6 _. H: w
@.DrivingHome := true;4 F% ^% g1 ^. s
end;0 @* v! U/ ?" c( j& V9 x
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 ~# C9 H* Y8 G5 o1 l
part := @.transpOrder;! A4 U/ S8 W3 P3 y
part.move(@);-- load part* o- z! Z7 ~/ S* k* k5 [% ~
@.CurrIcon := "load";2 {) h1 N9 r" @' ]* |0 T2 v
GlobalDistObj := part.globDestination;8 F. X; \5 K- H* W
assignLObj := rgmanager.rgAssignL;3 ]1 ~4 p: P5 ~6 X: ]' F) \+ D
row := assignLObj.getRowNo(GlobalDistObj);% j; C8 ~- {0 A. T
if Row = -1 then -- since 70+ h% a* m& `0 c. |; z* d( G
if lan=1 then
' y1 @' b: a4 q$ M3 B3 o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ [2 r" \2 Z% i! q8 S to_str("in der Andockstation: \"",?.~.name,"\""));2 L, t; Z8 t% _0 Y1 _# ^& p. f
else
$ a7 J' x: \0 d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, U- I3 v* z6 u4 S1 @, _8 b" ^- b to_str("in docking station: \"",?.~.name,"\"")); 6 Z& F. P4 o3 V! d
end;8 i* D( E+ Y! o0 K5 D8 u
else
9 Z# l8 ?4 f& H6 z: Q& K @.Destination := assignLObj[1,row];
( s2 G. W4 @; o+ o3 M end;
4 h6 `0 N3 A2 V newDirection(@);: D9 M3 t+ h# i5 v) Y
@.HasOrder := true;+ r' l' a: }! X0 H$ U3 _& t
end;
Q/ Q9 J2 V) M2 @ B end;
' _: I g& H" ]9 k* ]. E% j/ `end; -- of the method7 [/ X6 [1 e k+ @
|