/* called by: entrance ctrl of the object 'track'
y' e3 K, a# D6 W" G( @. w*/
% v9 c1 o! H" D# h* mis- B/ V/ W" c8 ]* v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ G- S( Z# ^1 F& U/ g9 Kdo
: |( \( c- e& D( A! [ Lan := rootfolder.Internal.Tools.AOLlanguage;
+ o: s b- h" U8 w* d# R) K if current = @.Destination -- else return, w! v) Z$ e3 g* `
then
3 U3 s! }3 w- V @.Destination := void;: `; J7 \9 L+ C1 o' X0 S
if @.occupied then
$ c/ k3 d: U }9 I) ^( S part := @.cont;
" |2 [4 { b% J( X. K" l- B" I @.transpOrder := void;( j' {: r% {, i8 G+ _" f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' J) }* L0 E1 ^* H1 X8 b3 V
@,root.eventcontroller.simTime);5 o6 S, z( g6 }' |# c9 K% z
@.HasOrder := false;" _- _/ o5 F$ [1 k. n1 y$ [
@.DrivingHome := true;) \7 v& e* p: o: m' b
rgManager.tryToStartTransOrder;- R$ R0 I# x! N) m- o g( }
if @.Destination = void
- z7 d; ] m& ^ then -- no transport order for vehicle @1 X) G0 t! _% p+ ]% o) T
@.Destination :=
5 C# i I- o' f. U& ]) j rgManager.nearestFreeStation(@,track.~);
+ b( |2 j$ j: {+ c u1 p# R2 ^ newDirection(@);
% ?: e) K7 i- V% w3 y if @.Destination /= void then; p9 y9 E' Y4 r9 x) ~7 a* T g
@.Destination.NumReservation :=
6 r" g3 p* i( g @.Destination.NumReservation + 1;, s/ N& V' _0 t |
end;1 K' b& d9 F7 \+ P3 L3 V8 V3 i
@.CurrIcon := "drivingHome";4 k4 y# v3 h& `( m3 X" M N k
@.DrivingHome := true;
\1 A, m$ I, m( s7 b end;8 N' M2 V! S& l1 Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' K/ N$ p4 |1 R$ {3 o" Y( i, y+ Q
part := @.transpOrder;; K/ p$ w) @+ g: h5 [
part.move(@);-- load part
3 L% C3 |/ X% N$ d- u! l& O! O! ? @.CurrIcon := "load";8 ~4 p+ F, W7 n' N+ @) k! y
GlobalDistObj := part.globDestination;
+ Q$ A; v y6 M) x1 y/ D; N _5 @ assignLObj := rgmanager.rgAssignL; r# [! _! {0 o1 R5 E
row := assignLObj.getRowNo(GlobalDistObj);
5 m1 K; R* f- z. v* G8 V, {7 ~ if Row = -1 then -- since 70# K7 s& P' U2 m+ E7 V
if lan=1 then
" N7 O _& f2 D$ T0 _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 L0 g9 N$ ~6 R6 c0 c
to_str("in der Andockstation: \"",?.~.name,"\""));
3 g$ T- d% Z" N8 { else
; n# r3 P2 F$ y& ~0 r promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. z; Z; n2 y! {+ ~
to_str("in docking station: \"",?.~.name,"\""));
$ `9 Q; A9 ^7 U( O0 r0 H end;
1 I9 u; I$ [( P9 F$ k: k else
: l+ e) U: j# G" J2 O: o @.Destination := assignLObj[1,row];
+ B" A# p U# I7 v, }& r& @( P end;
. f- E6 T+ [& c% f" ^/ S newDirection(@);
' U9 L5 L2 Z8 j& C$ w( X% ^8 K8 M, E1 n9 F @.HasOrder := true;
8 c3 J( b8 f* B0 {3 L2 D8 ` } end;4 I5 A& Q$ R: A/ h. H
end;
* N+ F7 ^. ^( g0 Oend; -- of the method
' G7 }$ C8 r- T+ r8 ~4 {$ h- \& d |