/* called by: entrance ctrl of the object 'track'7 g7 d1 V6 F: I% Z
*/$ R" W. b3 {1 v1 _
is# v; ^; z& d: ~( _! V
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' t) L6 x$ }/ ^2 d! ~: ]2 edo* X3 ]! Z4 W8 I, ~$ x* Z9 d
Lan := rootfolder.Internal.Tools.AOLlanguage;- S$ e( O4 @9 \* D4 l7 U
if current = @.Destination -- else return
2 @$ m- [2 m* n: k e. ?0 {$ f then+ l6 ]( F# P$ j: i/ W0 d0 A, m
@.Destination := void;
' i' V/ O$ U5 r7 w& c if @.occupied then: i1 G7 V9 W1 U; ~& a
part := @.cont;' ^( W. X( E& V3 s! }5 \8 r! o
@.transpOrder := void;( W N, t9 r5 i) q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. v) ?5 j$ l" k9 E6 n# T
@,root.eventcontroller.simTime);
% b$ [; {+ W H# Z! Z0 D @.HasOrder := false;
) ?/ W) z5 ~, [% ~( C+ j @.DrivingHome := true;
' q; L% D* F5 Q L+ m! U rgManager.tryToStartTransOrder;/ ^5 g' d( _0 w0 C
if @.Destination = void! v) o B& t3 t1 y- Z
then -- no transport order for vehicle @
2 Y+ }9 q' }4 O) j6 e @.Destination :=) V# v1 Y% n7 B5 o
rgManager.nearestFreeStation(@,track.~);
1 Q/ s- w" J% K8 V- E" \9 \ newDirection(@); " g( g: c" k( r
if @.Destination /= void then8 f" `- f! P0 B% i% g) K
@.Destination.NumReservation :=" B" a+ B ]; z, C
@.Destination.NumReservation + 1;# B ?6 u! Z P3 k2 ~
end; y3 ^! m2 u# f$ q% y$ L b
@.CurrIcon := "drivingHome";
) Y$ j' l- ^9 e/ ?* } @.DrivingHome := true;
% ]4 K- T3 w% O end;0 D5 A% m1 d% ?1 M8 `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' L6 L: ]/ ~0 Q1 ~* s5 C# {
part := @.transpOrder; C* k8 y; X3 ]2 n7 h
part.move(@);-- load part
3 i8 _% f- {4 L" `4 ^- L% y d4 l @.CurrIcon := "load";
, e- o3 E/ G0 o- @: L9 ]3 ` GlobalDistObj := part.globDestination;
5 `. k. T. c6 o4 D3 a1 h assignLObj := rgmanager.rgAssignL;$ w) o' B& {. y6 Z4 O/ N2 J2 N
row := assignLObj.getRowNo(GlobalDistObj);
. |9 G, _: n9 T6 i% }# S; I if Row = -1 then -- since 70
9 a* r+ y5 J2 N$ R0 l8 {8 D% T; w t if lan=1 then
2 Z! a. k( V4 w8 T r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! T5 ^6 b7 \ s6 C, ~. }( { to_str("in der Andockstation: \"",?.~.name,"\""));, [" k% F) C0 m: |5 H! |! b1 [
else5 Y; ]/ J/ Q& {. s% `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' t0 X' p. i) ~& g! W to_str("in docking station: \"",?.~.name,"\"")); ) ^7 N0 r/ W- r2 A8 Y2 \* ]
end;
9 y a7 K% P+ x$ N else0 v; k2 u: I! {: H% k+ t9 h2 v
@.Destination := assignLObj[1,row];) ?" h2 ?% ]6 P( ]
end;
& q- m) {: w' A1 L& q5 B newDirection(@);( o, O, L) i# L- \
@.HasOrder := true;2 n; }1 b+ K: M; U8 w7 o- E. D5 Y
end;' q, d8 T: P4 `0 s. A: [9 F3 V
end;7 `9 @4 e+ U# h( f, g% |8 V; m
end; -- of the method6 F3 W2 ?% {! @! s# m, w
|