/* called by: entrance ctrl of the object 'track'8 S6 G: r$ J; J( @
*/0 g. X2 G5 V% N3 Y- Z& w( k& L
is. i U0 U2 F1 |' l9 y r! i" z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: ?% H9 q ` t0 l4 `1 w$ u' u
do
1 J0 y& F6 a, i7 d' T" _/ c: s2 G8 x Lan := rootfolder.Internal.Tools.AOLlanguage;. m6 @ o% r& y
if current = @.Destination -- else return
- o7 W1 f2 s+ ?3 p2 a- R0 _ then( M1 y$ a, P. A- J- V
@.Destination := void;( f1 I* K* P5 R8 G+ ~$ E8 h( z
if @.occupied then
4 {4 D6 ~4 A& }* f; G part := @.cont;
; g. B7 F0 M+ m7 b @.transpOrder := void;1 {4 V+ @% P1 j6 k
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 K( N6 l" E6 |% u
@,root.eventcontroller.simTime);- A; n" h' b& [
@.HasOrder := false;
, f1 a6 j& W& b) C @.DrivingHome := true;
; |; ?$ J o8 k# U9 N; {' c: A* B ?/ g3 K rgManager.tryToStartTransOrder;3 u" E. V* G( b$ M& h) f5 t0 @/ n
if @.Destination = void( d" |' N. r5 O6 P! @
then -- no transport order for vehicle @
5 u/ M& |2 q: e7 \/ V @.Destination :=
2 ~* P b8 r0 V; g/ a. \: T rgManager.nearestFreeStation(@,track.~);
v- d( h" `4 E, \9 { newDirection(@); ]. ~8 K8 J: f0 H4 B- B
if @.Destination /= void then D- d! `( n) X
@.Destination.NumReservation :=
9 N' W( e) l, {' z$ h" g# m. k @.Destination.NumReservation + 1;" P) A3 F1 _- v2 U' J% _9 H
end; V! ^: u/ f y) P. T
@.CurrIcon := "drivingHome";) s3 h* V$ |: g: p
@.DrivingHome := true;
! p& B9 [$ m0 B/ v! h end;
! Q" `7 H" N. n; T% Y# g/ e else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" a& _+ [( H* t, m+ E( H8 e part := @.transpOrder;$ [- J$ _- G0 o `2 l
part.move(@);-- load part
5 z. l9 U* n% y+ L. ~% t7 h @.CurrIcon := "load";% @# u8 O) @' v! v. v$ D
GlobalDistObj := part.globDestination;
! g. C* i; N- i W9 e assignLObj := rgmanager.rgAssignL;
: l$ }2 T$ U I3 r1 S: ~ row := assignLObj.getRowNo(GlobalDistObj);
, p% i- b1 P9 p! [- ? if Row = -1 then -- since 70* Y3 Q6 `7 e6 E _5 e' p8 x
if lan=1 then
+ F: j$ r5 `$ h* E5 v; Z1 J promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' j! B! ]. |3 V to_str("in der Andockstation: \"",?.~.name,"\""));5 A# W/ f( `5 ^) g& o# |7 M
else
. m& _; c4 g/ u& d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 v' G5 U7 l: A$ q( P
to_str("in docking station: \"",?.~.name,"\""));
2 u: s2 L& q3 g7 o( E1 [2 ?! P. M end;
' |$ V6 E3 p! W6 z8 E3 N else
, A0 J" q) N" o! v. N% S! Q @.Destination := assignLObj[1,row];" f+ z n% p9 h0 V( c" ]
end; - `, N4 g2 F2 g4 f" ~4 U4 u
newDirection(@);
* B- ]5 p' Y. g @.HasOrder := true;
' P$ h. U" M0 z" {* i end;* u/ F- J( p- W2 S, G* z
end;) \; d G: S$ f
end; -- of the method
2 O% d$ T) @8 r) K6 P5 B" z |