/* called by: entrance ctrl of the object 'track'
- a6 y. J! ~$ [* c- c( U! S5 M*/
. W: p; D4 `. V4 q, B* lis
" Q. e5 S. |/ F9 K9 [7 D' u part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ h2 z- l/ g7 V# d2 v
do$ B4 o! k9 {. ~1 h- I, r/ D7 D
Lan := rootfolder.Internal.Tools.AOLlanguage;
) N, o: Z; F! J4 I( t9 | if current = @.Destination -- else return
0 B+ X1 V! W4 D8 R. E then( Q( W, b5 m) V" E7 j
@.Destination := void;
/ L4 W9 U/ ?, E0 U5 V! [8 W if @.occupied then
- C z4 z2 N" B& V part := @.cont;
! R1 h# [) G/ @8 P @.transpOrder := void;
1 K) Q$ {9 Z8 O; H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, l( _2 r- C$ ^$ V( A/ H# |
@,root.eventcontroller.simTime);
r+ m8 M6 l& W @.HasOrder := false;
- P2 T/ Q# e. a @.DrivingHome := true;/ e+ e( ^2 _: ~# p w
rgManager.tryToStartTransOrder;
, G0 t3 G2 N8 I( w$ {% K$ G if @.Destination = void, l4 S( g! j% D1 w7 ]4 L5 }& J
then -- no transport order for vehicle @2 o. ?/ `# f2 c# P0 g0 J/ g
@.Destination :=
* E+ N+ q3 ?# p; ^( g4 a: G: P rgManager.nearestFreeStation(@,track.~);
6 L6 Y- _6 W" A7 V# x newDirection(@);
$ q. ?" Z( e1 \ if @.Destination /= void then; g7 `8 w! T& G& A0 g9 e4 h" X
@.Destination.NumReservation :=
8 L8 ~0 y# z6 |2 s1 j+ m0 ^7 ? @.Destination.NumReservation + 1;
& k8 W) k; G- M- J3 M end;
) h- N& r7 U2 T7 s6 z @.CurrIcon := "drivingHome";- l8 G- O$ L7 ]4 r+ Z9 M7 o" @
@.DrivingHome := true;9 h5 [1 _% N6 X/ h6 m; M
end;
& l' A/ W# h$ G |% Y: W0 x$ l: N else -- the vehicle @ is empty, both vehicle and part are in the same dock station* P/ r( ` @/ ]' |
part := @.transpOrder;: E" U' d! u" ^5 p% C+ L
part.move(@);-- load part
Y. i0 D9 S4 z7 r @.CurrIcon := "load";
6 H* a m- H6 f0 d8 m8 p GlobalDistObj := part.globDestination;
; h7 n' G5 q, Y5 L* s5 Z assignLObj := rgmanager.rgAssignL;: f" d- S9 J: B- p( c. P
row := assignLObj.getRowNo(GlobalDistObj);
$ m8 K) k% q1 ?7 G5 [) {: A if Row = -1 then -- since 70
1 t8 A( x3 N( Y! `; n if lan=1 then
+ r; P* B- f, f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: [! _1 K% `( | to_str("in der Andockstation: \"",?.~.name,"\""));9 }) b1 w2 L; h& R% o* O, B& H
else
9 u6 W+ M- D- P7 ~+ E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ k) q7 n2 P% ?- j2 |1 i5 j
to_str("in docking station: \"",?.~.name,"\""));
# w; e/ E& _- ^4 Y end;, r# a" J5 d9 h6 \& ~+ v" D" I
else. q" L7 g4 t: w: ?% J
@.Destination := assignLObj[1,row];
& ^- X C6 {) B: h: j) y( \) S% q2 s end; 9 t h6 C, H9 i+ N
newDirection(@);
1 Z5 I, o. u6 n' l @.HasOrder := true;0 s( m- a% y( z* S" J
end;" g; E" A$ G9 E( d, r1 F1 X2 K" }
end;
3 J2 y; ]8 _; w; I- e; T4 P/ J) h6 E" bend; -- of the method
4 E, ]: r7 J, b7 ?8 ^! w- b |