/* called by: entrance ctrl of the object 'track'8 q* p2 v$ }$ k. S
*/
5 c; f3 K1 E$ Uis9 e T' `2 }5 W2 d' M( D) e; V
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! T% v5 D7 S& H- z8 N
do
: h2 j' ]; `; e; t. u& ? Lan := rootfolder.Internal.Tools.AOLlanguage;
2 V# c: {+ \5 O( \: T( _ if current = @.Destination -- else return
- {. E: G! C1 m% m D, o0 X9 q then$ U/ t: k. `1 E' p/ M
@.Destination := void;7 @% Q1 Q6 H2 f( W
if @.occupied then
9 V& {1 R2 c2 N) v& w6 m" Z part := @.cont;
. A; G3 h4 K, [( a2 F- r+ L @.transpOrder := void;
2 o& u) W' o( u4 l% R1 ]4 e* ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ e; h+ ] D: @- c+ \
@,root.eventcontroller.simTime);" X$ M$ X3 j1 {1 Z
@.HasOrder := false;" k; Y9 [& ]; B, e% L# r2 z) Q
@.DrivingHome := true;4 O3 s& X5 z! M
rgManager.tryToStartTransOrder;
' X4 @$ C% y0 F/ A0 d8 o9 w/ \ if @.Destination = void$ c' U8 p+ D5 b2 w R* q
then -- no transport order for vehicle @
/ j* C9 Q; j0 u- ^ @.Destination :=
$ p- I* A+ D& M5 c3 G rgManager.nearestFreeStation(@,track.~);& [2 [) x' y% ~2 A
newDirection(@);
' p5 C! k6 p3 g7 j# i if @.Destination /= void then
. E; x. E ~3 v3 Y+ c/ l t @.Destination.NumReservation :=
/ m' J; o7 j: K7 G @.Destination.NumReservation + 1;
, c' B" z5 O( A$ ]* @5 @' m" x end;3 t# W9 T1 M# X
@.CurrIcon := "drivingHome";
: n) n5 F, L2 q6 U, W* U' Q% J @.DrivingHome := true;6 j4 u. i( f$ a6 I
end;" p4 G# O. j* u
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 w! j+ C' H E* e. p! c. g% O
part := @.transpOrder;
2 T& ]- t, [' V2 ]1 C$ H2 Z part.move(@);-- load part2 \* H# G! ?8 ?2 x( u" X
@.CurrIcon := "load";. {( Y( X5 H- {3 Q$ ~. w
GlobalDistObj := part.globDestination;
, o! K& H, m+ v n4 A# {- e! F assignLObj := rgmanager.rgAssignL;, X% a) H$ a* D4 l2 L0 l& a
row := assignLObj.getRowNo(GlobalDistObj);" w' w( M D6 f' c9 E/ h6 r, D
if Row = -1 then -- since 700 @# h# H Q3 v! C: \
if lan=1 then# A" d$ Y& M% F8 i
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# j! I$ g' D4 S! x5 X) [, `+ f to_str("in der Andockstation: \"",?.~.name,"\""));
; @. g4 {% A) [# @1 p7 r else6 c, O/ e) p7 h+ t; p" n: ?) E$ }9 u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 f" T1 P) X) d
to_str("in docking station: \"",?.~.name,"\""));
' L2 q1 F( E" R! M end;! ]2 m/ F; H( g* V1 ^+ a
else$ l% g& n- f6 E9 P. Z/ O$ m. ~
@.Destination := assignLObj[1,row];8 [! h' o/ o( U, P. W, w$ z
end;
+ m) b% \3 W6 X! r. s0 f% j% b7 p newDirection(@);
5 m: `& k j& S, k; A9 G# v0 ` @.HasOrder := true;
7 d# e% r- M# H- P( G1 f end;' F8 }1 I* n1 M9 W! u
end;
+ x" W4 b9 U2 Y7 ]# L8 X* t7 V0 nend; -- of the method- m& q8 |- Y: }/ t" ?& b& w
|