/* called by: entrance ctrl of the object 'track'
8 m0 c- \5 ~! I: d. w- r9 X1 ~* I*/3 c, A& [7 V; ^
is1 R$ M; H( Z& H9 a: X5 m+ A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* m6 r3 C: t. Z0 B
do
# r" @# F$ g; v8 q/ r Lan := rootfolder.Internal.Tools.AOLlanguage;
# x' o- H4 R- @( n7 J) ~* W; K+ s2 j9 f if current = @.Destination -- else return( C5 o$ c9 Y& ?1 Z
then
5 ]$ ] j7 F. h. H- ]+ Q T @.Destination := void;
3 N( e6 F8 Y, Q# i if @.occupied then1 A: |5 A' w3 Q* p' d6 W
part := @.cont;3 [2 k! ^& t M2 {& A8 q; K
@.transpOrder := void;! {$ a8 O- q. }) o0 T0 z+ ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 L- d9 l; A! J' s: \; ~
@,root.eventcontroller.simTime);
% V' z' b( c9 N5 y- f9 U! Q6 M @.HasOrder := false;
4 T# s7 u9 X8 m% j Y# r. i @.DrivingHome := true;
) B5 j; u- i6 G- m& A rgManager.tryToStartTransOrder;; ]9 D) I0 L3 Q$ S, a
if @.Destination = void
! i, P3 I3 Y1 C) O0 ~) A then -- no transport order for vehicle @
" }/ \" n* I1 ^ @.Destination :=
8 |; G) i% e4 O) j7 X" y( y. {9 _2 H" W Z rgManager.nearestFreeStation(@,track.~);4 l: Y- m+ o3 p1 _ y! X
newDirection(@); 0 R' A5 ]/ n: B
if @.Destination /= void then* ?! M n% G) g+ r
@.Destination.NumReservation :=% d: s Y( `, v. ~7 R4 n
@.Destination.NumReservation + 1;
- `2 r0 d( W( d end;' v! l7 S, f/ ]8 ~) y+ f" p$ X" I
@.CurrIcon := "drivingHome";6 V& }4 q) z: b; j5 t
@.DrivingHome := true;
0 O1 X- H% ^1 J end;3 e4 X% c4 {6 A
else -- the vehicle @ is empty, both vehicle and part are in the same dock station# }& W: L* f& E0 d0 O/ r
part := @.transpOrder;
" Y6 I( J1 ?- |3 } T) k( {/ Q part.move(@);-- load part U3 M6 d" A% L9 v
@.CurrIcon := "load";0 V% N- U! T9 i( ~2 f4 |5 x
GlobalDistObj := part.globDestination;
`+ S8 `- m0 V& \- W0 L, Y assignLObj := rgmanager.rgAssignL;/ U- Z2 \$ H7 Q$ R) H; ?
row := assignLObj.getRowNo(GlobalDistObj);
( h9 k0 e% U4 f* L9 X4 ]: o if Row = -1 then -- since 705 _/ V" {$ h, l J/ m+ z
if lan=1 then- v6 n: T4 ~) v5 a8 h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; o% o; T0 S s6 q5 X
to_str("in der Andockstation: \"",?.~.name,"\""));
! J$ r( X3 ~) o0 C2 t9 _ else. J* G: p$ o( @8 v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 |3 h) L: N2 _% Q& q2 h to_str("in docking station: \"",?.~.name,"\""));
" z ~2 ]( l- M' t: s" M, j end;
1 o7 [6 M% ~* U- ?6 B else+ s( y: c$ q6 h# Z
@.Destination := assignLObj[1,row];
) k6 a5 k5 B v2 Q7 q end; - Y$ i( R& o x. N; `
newDirection(@);
7 G5 t2 h" _' z' p5 b; K+ n @.HasOrder := true;% P) Z& j# e2 p& j# }7 t
end;
: Z' M7 g1 L( F3 g* J! o end;
( _5 D3 U0 M$ M. G6 w+ x1 cend; -- of the method
" [' ~9 h! X1 v |