/* called by: entrance ctrl of the object 'track'& m8 |1 Q3 ?" m4 j* Y/ p
*/- n$ n/ Z' ~ o! ], f* X
is
2 l$ D: G, F' k) f4 U) v( L part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 |$ i6 e. E" S2 e
do6 U7 x+ u4 M$ V5 E$ M8 [' w
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ B K o3 x% `" ?% X* N if current = @.Destination -- else return
0 H7 e; W6 e) {! S. {) H0 r then8 J v( M1 r4 J' R! O: i4 b
@.Destination := void;
3 l) T" L# U3 C6 R+ { if @.occupied then: _$ [3 e! B0 q0 Y
part := @.cont;
- d) j8 g1 s+ ?: v @.transpOrder := void;- L: _& h: K5 n- \
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# E5 g$ n/ T* O8 d @,root.eventcontroller.simTime);# a; l" |$ C/ V/ B! Y
@.HasOrder := false;
0 K; x$ ^2 |# `# R& |. ^1 b; d+ P( h @.DrivingHome := true;0 e+ e7 D, i0 v } }
rgManager.tryToStartTransOrder;
; u* m6 `' J n* D if @.Destination = void
+ V# L. V" z+ m) s; M then -- no transport order for vehicle @
2 j, w/ E5 z. b- y. }: `8 j+ N @.Destination := A3 A: i! r9 N3 v. i
rgManager.nearestFreeStation(@,track.~);
4 s+ H. e* P* g. P' i! q9 W newDirection(@);
0 a/ x0 f& R) S9 Q if @.Destination /= void then
" o- y3 S/ e+ b* z- l1 s& A( q @.Destination.NumReservation :=
: T8 t8 X. b# N( l @.Destination.NumReservation + 1;& f8 B- W4 C2 {2 M( Y
end;0 p6 W4 c2 y8 O; D
@.CurrIcon := "drivingHome";
$ F5 `8 i$ H& | [ @.DrivingHome := true;" e* h7 M( H! ^' }" g9 \7 q. F( r
end;
O9 t" b/ X! N: ~/ h* l) n else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 O* }4 k; g; N) G* \ part := @.transpOrder;% y0 A. o8 j) ~( ]
part.move(@);-- load part5 {5 q8 j' r) H2 K2 u9 r9 j5 L9 y
@.CurrIcon := "load";! K3 t L5 ]6 K8 e8 i% S
GlobalDistObj := part.globDestination;: g+ B( |. P" r k! `
assignLObj := rgmanager.rgAssignL;
6 Z2 ^; T5 W8 h2 I: J9 s row := assignLObj.getRowNo(GlobalDistObj);
% ?! S/ T! H+ a' t6 M- O if Row = -1 then -- since 70
" D, f9 r" z- t( f z7 A0 `& r if lan=1 then7 ]: M( Z3 i# v0 L* h/ T( U" x- J
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. R0 V6 k9 a+ `& G# g6 J; Y, p+ h
to_str("in der Andockstation: \"",?.~.name,"\""));
8 K" w: P. m, P& z5 l8 j else
3 \& A- a4 b% i' K0 { promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. M$ o3 V0 z1 N1 b- m
to_str("in docking station: \"",?.~.name,"\"")); + r) j2 ^0 ^* J) F. z( M
end;
" E) ?, F' V9 h0 h) H! i+ Z else/ a3 k4 V' K# w, c1 ` s' e& p2 }
@.Destination := assignLObj[1,row];
6 D; k; T. T* u n W) }4 H end; 5 B2 @3 |# G& b: v5 R
newDirection(@);
5 D4 T( Y B5 v% N2 T& U @.HasOrder := true;8 s5 z+ c) ^7 h/ T! g/ X! O' S
end;
) C% q% f$ r8 \ s end;7 r1 r5 v8 T6 @
end; -- of the method
/ U4 q/ C4 g6 m8 \! Y! _# `4 S2 } |