/* called by: entrance ctrl of the object 'track'4 d7 A2 u4 h0 V' R
*/
' p8 ` J1 T6 i+ iis
. I- m. o0 f& ?& y& m) b part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 `4 W# E- z: ]1 O7 E: ]
do
) I. `' k# H/ M$ ^8 H0 ^& y Lan := rootfolder.Internal.Tools.AOLlanguage;
3 G; K8 m$ A$ F& C2 B! i3 R+ j4 x h if current = @.Destination -- else return+ ?: ?7 A* T4 R a$ j' [, A
then( D! j- j" p0 f; `
@.Destination := void;8 B* [- l& _ B" D
if @.occupied then
, H/ `5 v0 _4 v$ w, s/ G4 Q9 k part := @.cont;
; |8 V7 G- W5 D1 X2 c @.transpOrder := void;3 f8 }% R3 k! x, s1 |
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ _3 }$ ^) N" N' D$ z: \ @,root.eventcontroller.simTime);# g9 y8 q& j% m* j
@.HasOrder := false;
6 G* E% m+ E9 w+ K @.DrivingHome := true;
) T7 P- |1 L$ ^, P8 G+ F0 R rgManager.tryToStartTransOrder;* o/ Z, [6 E% |/ C I
if @.Destination = void1 Y8 B% T, ^- y8 \' x) j
then -- no transport order for vehicle @+ e9 C! \3 V! k$ t
@.Destination :=1 S; m) z0 s. x. h" y" [
rgManager.nearestFreeStation(@,track.~);3 R# S* d o3 p: q# A( ^
newDirection(@); % R" L- X. U. r; f4 f
if @.Destination /= void then
, H) A5 @! J9 d @.Destination.NumReservation :=& h0 f) `6 n& @: w* w; ^5 {
@.Destination.NumReservation + 1;- _9 ]6 U% _8 G/ M+ e# l7 J
end;
; z. J6 D( Y( k @.CurrIcon := "drivingHome";
7 ^1 ?. b# s/ E @.DrivingHome := true;* G! f1 }* c& f
end;
6 x. k, ~2 L# l" `+ \" N; s else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 o, k+ D* I& l* H9 z8 C* \ part := @.transpOrder;# ~1 w2 B% J: J, u5 i2 Q& j" ^! X
part.move(@);-- load part
L( s% S! |8 O$ t( j ~- Z @.CurrIcon := "load";1 \4 s% c7 e) E( y6 m- N' k( T
GlobalDistObj := part.globDestination;6 a& L5 |" q6 a* W
assignLObj := rgmanager.rgAssignL;5 I+ h) x' O d
row := assignLObj.getRowNo(GlobalDistObj);" Z# ]4 g# m; g5 k4 w6 {& C
if Row = -1 then -- since 70
2 U& G) _& h" O5 A' _+ Z4 V if lan=1 then
\/ j2 }4 U5 `5 g$ P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 o; K6 q5 u7 e
to_str("in der Andockstation: \"",?.~.name,"\""));0 E! U. ?! f$ I8 g J, l9 o
else, [2 y+ C8 d! p' R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 i. ^3 u9 h6 c" W6 Z/ o
to_str("in docking station: \"",?.~.name,"\"")); * {% C9 }* ]- |7 a! }0 u- R2 }( x
end;$ p% A. K0 s# ~ {( u! m
else, g7 S) K ~( T4 k* b
@.Destination := assignLObj[1,row];
2 @, y$ D! c1 B# ~ end; ' e& y z# t( c. D$ |
newDirection(@);
G' G" B y. E/ v @.HasOrder := true;
3 W! u+ n, O( V5 [2 t end;$ \! l, ~! S( U; x/ h: B
end;
" ~6 H# q/ ] v) U. c7 B! M1 K3 Jend; -- of the method: G( t! Z/ x4 z; p
|