/* called by: entrance ctrl of the object 'track'
2 f8 j* {/ n9 Z. T3 K*/0 o" t, v" A; S4 Z( K
is) n9 L0 R$ ~& E/ {3 D! M( _) U2 l
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. F6 y# P H b% V3 Y/ g
do& N6 X, ~( o( o- Y
Lan := rootfolder.Internal.Tools.AOLlanguage;) ]6 C& a8 }- U
if current = @.Destination -- else return! A& z1 Y3 X) G' ?! q/ A% v( n A
then5 z s, ^6 ]" a
@.Destination := void;
8 C: b4 i- N2 Y, ^2 ^1 Z% V2 | if @.occupied then
, }; D+ Q; Y9 e2 W0 x( A! H part := @.cont;( y/ `4 Y# T; J
@.transpOrder := void;% \9 ]1 l% Q# B* p5 f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 _- r( B4 P, \4 D% t( e( O" B( o @,root.eventcontroller.simTime);
% M+ T5 I: ^) K% D. r @.HasOrder := false;2 A; F7 F2 Y7 G4 P4 f- D
@.DrivingHome := true;
+ [5 N( B( p) r& ~; E rgManager.tryToStartTransOrder;
: Y; } X2 d% R4 Y. l I if @.Destination = void
- i" z' x# S! |# Z. {4 }4 x! I then -- no transport order for vehicle @) @+ P- q0 i) [5 q0 V1 c
@.Destination :=" h W/ P) J5 H; @" m0 ~1 x
rgManager.nearestFreeStation(@,track.~);
1 ^, P! k0 D8 h. q1 X newDirection(@); 4 D3 @3 s# F% ]
if @.Destination /= void then4 n2 U, Y* `4 o1 _1 S5 o
@.Destination.NumReservation :=
: _# Y' ]& A( Z9 G @.Destination.NumReservation + 1;
' a4 C9 D5 g0 i end;
2 j2 J- I( S; y7 z @.CurrIcon := "drivingHome";
$ q+ S: `8 _; F% O5 O1 t @.DrivingHome := true;8 e" C U3 |4 b) Q) j
end; _' m! F; A# P5 `5 q# Y& N7 m
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- Y3 V! T) s7 d/ g
part := @.transpOrder;
. l/ O5 ]; H& c) f5 x( n- {: L* S part.move(@);-- load part8 _, J8 B4 S2 N3 i
@.CurrIcon := "load";7 j7 h# g- O$ Z& h
GlobalDistObj := part.globDestination;
( a6 A; c/ d5 N9 B4 Q v assignLObj := rgmanager.rgAssignL;4 U0 @7 |5 c2 {! t
row := assignLObj.getRowNo(GlobalDistObj);
8 P+ U i/ C0 v5 Y7 L( S if Row = -1 then -- since 70
, f5 \$ I7 n; j! G if lan=1 then
* s& ?' o4 L" u8 j+ W, S3 z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' ~. }6 e6 R+ i$ q" z! w7 |
to_str("in der Andockstation: \"",?.~.name,"\""));
- e0 H/ c. l( {( ] else
! Q8 q/ e/ e: Y8 N7 y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- ^/ c7 H( u' D5 r r' e" U/ ` to_str("in docking station: \"",?.~.name,"\"")); 2 N2 T# p- W& B( U( s
end;0 ~0 Q: }& R9 A% s' q( x
else
$ F" b* K7 |* w, X @.Destination := assignLObj[1,row];0 Y9 R, ]( [4 I+ A
end;
2 h: { l0 a% {$ B W$ G newDirection(@);5 \2 }4 z1 |$ f! p' ~4 a
@.HasOrder := true;/ ?# y3 ~/ J& A5 z
end;0 L U% z. t) u% a9 O! L% P
end;
c+ |7 D) R& M0 ~2 w6 Q7 \1 \end; -- of the method
/ D t9 }% d4 Q6 l' h; ] |