/* called by: entrance ctrl of the object 'track'
3 Y+ l" u3 U. r' c9 \6 B*/
( A2 q T! C) j4 O2 l3 P* I7 h9 Ais
% |3 Q- O9 B- b5 H part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% E& b9 r5 n- c& x' U' F* J( t0 Wdo
k# W i* h# Q% W: f Lan := rootfolder.Internal.Tools.AOLlanguage;8 n1 j# {) L/ h. ?: g
if current = @.Destination -- else return
; R O$ k5 Y. a* E3 N$ `. } then* C6 e) e P1 {1 J$ Q1 @! Q
@.Destination := void;
7 E' k- x- z2 a, Z6 @( H- e- \* f/ B if @.occupied then# u8 A8 b, d9 i. f) t: H0 L6 N/ G
part := @.cont;
, _% ~0 ]7 w2 ?* I8 d @.transpOrder := void;
1 Z6 {6 j4 A7 i' }8 n/ J. G4 A$ X) z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) }3 D. I- t# n- y2 \; K) C @,root.eventcontroller.simTime);* _' ?- z2 R% F7 m+ x
@.HasOrder := false;
; w! h9 r% u( K4 _, H* [% z4 a1 b- f @.DrivingHome := true;& u- S6 j. F' [( E# P
rgManager.tryToStartTransOrder;0 g3 j, n; G' z0 |' L
if @.Destination = void' y0 f7 t* C/ y! ~
then -- no transport order for vehicle @
* w& p# t8 v' n3 e. o. P @.Destination :=
' V! o: P" P( l1 ^" w7 i; x rgManager.nearestFreeStation(@,track.~);; o4 t) z3 H' }4 [$ d+ P
newDirection(@); . U4 c- r, y% w1 G
if @.Destination /= void then
5 t8 X5 w; G& H: P/ _ @.Destination.NumReservation :=% D8 |, j; }$ N8 W n( M# x$ I( f$ @' L* \
@.Destination.NumReservation + 1;
C" I2 J+ l( M: ^5 k8 T; b5 F6 F- W end;: W2 y; i# F% t* i9 Z
@.CurrIcon := "drivingHome";
' f! D6 Z! e0 ~. S( P& C @.DrivingHome := true;& ^& F$ }, `) m6 F& _& D8 z- B
end;; `$ G5 I& U% E: s8 I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" w* x5 H. S8 u8 |3 L
part := @.transpOrder;8 b& w0 K& |* e" w( U; f. N
part.move(@);-- load part
) U& g+ }! ]6 n3 M5 ^3 \- m @.CurrIcon := "load";
4 k- ^; f7 H+ ?: S/ x# Z GlobalDistObj := part.globDestination;8 ^ B( I. l7 M6 `! T4 B+ y$ M
assignLObj := rgmanager.rgAssignL;
3 ~5 Q8 u6 Z( ~/ B- v row := assignLObj.getRowNo(GlobalDistObj);' `0 N; K2 ~: W. E% ~8 k. i7 }
if Row = -1 then -- since 70
5 i/ U. ~. Z% a, m. Y if lan=1 then
x! _! n& `* `( `( c4 z: w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% N4 G1 Z6 G2 U9 v# F" a0 L
to_str("in der Andockstation: \"",?.~.name,"\""));
- R) y- D2 w; D* D- M6 n' a else; U% _8 ~8 S( s# {9 f( I: R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( i, ^) Z2 m9 _2 i to_str("in docking station: \"",?.~.name,"\"")); _" w! n( _; _$ f- L( D" a
end;6 f) H* D' j, S1 ~
else
6 R$ l7 n! X5 _ F0 D @.Destination := assignLObj[1,row];
9 c. b. y" D8 [* ^ F8 z+ K end; $ i2 N7 s' y1 E. R
newDirection(@); k4 `% P) G/ S% e0 `" W2 g6 ]
@.HasOrder := true;2 t2 c+ a) X- r8 L7 F# @5 |% F
end;, u/ j. w! _& E6 Y3 ]1 }
end;
u4 h9 l6 c% ^end; -- of the method; I- J" S6 l; @! z# O3 _; n* W
|