/* called by: entrance ctrl of the object 'track'+ f/ Z7 d2 T8 O# j H( N; a
*/
; u5 k7 q! b$ }, z! W9 sis# d/ D7 G* h0 ?+ E# h
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 S8 K. w/ _/ `# x5 x( m) b8 `' s
do3 m4 o/ [/ e2 C$ j
Lan := rootfolder.Internal.Tools.AOLlanguage;+ N1 u! M! [2 l
if current = @.Destination -- else return/ M, x; ~* {. O* |
then5 ^! g$ ?5 \6 e- N6 w! h
@.Destination := void;
0 X2 v! O! X( o% d; T if @.occupied then
- O- U5 G/ x6 f5 U9 ] part := @.cont;+ e- U7 C/ L' O) Q4 L/ s
@.transpOrder := void;7 K3 H* Q. Q) ^2 {3 ^) l; Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' I7 d$ O& s) x$ U1 Q3 Q
@,root.eventcontroller.simTime);
. T8 [- L- A% d/ J1 H @.HasOrder := false;7 I/ [3 [0 b! d* e2 Z5 ?. w3 f) }
@.DrivingHome := true;
1 S% H4 A$ o3 [% f$ H) H rgManager.tryToStartTransOrder;( g" a @7 t h+ ^; O2 a4 F4 k
if @.Destination = void
4 j( t+ r5 p* u, ~# a5 Q: L: t: q then -- no transport order for vehicle @5 _9 d* S, L. Y$ \2 e4 r6 \2 Q
@.Destination :=5 h7 J9 x2 ~$ z2 e
rgManager.nearestFreeStation(@,track.~);( H( K+ c: f" {' j6 E# g9 i
newDirection(@);
8 ?% n+ v4 x' \; V8 h' i2 a if @.Destination /= void then
$ d0 `: e/ W/ b$ N @.Destination.NumReservation :=
; |5 V2 Z+ }9 D; K2 V @.Destination.NumReservation + 1;; W- q/ o, F4 b$ d$ D+ x
end;
( ~" s0 e% r! F9 X0 n @.CurrIcon := "drivingHome";% P1 F7 B; ?$ v, n8 ?- Q& j8 d
@.DrivingHome := true;
2 H {6 H+ V6 r0 P end;2 l1 ?: t. p9 h7 r8 k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 l6 T4 e; Z" Y( W
part := @.transpOrder;
7 N3 N" e, \' y! c part.move(@);-- load part
" Q6 D/ O, o- B( X @.CurrIcon := "load";2 Z7 l1 ?( p# j) e" T+ E
GlobalDistObj := part.globDestination;% X* i& F9 y8 A0 ~. R
assignLObj := rgmanager.rgAssignL;$ P7 p, P/ `( t6 g- y0 F, z8 ~
row := assignLObj.getRowNo(GlobalDistObj); X7 g3 e! K3 u/ Z' D+ C4 }
if Row = -1 then -- since 70
, b+ W9 X) L/ }; o" o if lan=1 then
, f% K, T4 Q+ h R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 f5 E/ O+ {2 L6 t- e" {3 k$ h. S4 `$ ? to_str("in der Andockstation: \"",?.~.name,"\""));
* `) V: e% n6 A else
* q" \! t5 D( Z4 I( w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* a7 E3 J$ J' H7 x" M4 z+ y3 ?. r
to_str("in docking station: \"",?.~.name,"\""));
. e [0 R) c7 o1 y" _ end;9 @: v6 c5 J( a; p) i. X
else' p' a6 ~' w+ a8 E; y
@.Destination := assignLObj[1,row];
8 E& S9 [# t1 {" M3 } end; . t1 E6 Z1 `& g
newDirection(@);, E* c7 }% `" \! y! d0 Y) {
@.HasOrder := true;
$ T, n1 x! F& e$ j* C end;
, M& k+ v r3 W, U, [. p end;: x- T* y( }4 ]7 ]2 s/ s
end; -- of the method) {3 H8 s6 g1 o
|