/* called by: entrance ctrl of the object 'track'+ L- L6 J, B8 P! Z5 B+ a
*/
3 _ A+ L- H& b9 {) w7 Q: fis
% V, ?$ S `, [ ? [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' c2 z) S/ P" ~" L% P. Xdo5 B( n1 c! M1 a5 N) R7 q
Lan := rootfolder.Internal.Tools.AOLlanguage;4 y% n! q( F- v" v$ |: M% @" G
if current = @.Destination -- else return
) K. `% n: f" d# f7 y then
D" r( T) u* ^ @.Destination := void;
% G' y5 k/ w8 [8 P if @.occupied then# X6 G( y6 r' n2 \+ W
part := @.cont;
8 j- o; ` j8 g H @.transpOrder := void;
) R# p4 f1 Q% @7 q" `1 u- w) ?9 d! B5 M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" ^% R# }+ w& ? @,root.eventcontroller.simTime);; `* z6 G3 b! t1 ?; T1 d9 d
@.HasOrder := false;
& V0 M0 @8 M! w) h r+ V. y+ B( V& |! Y @.DrivingHome := true;
/ Z! {4 r ~3 z( J1 I8 T rgManager.tryToStartTransOrder;; q8 Q! a" J) E1 Z$ @
if @.Destination = void) ]. t8 g( M1 |8 L0 n) E- T" d
then -- no transport order for vehicle @
9 }& T6 L* M4 L) a* \2 W" H' A @.Destination :=
: ~3 O- C4 c& _6 t; L rgManager.nearestFreeStation(@,track.~);- l1 o8 H( p. R
newDirection(@); ' B/ r/ Q9 ?9 s/ E' ]6 b
if @.Destination /= void then2 W! b* l! t: c8 e' F4 H% |5 z% E
@.Destination.NumReservation :=
$ K+ T9 U! ^. |& c" p8 o2 U9 H9 @ @.Destination.NumReservation + 1;, V" g! C( S6 e/ }6 H9 D4 t
end;! x5 X& |3 q! @- |5 p5 N( G: E. g
@.CurrIcon := "drivingHome";/ A5 @3 e9 {1 Y
@.DrivingHome := true;
7 m4 n! H' [6 o! H7 F end;# o; e, @4 W0 ]4 x; X, u" X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 Y/ r9 U) S9 |, D- h+ n
part := @.transpOrder;
+ |% E( T) D; `+ p& W w part.move(@);-- load part9 ~- _/ Y3 z% P2 \. {7 }& a
@.CurrIcon := "load";
7 X6 e# S$ |6 } GlobalDistObj := part.globDestination;0 d& G2 A6 Q7 ~ v9 L
assignLObj := rgmanager.rgAssignL;
5 x3 I2 b' C- T row := assignLObj.getRowNo(GlobalDistObj);1 q5 V2 N" `- r! S2 D
if Row = -1 then -- since 70
6 f7 N' ?( n6 O& Y2 V: { if lan=1 then
8 H2 m' y; r( E# R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 X* i7 A8 f6 ?9 d7 ? to_str("in der Andockstation: \"",?.~.name,"\""));$ |, ]- G5 l5 r8 j& @0 l
else
( m* T7 E* C m$ E; X) z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ }+ o+ i7 H8 P- G0 A8 \9 o5 J; A* m6 S to_str("in docking station: \"",?.~.name,"\""));
3 [! I3 x' G; N% g" b end;
, a! s% t/ H) w3 q7 @ else1 _9 V Y- R7 P7 z0 B
@.Destination := assignLObj[1,row];$ a" q7 w% c: O' m- f$ I
end; 9 D+ j# X) w0 j/ o5 [2 s
newDirection(@); s+ b/ |/ n1 u# Y4 M0 \. P/ `
@.HasOrder := true;& J+ `1 N; d6 p* c- _& t' a
end;
; k W/ I x& w7 q* ~1 a0 l end;3 p) y7 T' k. V4 F
end; -- of the method% q# G' j1 ?" D; D1 }2 C
|