/* called by: entrance ctrl of the object 'track'
$ @# a x' {4 S' U- b: Q4 N" Q*/
& @9 V( P+ R6 B- S* ]is# n7 {1 M4 g! ~& g$ v; K, j
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 B! z$ S; e2 \& g; G0 \$ N: z
do
( T% Y) C0 a, ] k Lan := rootfolder.Internal.Tools.AOLlanguage;6 R% o; F& F+ ]1 m, Q, p3 j8 Y
if current = @.Destination -- else return+ b, ^) F" h6 h0 P& K, e$ r
then
3 ]9 _1 V/ r9 ^" G; A @.Destination := void;
; l" w6 C) ?/ J if @.occupied then" E& v# T7 p/ l Z6 Q- d
part := @.cont;' n/ Z& K: ]. ~2 y; O8 h- D* M
@.transpOrder := void;0 J8 X3 {" j3 F' _" b# n& E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 \/ ]7 F; ~8 h9 `4 r' D" f: ~ @,root.eventcontroller.simTime);; T: U! n# P. Q* C0 z) M& H6 u
@.HasOrder := false;: n* D: P4 \$ L! J
@.DrivingHome := true;0 f$ p5 U% R3 E" [7 @7 w$ j9 G# y
rgManager.tryToStartTransOrder;
' a6 D8 h7 ~. ^. v if @.Destination = void" r v. n K; f) f; v
then -- no transport order for vehicle @
5 `, |3 Y# m$ G& S* u8 X/ S @.Destination :=# f3 p7 _/ u% F# M0 T
rgManager.nearestFreeStation(@,track.~);* D: ?7 M* f9 l; e
newDirection(@); 9 B1 A4 j& m, U
if @.Destination /= void then- U$ S' {! z( }: A
@.Destination.NumReservation :=
0 h; ~* ?5 l* r+ U, }) Q5 d @.Destination.NumReservation + 1;
: X! Q) [7 A) V- P/ ^+ L end;" o) e% g3 ^5 |
@.CurrIcon := "drivingHome";
2 B+ w" [: o& {2 T! W @.DrivingHome := true;
8 V! m' d- @- b6 \1 S end;' z C+ R1 o9 Q+ j
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; ?& L) O8 j; }4 C part := @.transpOrder;
* G4 q/ \* c- ]" b( w part.move(@);-- load part. ~) B) s# u7 k- }* R- |% X
@.CurrIcon := "load";" A4 t( _0 Q3 c1 I, i, I' h
GlobalDistObj := part.globDestination;' q1 ?) _" a- I/ p& ^ Y
assignLObj := rgmanager.rgAssignL;
( K1 a* W+ E. u( m- v# v2 L row := assignLObj.getRowNo(GlobalDistObj);1 U% @5 a9 L% ^
if Row = -1 then -- since 70
7 ~) R8 u7 Z5 c2 z6 _ if lan=1 then
$ o8 f0 `5 d" u4 |# p7 f# o6 u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# l+ W/ J# f {1 @# x3 F to_str("in der Andockstation: \"",?.~.name,"\""));
2 k- u8 l$ z+ B5 o; Y else
- r0 [) h# W- J0 ?6 q$ o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 \2 `* F. C; H' D& l3 v- F9 Z% d. ^
to_str("in docking station: \"",?.~.name,"\""));
: X. e8 N& Y$ ~: w0 `) d9 m end;
: P$ }8 W: u# k2 w else
2 g1 e+ D: |2 o' c; ]6 S- m @.Destination := assignLObj[1,row];
% ^: p. s5 C5 S4 r0 S- y end;
7 v' K4 X; d3 X7 b- g% f newDirection(@);
% H, X2 I% J' l' v6 u @.HasOrder := true;7 A+ x. @# B! p9 m* _. V: Z$ p% y0 x' S
end;
) |0 U9 ^( Y* D end;2 G$ t) N0 b& y. o: a
end; -- of the method1 w( T; w, g" L1 L9 k
|