/* called by: entrance ctrl of the object 'track' D7 @4 r7 K% k' P2 |; R- |
*/5 k! R! i) G/ I$ x
is
3 Z9 l* m( S7 B: N! W. ` part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! `# e% L* S! X8 g( @1 ?. ido1 x% S8 P, L8 F e$ K2 Z
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 a& m( e0 W; {' Z3 S- v9 D if current = @.Destination -- else return
. ?3 ], A$ L: I8 {$ P% Y% E* j then+ Z: H& B* S& B% X7 ~$ a. T
@.Destination := void;. O( A2 W, b# w
if @.occupied then
- v, y9 M1 A# G, F; q part := @.cont;
5 r/ k- J1 @9 N) l9 m& ~8 ^: s1 { @.transpOrder := void;
( _/ i6 m- k6 h9 }% L; L; R! ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ t3 [, K% c' B% q* K
@,root.eventcontroller.simTime);5 h& B/ t6 v* |8 T' Y4 U
@.HasOrder := false;
+ t2 r" L6 L+ ~$ e7 U( F @.DrivingHome := true;
& f$ i" N4 Y0 X8 B rgManager.tryToStartTransOrder;' p. N2 l4 ]# I! J
if @.Destination = void
! F) U5 ^8 q& e7 q then -- no transport order for vehicle @
+ z5 V6 c8 ?6 j5 ^$ n* K" B) G* j @.Destination :=/ e! A% b; Z: t- t2 j( [
rgManager.nearestFreeStation(@,track.~);
' x; i1 B. M/ W) G( m! t4 h newDirection(@);
4 b! X5 { d9 z if @.Destination /= void then
9 w! a+ P0 n- C( [# O1 w @.Destination.NumReservation :=4 k6 u5 y9 h! e; l& j% J
@.Destination.NumReservation + 1;0 N8 K8 r- h! g' ^. H! E- u# ]
end;( S! z" `6 n2 Y" p6 _' h3 b
@.CurrIcon := "drivingHome";
0 A% H1 X% g2 k6 @; w0 q @.DrivingHome := true;
( e4 E8 K, y; a, T. D4 R, h! v: X% y end;% l k+ Y$ o i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 ?& ~9 P- h& }' N* g5 B. X part := @.transpOrder;/ D' T+ |, v+ H* F% u5 p* ], i
part.move(@);-- load part
; g6 |# [& J2 _, x! w) l7 A @.CurrIcon := "load";' `0 J& }6 d% Y4 i; ?0 e! i G
GlobalDistObj := part.globDestination;
( S- X- l- \% s: n. N assignLObj := rgmanager.rgAssignL;# S2 `, w# w$ |/ S1 ?& M
row := assignLObj.getRowNo(GlobalDistObj);
) W% Y8 y4 O+ p- ^% n. }( m* k if Row = -1 then -- since 70
3 l, }6 o% ]" d" }* {3 T, x) c1 c& g if lan=1 then
/ o3 k5 P2 J! Y ]. D2 @! `; i& ^/ l( U: a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, Z+ S/ d, ~3 C; f9 h- x
to_str("in der Andockstation: \"",?.~.name,"\""));, a7 Q2 V" P. t0 \
else6 [/ c5 O* ]" N) E6 U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! c F1 L- a: Q5 f9 z, W to_str("in docking station: \"",?.~.name,"\"")); ; U, r- e# ~0 b: A/ O
end;
, W5 J; r( s; ]: T else5 p' m- C2 r! s, j" X
@.Destination := assignLObj[1,row];- u. W1 |" Q+ x
end; ! f' g& ?: S5 o0 n4 P& ]$ f3 K1 _1 \
newDirection(@);
+ K+ k* n( I/ o @.HasOrder := true;
' g+ B: F# V$ V- c, m! [$ }7 z: K end;, Y8 Q \ t6 @- |7 d
end;
' C: V7 |1 B+ ]! c3 W4 m3 U, h3 H. |8 Nend; -- of the method
& ^5 e9 r6 ~5 D |