/* called by: entrance ctrl of the object 'track'
: A) X2 ], R, b6 ^% N*/2 H3 @# I- L5 A: _/ ~
is
* A4 V A' w9 y4 X8 r @1 k0 _2 V part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ o6 i; [; M& o8 N
do w2 z9 Q$ m8 b
Lan := rootfolder.Internal.Tools.AOLlanguage;' u2 S6 s5 W% \
if current = @.Destination -- else return( O9 u! M* n4 `) k4 M9 ]
then' s+ E7 ^ J/ e* A
@.Destination := void;
; t: A( V5 w, A+ X% ^2 i& D if @.occupied then
' {! @1 H* x( p9 j part := @.cont;
: q+ ]% U; p' O V5 u ^ @.transpOrder := void;
. c1 e! y& G1 X) S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) o# y/ ^3 Q+ g7 V( `
@,root.eventcontroller.simTime);/ X* h: R% d8 i! g5 m
@.HasOrder := false;
" F! Y1 z1 T$ k$ ^9 k @.DrivingHome := true;
2 T+ c. j3 U+ f# k. `6 C1 H rgManager.tryToStartTransOrder;2 f* c( U, M/ T/ D( h
if @.Destination = void; n5 L# Q3 P" S, B. @/ v4 w
then -- no transport order for vehicle @
X4 T: n) x2 g) Y4 V @.Destination :=4 L- K( K0 Q2 e2 q" h4 z( d
rgManager.nearestFreeStation(@,track.~);8 {6 c; e+ ^0 E
newDirection(@);
3 r+ X0 a) c g! w# ~ if @.Destination /= void then1 W* \$ k$ W, Q' K( i; s+ b; e( q
@.Destination.NumReservation :=6 L! E5 d& w% L6 K0 K
@.Destination.NumReservation + 1;
1 h3 R9 A! @( g, e5 R( H4 M$ v end; b+ g9 I( q) q E
@.CurrIcon := "drivingHome";
; [+ N8 u2 a& B# I0 x0 r8 l; t4 S+ y @.DrivingHome := true;
' J9 z" S! D p" v1 k C( O+ B. s end;/ l% v3 k4 W& [: J; I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) h' k& P, F! S+ C part := @.transpOrder;
$ [# T2 a0 ^3 n( g; q3 N; g7 w: s part.move(@);-- load part+ Y/ y" d* d2 I8 R3 P0 H
@.CurrIcon := "load";: ^* Y$ g4 d5 d
GlobalDistObj := part.globDestination;
. g- ~; N" K+ G; m/ C' {/ r+ H assignLObj := rgmanager.rgAssignL;
( ^' A8 F# }* Z3 i T) [/ G4 h row := assignLObj.getRowNo(GlobalDistObj);1 \. {. _. G1 e* P
if Row = -1 then -- since 70
. b f( P6 ?' ]: z; G if lan=1 then) y" _1 C3 D+ [4 r4 a$ m, ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% u! [; \. k8 c7 E: a) z/ W
to_str("in der Andockstation: \"",?.~.name,"\""));
' |+ ~5 B' D9 \; s9 ~7 S0 R% a4 ] else$ u$ H# s+ [7 m& @5 g( E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! R. ?# ~( L# T% E+ C
to_str("in docking station: \"",?.~.name,"\""));
# Z) u9 D& Y9 A; p% V2 ?- s7 Z" t end;
1 w: {* n) `( j% O; d else
- [4 ?7 A; Q7 _5 ^ @.Destination := assignLObj[1,row];
# @: B6 O: |3 K end;
5 j# Q1 }9 r/ D1 t$ T8 }! \6 d newDirection(@);
' C4 w% m( J1 g @.HasOrder := true;. b+ {4 P3 ?$ {
end;& {- \# u- r& U \ e0 ]$ Y
end;
. V3 A4 R( K; O/ K; A& N' jend; -- of the method3 f/ C$ W6 D% C; h e- Y7 Y
|