/* called by: entrance ctrl of the object 'track'* y- d$ w4 |4 r$ g
*/
3 z# \: T5 s4 l2 O" H2 Lis
# S5 ]+ p' M6 X& `3 ^& I$ ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;# l$ [) J; B6 v! y
do( B! m7 P( O, p( _2 B
Lan := rootfolder.Internal.Tools.AOLlanguage;
; Q) A+ c+ k+ U6 i$ {# O& Q- A$ C if current = @.Destination -- else return* q6 B9 Y+ |5 s2 v0 T6 `
then
1 p7 o5 A4 n% j0 ? V @.Destination := void;% {9 D0 b+ l Y4 H( @+ w
if @.occupied then
$ W0 A- L+ Z- p# D% h+ \ part := @.cont;
" E9 [+ v, ]* {& i" I @.transpOrder := void;" g8 k3 ^& x5 w1 Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( t" T0 s% e' A0 s- ?
@,root.eventcontroller.simTime);! @8 u0 \0 J) R9 t) N9 ^
@.HasOrder := false;
5 s0 |, I3 ]' d @.DrivingHome := true;/ j) t3 N! i) O& U) J
rgManager.tryToStartTransOrder;; X6 W# K1 _# e5 R/ [
if @.Destination = void
8 {' f' I/ ~% n) Q then -- no transport order for vehicle @" o) P- G, q8 {- I! u' N) G9 `
@.Destination :=
k) \3 ~! ~0 Z rgManager.nearestFreeStation(@,track.~);& |+ U9 l! j, F1 D
newDirection(@); # `: R1 E S4 |) x& M+ o
if @.Destination /= void then
. s M/ a- S% l0 x @.Destination.NumReservation :=9 D1 l: J' c \! g9 X1 K
@.Destination.NumReservation + 1;9 r; E; J4 y, `
end;
+ P( G" S. L. t4 j @.CurrIcon := "drivingHome";/ K8 |9 y5 G) r
@.DrivingHome := true;# e2 ]4 g1 x1 h% {0 ?" t; e2 h
end;
& c7 b F: M' I2 j9 Y1 e2 t else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 O' k) |! @. y0 _+ I' C
part := @.transpOrder;
6 \1 @- \5 p y& R, q" d" O part.move(@);-- load part0 _- }/ a) ?8 l
@.CurrIcon := "load";: J) T1 e' i; L
GlobalDistObj := part.globDestination;9 z2 d& s' j Q0 E& \+ w7 f
assignLObj := rgmanager.rgAssignL;
9 L M; E" Q8 h# y row := assignLObj.getRowNo(GlobalDistObj);! E1 t2 L5 L1 Z2 ^+ B# h& v
if Row = -1 then -- since 70
3 E' E- a+ z6 u0 I3 H+ d" m! h if lan=1 then4 q# W% X9 D8 l$ a( n& z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," p3 X/ b. r0 V- T. R
to_str("in der Andockstation: \"",?.~.name,"\""));* B2 r$ G/ c) U( u/ y; C& ]
else
, e2 s! M2 l" m4 O) P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 q( V+ P3 H# ]! e, D4 n9 q
to_str("in docking station: \"",?.~.name,"\""));
3 V4 Y# S) S/ X; `, \* M end;( m9 x9 Q- W2 @+ d% T+ z3 h
else/ j3 y5 q6 R; K- k
@.Destination := assignLObj[1,row];
6 y, D9 X: T+ X& E, y end; . K7 `( m/ x& s6 ?4 N+ n
newDirection(@);8 p2 D6 ^# B/ j/ W% w
@.HasOrder := true;
" u+ f2 u9 l8 X G+ M# \0 ^ end;' H/ z# y8 ~2 _. s8 v2 A* f
end;. r1 E1 T' u' i" [
end; -- of the method* U9 N) d/ _" Z8 U1 Y
|