/* called by: entrance ctrl of the object 'track'6 R$ q. `3 z9 X( M& X9 d7 M
*/
; ^( r* ^, b% F' h& Y! Xis& f$ c0 }2 l( E% @# |3 i b( ^
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ x5 g& P; G- A; b/ K
do* J- m6 G6 a& n" p9 r( a
Lan := rootfolder.Internal.Tools.AOLlanguage;/ \8 Y: @5 j9 U6 f8 R, p# N1 Y
if current = @.Destination -- else return
$ {3 B) q& s. M; {" t% z( v then
9 {& t/ j6 ] c0 y @.Destination := void;' T. ~& h& v- b" a! v5 |0 K+ T
if @.occupied then
$ b7 ~9 d$ @- @4 [ part := @.cont;+ {" w6 i# u3 Z2 C3 u0 J. b
@.transpOrder := void;
% f2 E) ^# B3 U) b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 G0 V+ _5 c( E% l& a; K
@,root.eventcontroller.simTime);; { n2 I S9 ^
@.HasOrder := false;% s# r. a3 e9 N. i2 @7 t( z
@.DrivingHome := true;
/ v- u/ v6 A3 G) c2 d- C. n rgManager.tryToStartTransOrder;
; s5 M5 U0 P: p. y( `) D0 G( P if @.Destination = void" ~7 u8 M1 h" y5 G& j9 H6 T; ^- @
then -- no transport order for vehicle @( K {0 X) l6 g# H
@.Destination :=- s2 V' I/ s; f) ]8 ]9 x% p
rgManager.nearestFreeStation(@,track.~);
# ?) u! h, w1 B. s; m: g newDirection(@); + Z( [9 {! M, u. a% z
if @.Destination /= void then0 i; V, a; u/ [+ X3 |' x6 x1 E+ Q# H
@.Destination.NumReservation :=
# L3 i6 f3 {$ ? @.Destination.NumReservation + 1;
6 s/ _" p3 B. x( d1 m7 P' ? end;
4 j9 F6 B5 O f) Z( O! U @.CurrIcon := "drivingHome";
( Y* v! U* Q M4 B @.DrivingHome := true;
4 e: R# H* A* e' V a end;
& e6 C+ D+ D7 N; W$ g else -- the vehicle @ is empty, both vehicle and part are in the same dock station; w0 M% B8 M! W0 Z& v
part := @.transpOrder;
; h6 ^( _) @. L( R# ]5 c9 x: [8 k part.move(@);-- load part
+ ^- e* _, M% d) v" ` @.CurrIcon := "load";
! m# z2 G: a7 m/ _/ q GlobalDistObj := part.globDestination;7 `: r m- U) f3 k" ?
assignLObj := rgmanager.rgAssignL;
8 i. E4 n- p! t% K! t1 m row := assignLObj.getRowNo(GlobalDistObj);
* z+ M' n4 E* D1 Q O9 A if Row = -1 then -- since 708 ]# ]$ u7 k/ Y2 s& e' M, k
if lan=1 then
6 Q* ~# o3 Y9 }0 n5 E promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' Y. D3 v4 o+ f R a& j) k
to_str("in der Andockstation: \"",?.~.name,"\""));
/ P/ E$ T9 E/ H( [3 {8 c. n; P$ H* s else
2 Z3 b& e2 M' M5 J6 i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- L- S1 B# L2 R& @. P to_str("in docking station: \"",?.~.name,"\""));
+ i( ]; _) m4 N end;
: m8 y1 n7 @% R else: p. i; f+ e1 B) M
@.Destination := assignLObj[1,row];
& S6 t$ L% x8 R+ w- g end;
, ` j0 d# y! r( c* f5 O: ?- V: L newDirection(@);
E% g% b$ o/ g @.HasOrder := true;
7 n O" F6 r$ ^) ^6 m end;+ ]: Z* f) H5 p2 z l
end;
l( c, H& K0 b) V. A/ ~/ t. qend; -- of the method5 t" T1 _9 F! E; v, w
|