/* called by: entrance ctrl of the object 'track'7 b/ `1 ~: `/ Q
*/
T- e; f$ _. f) M3 a( P/ m8 Pis
8 {; d2 Z- w/ ^8 `5 J. e1 w part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 ?" d4 A2 z- h0 N
do
# n2 Q m2 R8 e2 U8 x Lan := rootfolder.Internal.Tools.AOLlanguage;
* E1 I ^* Z1 ~4 N3 r if current = @.Destination -- else return
9 [; ]$ c: r' Z8 o. q then' c9 U% E9 B2 m2 }. j+ M- k8 W
@.Destination := void;' Q% S$ w: W( N/ q* l4 `
if @.occupied then
. X- o- _- ]0 |! M, z R part := @.cont;
6 s5 \6 h5 W/ R; s2 R2 l @.transpOrder := void;5 D3 { y) z- n+ U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 d8 H6 F1 ?* |! l6 h: s2 [1 q7 v; w- g
@,root.eventcontroller.simTime);, T v/ k4 g/ H8 S" o/ e
@.HasOrder := false;
# r; n6 F! Q* t; F: E% a @.DrivingHome := true;5 @% |( |0 r( G8 @
rgManager.tryToStartTransOrder;1 t2 A4 n% U0 |: T
if @.Destination = void
. H5 W; i! J) h5 J: e) \. f0 ~: N then -- no transport order for vehicle @8 n3 D4 B) `6 M( P$ G* z5 N
@.Destination :=- P$ I) ~' r9 J* S
rgManager.nearestFreeStation(@,track.~);
+ K3 B5 R0 X* v1 B7 P; V2 M3 _ newDirection(@); ! k2 [2 ]5 _1 q. N2 E
if @.Destination /= void then
: g% R. X4 w- Y1 y- V @.Destination.NumReservation :=9 i/ R* ~( W3 X0 o8 X6 j
@.Destination.NumReservation + 1;
3 ~; a: E' T( m) q+ A4 q end;8 j+ J1 y7 a/ q3 o/ Z
@.CurrIcon := "drivingHome";- g8 a# k& Y+ W- G! `: Y
@.DrivingHome := true;; {( D: C+ q$ `) N
end;
$ V: j" y/ }* y/ O& j else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 T/ Z: y1 H, _( d. [
part := @.transpOrder;
6 c, ^; D. @" a' g. p0 F7 P, G part.move(@);-- load part
" ~$ V. T5 T6 `( s1 O! |: u7 o, k! T @.CurrIcon := "load";& f0 k( D, P0 C/ s' Z) T6 W/ T8 _
GlobalDistObj := part.globDestination;
/ c! S+ j/ Z* {; `1 w# _* { J assignLObj := rgmanager.rgAssignL;
" Y6 E; |, D, L row := assignLObj.getRowNo(GlobalDistObj);
/ m3 d6 {+ R( g( n if Row = -1 then -- since 709 V3 O7 V! k- ~1 R0 r# d4 P
if lan=1 then3 W7 O% W6 c: G6 s- K8 V$ j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' N' Z8 k% u8 P1 E- X2 ~ to_str("in der Andockstation: \"",?.~.name,"\""));/ H }% t# q+ X8 i4 d# b+ J
else
& Z3 }) k4 y0 ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( P8 i7 G1 O' D
to_str("in docking station: \"",?.~.name,"\"")); 9 h& z/ D8 |$ y# n0 {
end;8 m4 ]( w: U: B! O( ?/ i
else
- w# J/ Q1 i: w. O. ^ @.Destination := assignLObj[1,row];
$ I6 A# o; K4 Y9 q; b* [8 Q+ W end;
' a" p% n4 V7 {4 x' v2 S7 P, U newDirection(@);
/ ?: a. w2 K2 D8 |: A* m0 ?& h1 i3 n @.HasOrder := true;, h' {4 |. ^1 j' Y) L; S8 y: z* x
end;3 q9 d/ K& A2 D8 A9 n r6 ?
end;% c* h0 q! n* m. t* r! |0 N
end; -- of the method$ D* B s4 H% a6 R
|