/* called by: entrance ctrl of the object 'track'
! q! m |7 x+ o1 n! j7 o*/' u" q6 m5 C2 Q5 T# t
is
2 ~1 S6 T3 F p' K: W. a part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 c2 i$ g' M" ^do
1 [( ^( n& e( _ ~' ~ Lan := rootfolder.Internal.Tools.AOLlanguage;# @( Y/ M; I3 w; ~8 D
if current = @.Destination -- else return0 L1 `8 ^0 _6 U6 @) U2 D
then
' m% U/ b2 Z& l6 F% M J @.Destination := void;
; V2 m% o. [0 m8 e3 B if @.occupied then9 N8 _" s- i6 K/ |8 r) g8 B; A* O
part := @.cont;
! J6 E9 L( w, }0 y4 L7 @" t @.transpOrder := void;: G9 G. M$ @' Z" L4 j/ b) `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ A8 q1 Y5 X+ \3 w& k n* @) |; ~9 G
@,root.eventcontroller.simTime);8 T$ c" ?" g) f+ E, u( j
@.HasOrder := false;
' `, \) r7 `5 E4 T0 c8 @5 b+ Z @.DrivingHome := true;
) z; G G* ]$ G# V; t$ T- d rgManager.tryToStartTransOrder;( F( _3 o1 p/ b
if @.Destination = void
7 k5 {5 V: w2 @. | J0 N4 @& F8 J then -- no transport order for vehicle @
+ l- A! P) u0 Z: B3 y. T! U: d1 h, o; o. H @.Destination :=
6 s1 s' y% ?% k( ^' @& x7 k rgManager.nearestFreeStation(@,track.~);+ p7 E2 K- K: Z2 W- f5 l
newDirection(@); 4 r- W* D! w" \' }
if @.Destination /= void then6 s. E: `0 L$ U! _
@.Destination.NumReservation :=1 X& n- @) d$ i5 o
@.Destination.NumReservation + 1;
' l# n' O$ D- n( V# i0 [ end;
+ s, @! c1 ~6 i, D" F) ] @.CurrIcon := "drivingHome";: ~4 E5 h6 j+ `* }* b* Y& S
@.DrivingHome := true;
; h* B; @% o! k: Q end;/ x, A/ W Q0 j: Q/ P# Q6 N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' w) c) M& v2 o
part := @.transpOrder;
* ]3 b! l+ X- q: Q. y0 a2 f part.move(@);-- load part& ~5 m4 S. t- W( p L
@.CurrIcon := "load";7 b0 }$ r4 K v9 W; x% i
GlobalDistObj := part.globDestination;" x" y7 ~! D: e7 m3 g, H
assignLObj := rgmanager.rgAssignL;7 Z2 {& \1 {3 p# |; B
row := assignLObj.getRowNo(GlobalDistObj);
3 c' ]+ B" d t8 O* _" \1 f if Row = -1 then -- since 70
o/ n, j" }+ g- A* {, l7 p. l if lan=1 then) g1 h3 k5 E" `* M
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* d$ k3 T/ g+ n2 r5 U
to_str("in der Andockstation: \"",?.~.name,"\""));, h% J3 B5 l0 j0 p* m. T* \
else. m+ I5 ]! O9 @; ]/ v9 P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) g/ A# n% r& D- X& `5 @# Z# [ to_str("in docking station: \"",?.~.name,"\"")); 0 {0 [; J1 j- ]7 s' c
end;
! Y" z/ ]: j! X( q6 ~" I else
- {, M; Y1 y0 k" [3 x# o @.Destination := assignLObj[1,row];
( z5 U6 z* L: B& `" t end;
6 A- D# \% P' n9 H6 u newDirection(@);
; [# c4 D% k, F6 Q @.HasOrder := true;
# b& _# e7 q: f% O& V end;$ E& [. R6 \: S* B& o3 p
end;) f0 c( j. Q0 y6 e4 d7 q
end; -- of the method9 e# H7 q4 T7 P* N. A
|