/* called by: entrance ctrl of the object 'track'9 V4 M7 q: T, h2 M) @ |
*/
7 z1 P6 Q5 k6 _/ a( ~, |is& B. E! C5 L0 F ^. Y+ M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 y1 w2 S- J) ~6 F7 w" udo
. s. n2 q+ q" B1 @8 M Lan := rootfolder.Internal.Tools.AOLlanguage;
" _7 p# T+ c+ I, G& q9 ]3 o if current = @.Destination -- else return) ~( v) `. }0 R" D. b9 \
then
. _, L' [" s( r8 q1 L @.Destination := void;
0 S- x! Q! A( i( ^9 q G4 Z9 E if @.occupied then
+ A w2 Y C, T, d part := @.cont;
, |+ r x1 Z" |+ n7 h @.transpOrder := void;
. y* m M9 a" u: J5 ?; U5 G* i4 B8 M& j part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- \- z; N g1 j2 a
@,root.eventcontroller.simTime);
; S& n6 F' z' L# g- c7 Z @.HasOrder := false;
' f& @7 ^5 \ g% { @.DrivingHome := true;
9 @+ y2 G% w+ w7 ^8 E% s6 b rgManager.tryToStartTransOrder;4 B7 d6 `0 G! k8 w
if @.Destination = void' r+ c( X" T: C4 G/ l9 g5 [! m3 S
then -- no transport order for vehicle @: B, S+ T! w1 T+ ?9 e e; @
@.Destination :=4 \3 c' L. u: n- X) s* W
rgManager.nearestFreeStation(@,track.~);
* i9 P+ O) ~. y2 B newDirection(@);
0 p+ }& D- k6 a; S1 k- d if @.Destination /= void then5 ^9 ~2 d0 K M5 S3 X+ M2 s
@.Destination.NumReservation :=
+ |6 C: C7 @! t* k7 m* J @.Destination.NumReservation + 1;6 j; J4 f ?2 `6 ]5 \. o* N
end;9 h( b2 a% o6 O$ o( c' b
@.CurrIcon := "drivingHome";( a7 O% X% {8 C) G" s+ g! ~
@.DrivingHome := true;+ Q3 @1 p3 I- J$ x' v0 Y: w
end;
2 O: R* P* w5 i6 _8 }7 i- R else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ P# J: Z: Q7 I1 a6 s0 d: i
part := @.transpOrder;' Z, d: t* c' f
part.move(@);-- load part7 c0 W# M2 U5 a3 E
@.CurrIcon := "load";* U- a! t7 d9 e/ H" q4 D3 ]( v4 j( ]
GlobalDistObj := part.globDestination;
! P8 O& C% b6 l0 X8 e) {9 O assignLObj := rgmanager.rgAssignL;9 M3 T ~+ r$ v8 ]
row := assignLObj.getRowNo(GlobalDistObj);* z9 ?6 Z4 K) t* q/ K4 _' x% K3 J- ^
if Row = -1 then -- since 70
' w7 K# k1 J& F+ v if lan=1 then
( R/ K2 g, e; _/ Y/ a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- g2 Q/ a4 p# n+ H, o# v to_str("in der Andockstation: \"",?.~.name,"\""));
2 |5 J6 ^# p. V- b$ f: i else; a3 C, ]) p& I A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 X5 P& g5 b9 y3 F to_str("in docking station: \"",?.~.name,"\""));
: i# Q# {; W1 d+ _$ w end;
z1 h: `4 b7 } C else
" U; ]* r: r B @.Destination := assignLObj[1,row];
# l# v: _2 w- i% k+ S end; p2 q @0 X. ~" n
newDirection(@);
+ w8 N! t9 t) {+ W1 h) @& H" d @.HasOrder := true;! p( v5 ^2 c6 i8 y" Y6 D
end;3 a' [7 j0 T0 u; y: e. ]
end;
. X; |; W9 ]+ Z& r( g% S7 H! gend; -- of the method
# l- R8 E' c* D# t) ]% l |