/* called by: entrance ctrl of the object 'track'+ r E/ h# H% m' q7 c) K7 s
*/
" m! R% k1 ]- }9 Y! J% L; I* f kis
+ ?5 n4 X9 p& j: b3 B part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 i; r) j4 n' t/ ^) _
do
, O& t' u: W# C5 u5 s) \$ w) K$ p Lan := rootfolder.Internal.Tools.AOLlanguage;
, E: T* n& r+ i5 e: k/ o if current = @.Destination -- else return6 v' a3 O' q0 Q( o8 w" H- M1 {
then
2 k1 V& n/ x4 v) K, Z @.Destination := void;
: K8 b W' l' Z h if @.occupied then
' e, ~- n6 P" E, w part := @.cont;. ^$ P6 x/ B& L& t
@.transpOrder := void;
, p) v7 ]* @8 ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: B/ j% k. \2 v( {. f
@,root.eventcontroller.simTime);
1 u( b5 ?0 l+ Z @.HasOrder := false;) c+ ~$ i' J) C# C0 A) L
@.DrivingHome := true;+ X4 y; u% E t$ s j
rgManager.tryToStartTransOrder;
5 d( _+ k6 l7 r- E3 q if @.Destination = void
' o7 f8 e4 L5 D+ K* ~ then -- no transport order for vehicle @# m& B2 V0 Y6 E4 A" G
@.Destination :=% D9 S5 b/ \/ |
rgManager.nearestFreeStation(@,track.~);
3 R, w% A" ~+ J( ^ newDirection(@); $ x6 F8 t& Z" l! h" l0 [
if @.Destination /= void then8 k5 Q R( o# [8 K! ~
@.Destination.NumReservation :=
4 b1 w; ]8 o' f: f8 m4 L$ r6 X @.Destination.NumReservation + 1; v2 _7 {3 N( g7 u" Z
end;& G3 Q: r$ x9 ~) ^* u
@.CurrIcon := "drivingHome";: N+ ~4 T% |7 T+ P3 h& B8 o
@.DrivingHome := true;9 v* _* J! j: G1 u4 u' h. W3 T: M
end;% ?2 ]9 p% ?7 y9 o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 Y% H) A: Y1 X part := @.transpOrder;. f* }: ]" L6 U; U: @, I( w
part.move(@);-- load part
6 B. r4 h* S: o2 _# G6 d @.CurrIcon := "load";
* a5 G! B' B+ K; \ GlobalDistObj := part.globDestination;2 T$ i3 T3 {7 y I
assignLObj := rgmanager.rgAssignL;
- V7 b8 M+ K1 e row := assignLObj.getRowNo(GlobalDistObj);
z+ e1 c: @ f) M8 E if Row = -1 then -- since 70
* |1 b7 W0 a2 f, f6 ` if lan=1 then) T# [: u: H2 v9 c: ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' T* H) J; R% o) w! [' `$ U+ J8 ^. R R to_str("in der Andockstation: \"",?.~.name,"\""));
; p- A$ D1 W8 y) n* a1 O; A6 L else2 t6 D2 T+ i' t$ L
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 r+ ^3 j8 [. N2 R$ q3 c2 S' a
to_str("in docking station: \"",?.~.name,"\""));
3 p/ v3 q7 A' m/ ?' J. q# N% G2 P- o end;
8 J# E5 n. P3 s; @. G else8 v! V3 x. I8 p9 J6 P+ K/ I
@.Destination := assignLObj[1,row];) f, F( ]5 B% ^$ u
end;
: M0 Q* [% L# E3 s newDirection(@);
4 S" p, N8 c; n K9 n8 ^" h @.HasOrder := true;) q8 N+ L1 M" O& {& {7 n* k
end;# N+ z( `; Q+ q( Q4 [" D s" d" k
end;
& L! y# w- m0 R: v m6 pend; -- of the method
1 l" \ B& U0 t |