/* called by: entrance ctrl of the object 'track'" [' e; n; |8 g
*/
& u( l, U4 J! B0 D* }) W0 _8 m$ Ais. c- z2 M+ }6 N" x+ V, r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ n% s: a2 O7 c) jdo
' j6 O+ c4 L4 t Lan := rootfolder.Internal.Tools.AOLlanguage; ^3 n2 ]7 t+ k/ C
if current = @.Destination -- else return
7 P& J. N; n+ F6 b1 I9 c then
2 s3 _5 E$ T0 x( Q @.Destination := void;
" S( O/ ]7 J `8 R if @.occupied then/ l9 A: d: ^; ~* S1 ]
part := @.cont;( j, Y7 u9 e9 `& n/ C+ g6 R. _/ f2 y
@.transpOrder := void;
4 [+ E2 ?7 d |6 S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# A" {3 I2 E6 w/ e! {7 r- X) G
@,root.eventcontroller.simTime);
7 Y/ H' c5 M% x8 h8 R9 ~ @.HasOrder := false;' M7 I3 c' } v; z( Y h# m
@.DrivingHome := true;% o* L l ^5 g, _8 g2 p- w
rgManager.tryToStartTransOrder;; u, d: a M7 z) v; @
if @.Destination = void
# s$ X% I' A5 G0 T: R then -- no transport order for vehicle @8 j! `( U7 U* m8 C
@.Destination :=
4 d. k& Q8 @9 k' [$ k rgManager.nearestFreeStation(@,track.~);& G- `4 ]9 s2 |+ {0 b
newDirection(@); 0 p$ ]8 O& c& e$ B* }+ g7 T) t
if @.Destination /= void then$ g$ h- [4 B+ \# [
@.Destination.NumReservation :=& j+ i/ Y8 P. h
@.Destination.NumReservation + 1;
( }) V" H: S8 ^' q# e end;
, i5 ^7 L" H+ e1 r* W& f8 z @.CurrIcon := "drivingHome";
% I- c& |, {. r: N) O8 K/ G. r) u @.DrivingHome := true;
/ J+ j& n! X/ c end;
1 o3 S3 Z7 ]; j- U/ ^8 |/ T# W5 ]& c* f else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 S+ N$ u- s' B9 z/ L
part := @.transpOrder;
% F( o. i) a) w. x: g part.move(@);-- load part9 w2 F) F. Q; o& M/ e+ m4 ?
@.CurrIcon := "load";5 b: H% B; P* B4 K* d% ?( ~. V
GlobalDistObj := part.globDestination;
9 z/ E5 j5 j) J- d$ k assignLObj := rgmanager.rgAssignL;. E+ D2 n$ G# }+ h! v4 X
row := assignLObj.getRowNo(GlobalDistObj);! _7 w5 N' s4 j H$ D- m
if Row = -1 then -- since 70
9 g! Z$ B5 n$ n% I$ b if lan=1 then, r! }, p2 ]( Z ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ [; w+ \1 C3 ] K3 [7 `4 m to_str("in der Andockstation: \"",?.~.name,"\""));
4 b& u0 O& a0 Q" b1 r+ K, F else
9 Y6 ~$ _! K1 j+ t$ J5 Y: N promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) D/ L0 a. ~3 @1 s to_str("in docking station: \"",?.~.name,"\""));
, K/ w% q* p; D0 [ end;
% N3 I( Y5 p2 f& m4 ^& H else
* z; ]* {) i# d- I q" j! |+ _' V+ C @.Destination := assignLObj[1,row];9 J- b; H( [, k2 O5 l
end; $ L( e: U0 C5 q0 ~
newDirection(@);, ~' }3 a7 G# y. g
@.HasOrder := true;
' Q; S0 B8 u, w3 a* C& b1 H+ m end;
; z& v+ b3 C; g- P0 |; s end;
7 J( d" {+ f& F$ U5 A2 f. K+ e; Oend; -- of the method# U4 c+ g6 x% P
|