/* called by: entrance ctrl of the object 'track'
! B' f* w: j+ _3 ?*/
: y, A, l, Y/ N* [3 a* B+ S1 Eis
! B; Y e. D o( Z0 O5 |8 r part, GlobalDistObj, assignLObj:object;row,Lan:integer;( O+ O8 S+ C0 y
do# _9 V7 E4 K5 R: k" u2 }
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ W" g6 \/ m: ]9 i if current = @.Destination -- else return
% m7 C2 }1 I+ f then+ ?2 M& }. w, }" O9 q0 Q6 f7 Y
@.Destination := void;. ~5 F3 r$ h* l
if @.occupied then
* B& b* I- o2 n2 ]8 |! K part := @.cont;: @( Q+ h4 e0 t3 M! q$ w
@.transpOrder := void;
% o- Y/ Z9 B# b$ ^; y, l5 {" } part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ g, I/ e8 L. T; o- \ @,root.eventcontroller.simTime);( p, _% l$ X- f: @! Z* p! u
@.HasOrder := false;' K- i& g- n" I* S+ w
@.DrivingHome := true;3 l' M! W2 P$ m1 R# U
rgManager.tryToStartTransOrder;
! e- V8 V: i0 b0 p& D if @.Destination = void
, E+ ?2 j, M# ]4 O6 n7 } then -- no transport order for vehicle @
+ I% `+ {9 i- \8 e- L @.Destination :=# z0 }. l+ H: k. p
rgManager.nearestFreeStation(@,track.~);
' R$ l+ d5 Z% } newDirection(@);
4 }7 H9 q! Q/ l/ c; u( H if @.Destination /= void then
5 O Z f. }4 ^/ p @.Destination.NumReservation :=2 i6 ]- v8 G6 M$ g5 ^2 n+ M
@.Destination.NumReservation + 1;
% \, ?" Y% e- p end;$ v7 o( m1 O2 G2 J# w
@.CurrIcon := "drivingHome";# x% H; N! f8 K& }+ V0 l
@.DrivingHome := true;
! m# e2 K# M9 Y/ n& A8 s( [8 x end;
% J2 `9 w2 f3 f6 D( n$ O1 i else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- ^0 m8 K: R _ part := @.transpOrder;! k9 I1 {3 _& q- S# N
part.move(@);-- load part
( s: j: y# c3 m5 r2 V4 w8 | @.CurrIcon := "load";
. |0 `/ e: w. P$ E+ X2 K" Z7 F GlobalDistObj := part.globDestination;* {/ a. f2 l5 W5 e9 }# N
assignLObj := rgmanager.rgAssignL;+ q* d- s; Z9 m3 `
row := assignLObj.getRowNo(GlobalDistObj);) }0 i; g2 w1 t T5 Y9 n$ U
if Row = -1 then -- since 70: q }, l T# g% z
if lan=1 then; L* b9 Z$ n6 d$ u& \; t/ f- j% k( F2 a
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) A i) |# l" v- @- x5 E
to_str("in der Andockstation: \"",?.~.name,"\""));4 ?) j' G* J6 E5 Y6 m- W5 I
else0 a! c9 \7 s3 D/ \$ c. X7 I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 o: [3 Z7 f: X: H( U$ i
to_str("in docking station: \"",?.~.name,"\""));
% m/ o$ ]/ r' x: i! P/ ^ end;
6 \: j0 ?: t5 K else* t" m& c4 g) e* N9 G& B
@.Destination := assignLObj[1,row];
( i+ I$ X' k- n end; 6 P( k1 E7 z% I+ w2 o2 ^
newDirection(@);
* B4 s9 y1 ?4 _1 R! a& Y @.HasOrder := true;! ~( Q! N- M7 s3 Y- S; s8 ~
end;
* \0 U& F( a8 S5 Q [ A end;% D; n4 |6 Q7 @ j2 S
end; -- of the method1 y7 d* H' r% o& Z4 f
|