/* called by: entrance ctrl of the object 'track'1 ~ X& J9 R: Q$ V1 u4 S$ v# Y4 q0 x
*/
4 n9 K, {! M; K$ V+ fis8 j; V- Q3 ^- d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' n7 w) l$ L. `) U5 i8 zdo N7 {; p, f" U! n+ p/ H
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ P' |- q2 ^! B, {$ ?" V! j8 m# Q if current = @.Destination -- else return, B j. U; V8 S2 u2 W
then
R( \ h( K9 @1 v- {; H" G; l @.Destination := void;
, Q' l8 Y: W' C, [3 I( R if @.occupied then
N2 I- E `0 ~1 j8 Z part := @.cont;
1 B' S; H$ [/ S' W7 w: Z# w @.transpOrder := void;6 n3 ]# N$ x4 w0 L) S% L3 |, Q2 P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ {. c; X- o' @1 i: v+ F4 u8 ` c
@,root.eventcontroller.simTime);
; s) {6 I# _$ u9 T7 H% t @.HasOrder := false;
& F* ?/ I* [. l @.DrivingHome := true;4 g* e7 l: T1 m" \ n0 l
rgManager.tryToStartTransOrder;4 Z1 j1 W I& S* Y
if @.Destination = void% n6 ^% j9 U; ?* e9 d
then -- no transport order for vehicle @5 U4 p: u- u! Y
@.Destination :=1 y0 m# C# V0 p, A9 [
rgManager.nearestFreeStation(@,track.~);
: Q8 ~* D$ ^7 w2 b [# i4 z newDirection(@); + q" b2 w9 i X4 O9 G) x( T8 G
if @.Destination /= void then
0 l, M2 ]" A# \/ o) r @.Destination.NumReservation :=
' L2 [" U* I9 }& y' @/ S4 a @.Destination.NumReservation + 1;3 ~* L9 `$ s" v% s) I$ y+ @
end;* a& X, e( `7 x7 @4 H- }! G" c
@.CurrIcon := "drivingHome";
6 G# I8 S/ q" i @.DrivingHome := true;
3 O$ y* k& g: I" e& y end;
5 P# ]7 ]9 k, h8 ?) G else -- the vehicle @ is empty, both vehicle and part are in the same dock station
B/ g$ q6 i$ i/ A4 w- X part := @.transpOrder;5 \8 j4 S1 Z; M$ ~8 x7 _1 e
part.move(@);-- load part
" v+ y7 W8 a$ d @.CurrIcon := "load"; C# J1 F2 u0 u, \9 [0 `
GlobalDistObj := part.globDestination;
+ f- {- A' T7 r% E assignLObj := rgmanager.rgAssignL;8 _ Q6 ?# r& R1 F$ [% x3 `
row := assignLObj.getRowNo(GlobalDistObj);
, a' \5 w- N4 n' q$ v2 K if Row = -1 then -- since 700 d2 P3 s4 G/ b; }6 w: i) f" |
if lan=1 then
$ g" u! m4 Q. C6 d# w, }& g6 O3 W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 |. S, a# I6 i# r6 t to_str("in der Andockstation: \"",?.~.name,"\""));/ ~6 o7 {1 m* B
else1 B! G4 s& j' V1 [+ h+ T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# k% }5 Z! b. r- B1 r0 x8 f0 q to_str("in docking station: \"",?.~.name,"\""));
- Y+ w% v% `/ ^8 @$ S I end;6 U% g, T3 P3 Z3 V' G) |. Y
else
, m! K8 S" b' m2 O4 E; G1 ?. n4 m# K @.Destination := assignLObj[1,row];; q* Q. P* S' p! Y5 Q, Y: I
end; / A3 o" i: ?% g% E: x( p( h
newDirection(@);: w# `, f- m) ~/ R P( O7 {
@.HasOrder := true;; k. C& |2 n+ I+ r7 f
end;
" \& \2 q; L, q( k7 O' X end;5 ~4 Y. y: ]) N$ A- T$ T: A8 g
end; -- of the method$ [7 c3 ^' ^/ F
|