/* called by: entrance ctrl of the object 'track'
7 y/ R7 P7 @( b( N7 _*/8 k& L5 B6 D+ c$ c+ n& t- l
is/ @) K7 _8 I+ O- Q4 p8 S c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( i' I( N* L v9 }3 a( z, H5 Q
do$ K; L& p Y: c6 w: W& Z, s4 h# x
Lan := rootfolder.Internal.Tools.AOLlanguage;% d* G( Q- p4 O3 g
if current = @.Destination -- else return0 [8 n; N; y. {1 ^/ b
then
# v; R4 P# h% I9 u5 ^ @.Destination := void;) z5 W* Q( I6 h2 Q
if @.occupied then- \' C: {6 T/ O" ?9 z
part := @.cont;
' h( V& S- x7 B4 }0 {2 t @.transpOrder := void;
1 k# v* j& C( t& u; H# [ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) f* J: G$ }0 s6 l& D" v4 ^ @,root.eventcontroller.simTime);0 k3 b6 ~5 u: Y6 {2 ?! R
@.HasOrder := false;
5 ?# q: ~( s% H; f; o# {* d9 A1 S @.DrivingHome := true;5 P( A, t! q* X4 X# o' h( f6 _
rgManager.tryToStartTransOrder;% \5 A, Q- J# A
if @.Destination = void
& O) T% z, u2 N. F; d' d; u then -- no transport order for vehicle @
) B2 ^& a: } \0 f @.Destination :=
2 X) Q0 S' |$ K* s; R& x rgManager.nearestFreeStation(@,track.~);
' Y( {' J7 \1 @; C0 S# M newDirection(@);
. b% }- h6 R( {; @8 q! l3 ^/ _+ N if @.Destination /= void then5 q' d8 K8 F# x/ ~+ a& a( W
@.Destination.NumReservation :=
3 n9 |/ j6 J, F8 G4 B @.Destination.NumReservation + 1;
8 u( C7 e3 x+ Z _$ p end;
: h. m; t& B4 X- _# d @.CurrIcon := "drivingHome";
( I$ [! c6 V1 I; R" A @.DrivingHome := true;
; d( @: @: i) l' Q6 ]& ` J* J end;
; c% P. w" N3 ]4 T8 F! l else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 J$ @1 S7 A2 g9 |6 i" X
part := @.transpOrder;
' |# B, Q- W$ e6 N- K part.move(@);-- load part
7 W0 J1 n' h" T, X% [! f' k: T7 w$ S @.CurrIcon := "load";4 U! H% ?7 C" s' ~0 `+ b
GlobalDistObj := part.globDestination;
; o/ x7 v" C1 n6 M5 _6 ] assignLObj := rgmanager.rgAssignL;
6 E6 Z2 ?% ~* a row := assignLObj.getRowNo(GlobalDistObj);
! e$ \: \, N2 g; M+ ?) R if Row = -1 then -- since 704 ]9 J8 u1 z5 i+ f$ u1 `
if lan=1 then
9 z3 Y% l p& W$ O0 Y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- l& C# e# u. r" m0 @$ ` X
to_str("in der Andockstation: \"",?.~.name,"\""));
' z, H7 |' } f U else& }. ^$ y: Y7 @& _/ ^; M8 h) I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 E5 e* n7 _# Q, U5 Y
to_str("in docking station: \"",?.~.name,"\"")); # }; f" F/ X+ X7 ?3 j
end;' J9 m: w4 k4 t n9 C
else
- |2 I: D3 [1 ]1 Z9 U6 A1 f6 L @.Destination := assignLObj[1,row];( c+ S2 P- D# V' h& c+ S5 H) V
end;
& j4 _& t/ \# H, ]! x5 ~7 w newDirection(@);
6 M1 @2 W" n& q, q6 v# o1 L @.HasOrder := true;
& `9 U5 }' j4 J6 N& \% P h end;- v2 O9 g( G# X: d l
end;
$ b& s$ S7 i! W& K5 ?/ V8 h% Zend; -- of the method7 _5 [: @/ A" L3 _0 q/ X9 v2 Q* t
|