/* called by: entrance ctrl of the object 'track'+ Y, G5 ]4 v% ~$ K) D! _6 M: }
*/
7 h8 | L# M: g. T3 tis
8 C7 H; n) H. h part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ ?/ Q4 h. R1 d0 X8 U8 \' P( odo
9 K/ q4 h* Q* U1 v1 H6 j Lan := rootfolder.Internal.Tools.AOLlanguage;
1 r3 B# m9 H" n2 A+ w" `; o if current = @.Destination -- else return! v# v/ C3 p" ]) i
then$ q. G: y' j4 t. W6 R- Y0 t) ]% x
@.Destination := void;6 a5 m" N+ y4 V4 T
if @.occupied then
7 w; U$ _ c! {3 t4 T! k part := @.cont;3 y5 ~+ I& C" |
@.transpOrder := void;
, [$ C" g! F9 C, p1 H; X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 X; Q6 C8 V1 ~0 ^3 O$ y$ P @,root.eventcontroller.simTime);& G8 }$ q7 H- ^- S. ?
@.HasOrder := false;) W e m- j& v9 k1 m
@.DrivingHome := true;/ F% Q4 ^4 J1 v" i
rgManager.tryToStartTransOrder;7 x/ ?1 B+ T9 \$ Q% r$ R j
if @.Destination = void
. Y' K s( a5 t, t$ F; h% V then -- no transport order for vehicle @# r% x+ ]/ c& H f4 n
@.Destination :=; t* L) t* a- T" N
rgManager.nearestFreeStation(@,track.~);
: o% o @1 ^* S& a2 m newDirection(@); ) s$ v5 `# L/ e6 ~7 U+ p4 U
if @.Destination /= void then* _& }" ~- b5 ]6 k. Q3 h2 R5 c' _
@.Destination.NumReservation :=% ?/ y5 E4 p9 |7 B% d2 ~
@.Destination.NumReservation + 1;# s& U# V# i; b6 A: I+ ?
end;3 ~. w8 K$ \ _2 D4 {* d# V
@.CurrIcon := "drivingHome";1 Y$ m0 ~8 R5 }8 q
@.DrivingHome := true;
3 Z9 J, }2 P. j; J5 P end;; |& E- E0 t0 E3 N: {( ^
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 D0 e! J0 T9 R6 \- @# t part := @.transpOrder;
# w. B3 P& s0 t0 [8 @! l/ E part.move(@);-- load part
; u$ I6 }" B, |" \( ^, w, \ @.CurrIcon := "load";
. T/ O7 t/ `, k( s' z: a) K& B4 m7 O GlobalDistObj := part.globDestination;
$ h! S' z0 f( ?& a$ F j/ z assignLObj := rgmanager.rgAssignL;
0 ~/ ^6 H) c/ ~ row := assignLObj.getRowNo(GlobalDistObj);( u5 e2 _6 V) X# l, Y) @2 S, Q
if Row = -1 then -- since 70
! s: v9 u0 \* |6 e8 |2 z if lan=1 then
! G, v3 @# E V6 p X8 W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( |0 K0 O2 S, z1 O to_str("in der Andockstation: \"",?.~.name,"\""));4 q d# A& t- U+ S$ b0 e3 l
else
# v8 C- D( X" |+ H( G( \ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 O0 M2 T1 J6 C( S; {3 M
to_str("in docking station: \"",?.~.name,"\""));
, ]- |8 @0 {* F, `8 z end;
7 `& W. @' [+ ?( O3 T9 B: n" y else2 A) }- n* t2 x2 Z _- S+ b/ W( H
@.Destination := assignLObj[1,row];: W, ? s' l% b( o
end;
0 _ Q# n; |" h E newDirection(@);
: b9 i, R& U' B @.HasOrder := true;$ g2 d( w& Y1 ]# v) O' q
end;9 }0 ~/ M+ l( m8 w! b9 [4 G
end;
! E, w% L8 o2 j) k' l" I s2 Kend; -- of the method! v% z5 g' r2 o3 a; m) k
|