/* called by: entrance ctrl of the object 'track'# |0 x6 n; G D& b- t/ B x, I
*/
; q( t' j; f! b, w* qis, ?3 |; T/ `1 c' t- M" m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- [# |. \; u5 T, ^" k1 `. s
do
: n, [ c4 ?3 J! R7 q' }1 f7 f Lan := rootfolder.Internal.Tools.AOLlanguage;
l, q( M/ W, C5 L R if current = @.Destination -- else return
1 J4 w% Q. @: {( {' o0 `$ u0 i+ E then, V9 P; |, Z/ O/ W5 Q
@.Destination := void;8 G o6 m' B3 l: ~% r& v
if @.occupied then
2 W3 q% U [$ _- G3 w0 S2 a7 g part := @.cont;+ X6 q3 ?7 e/ x
@.transpOrder := void;: s& N2 X& W" {, G g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, |/ h$ [& ?# P# C0 [6 p! I% `
@,root.eventcontroller.simTime);5 N h) G' r s
@.HasOrder := false;
4 I( A1 Z* } T5 L6 x2 h- x @.DrivingHome := true;+ g% W; W5 |3 C" D, I0 S! E
rgManager.tryToStartTransOrder;" u) v; `2 ~. H3 M
if @.Destination = void
8 v2 [9 I; L( o) N1 f; T/ u1 C then -- no transport order for vehicle @ K$ l E! s' v N( ~3 k
@.Destination :=8 x0 D Y3 e* Z6 e
rgManager.nearestFreeStation(@,track.~);7 R0 a0 a1 U4 C# |% _4 ]* H9 G* t
newDirection(@);
( s( b T$ \) R1 Y) J if @.Destination /= void then; O. S4 ]9 h, ~
@.Destination.NumReservation :=
9 w9 j& v) M, n @.Destination.NumReservation + 1;
0 s1 _7 t7 @- Z$ j7 ? end;
4 a; a4 p: n; R( i" v @.CurrIcon := "drivingHome";7 ?* W; \! u, G1 @/ `. [# j3 H
@.DrivingHome := true;
3 m! |1 }0 A0 E L; k" g end;
6 R4 Q6 D) N5 G8 E2 j- U8 s else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! Q- A: k. ]/ c! M2 c8 T( q part := @.transpOrder;
' `) I1 u) M! K- { part.move(@);-- load part
$ Q& D! `& H0 O' L( b/ } @.CurrIcon := "load";
{- T" ~# [4 i. w GlobalDistObj := part.globDestination;' y. N2 M8 k7 d
assignLObj := rgmanager.rgAssignL;4 O) g; q- X* R5 G4 N& p
row := assignLObj.getRowNo(GlobalDistObj);
# Z i( J6 g" ]4 Q$ z$ G6 p if Row = -1 then -- since 70& P. \7 P z+ P; E/ A4 H7 L
if lan=1 then
; D$ o5 H, N9 l" _4 v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), j# w6 D! C/ b3 b
to_str("in der Andockstation: \"",?.~.name,"\""));
" c! g Y f5 x) U7 D( S! V2 b else
! d; ~4 w4 w4 s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( W5 v; Y- ?% R
to_str("in docking station: \"",?.~.name,"\"")); 8 h* k9 i; F( p/ @) p- c
end;: x. s" e' j7 t2 ?2 d" d6 ]
else
% T+ u1 q+ \# I. ^; A- S4 r% I @.Destination := assignLObj[1,row];
3 X8 P9 e- M. C* I end;
" ` [( h) {5 ?, v2 z: J6 q5 p newDirection(@);
% @$ ?- }; g k+ ^5 K; f1 B @.HasOrder := true;8 W# d+ X! [0 o. [9 a- O1 F
end;. C" A" l+ m$ ^! }
end;: R' Y+ `. F; G# a6 x& x0 |5 `( N9 u
end; -- of the method, I( f/ y9 m: P! H
|