/* called by: entrance ctrl of the object 'track'' o! \- y/ B, Z n8 X! V) H' P. b9 V( R
*/2 x# c, P1 ?1 I3 v$ y
is5 C" [, [7 i" v6 W
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ L2 _0 u5 Q9 I. g9 o" g6 w
do* A$ X0 `; F* ~ v5 B. o4 M; n7 i" W: g
Lan := rootfolder.Internal.Tools.AOLlanguage;+ \( K3 m/ F' V9 {8 ~. O
if current = @.Destination -- else return( L t5 v4 X D( o4 G! X
then1 |9 N4 L: b: }+ F( u. b5 N
@.Destination := void;
; e( t- b5 D/ I0 l8 A if @.occupied then
- U5 A2 I7 U* ]0 O9 W' c5 s part := @.cont;/ O: u9 b5 ?7 h
@.transpOrder := void;- t# q, {) q$ {& O- n7 S# h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% |3 w% V' t5 a; v @,root.eventcontroller.simTime);. @0 f) K8 ~, K# f: j! G
@.HasOrder := false;
5 J5 w$ L$ {9 p* B& L @.DrivingHome := true;
: q. G8 W- P9 x( K! }2 E rgManager.tryToStartTransOrder;
, Z- r' k0 s8 ^; ~1 E if @.Destination = void
, w$ }; e* ?" v5 X6 B ?0 _ then -- no transport order for vehicle @6 V! _0 E3 n3 E0 Q/ b. b' U
@.Destination :=
7 F3 u( ?7 `/ J, D* ^5 p rgManager.nearestFreeStation(@,track.~);
) H9 j9 s' h* U1 B0 B# k. o newDirection(@);
0 p) r0 w8 K; f if @.Destination /= void then* h: g- g" z2 Y& j$ f( o2 h" g
@.Destination.NumReservation :=
. T, o {9 o" V$ u& e# D @.Destination.NumReservation + 1;. ^* P7 V7 t" R9 G
end;
5 I, S7 r% l5 I [: [! ]! V m8 N @.CurrIcon := "drivingHome";
" h6 G# |8 _, a& S$ a @.DrivingHome := true;
0 _1 J5 w% k$ n end;9 Y$ W4 X! T+ I) w
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; A' G" ~. W8 |- E' {7 }. Z
part := @.transpOrder;
3 `) O7 @8 z+ }* x0 r% L! k part.move(@);-- load part8 n) P6 A5 F& T& Y3 S0 A2 `9 R" g
@.CurrIcon := "load";
0 N- Q, Z: {5 q GlobalDistObj := part.globDestination;6 ^8 Q0 m! h3 _: C/ s
assignLObj := rgmanager.rgAssignL;
$ Z b9 W* b- G* E row := assignLObj.getRowNo(GlobalDistObj);
& f' X. F$ I8 S; T" G9 ? if Row = -1 then -- since 70
+ C. _ T+ T; b/ K. w H i if lan=1 then
. {2 e( C: K) R6 W8 h/ E promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, }$ j1 ]& L% }6 _ to_str("in der Andockstation: \"",?.~.name,"\""));
0 a& p9 H7 A8 S( Q else) E6 A7 { d7 w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 k" T9 @, o+ J d* g to_str("in docking station: \"",?.~.name,"\""));
: V* g I7 \3 D( ^ end;
& r' D. x) a* T7 v- ?5 N' v/ q else1 N @$ Z% q" z9 B8 m
@.Destination := assignLObj[1,row];1 d! X i; N+ h5 ~' s
end; ' z/ r$ N) q5 X5 G6 i
newDirection(@);, X# V" r9 ~: H* I( G
@.HasOrder := true;
8 o; C) D L2 q! e* m t end;
: ^: Y4 ^. u7 A* D end;% ?2 w& r1 t. G" L2 W
end; -- of the method
' N2 Z% ~/ l% z) Z! O( y( H |