/* called by: entrance ctrl of the object 'track'
; S4 ]/ o0 u0 g/ R8 r, a*/
. U# F7 Z3 v* L' u! [* h! bis
4 h& w T' a* K) D- ~! | part, GlobalDistObj, assignLObj:object;row,Lan:integer;% b8 m0 \0 W* `' p/ n& s
do
8 J1 P# [+ _; H1 \! J, v Lan := rootfolder.Internal.Tools.AOLlanguage;/ M" S% v; o1 x5 w, d
if current = @.Destination -- else return- `5 I6 c, g% H# T/ W- J
then
5 m) Q$ ]) j$ c0 n @.Destination := void;' K0 w: P6 J) i
if @.occupied then
7 c: G% [ q* {# t- x- }- o part := @.cont;8 W* F) l* N0 f( ]9 j W
@.transpOrder := void;
4 D2 w4 d2 B; [: i+ J% e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. [! R6 u6 ~# n
@,root.eventcontroller.simTime);
/ B1 H: X2 G& _' j' T! p: s& T @.HasOrder := false;
9 D; q) Z5 }9 {7 G" s \9 w K- P @.DrivingHome := true;
1 ]7 ^: G: g! q$ _) F% i3 Q1 G rgManager.tryToStartTransOrder;, Z3 s4 L. H5 }# {
if @.Destination = void
( U+ u7 d ]1 x* k8 F5 F then -- no transport order for vehicle @
$ c- ?& J) l9 c& G @.Destination :=
1 w4 O7 j9 _$ }! K5 V rgManager.nearestFreeStation(@,track.~);6 d/ y( v! H/ Q q% M
newDirection(@); ; J+ c( b$ v! I, _
if @.Destination /= void then2 C( y0 e2 N [
@.Destination.NumReservation :=; b8 P! P( X1 B
@.Destination.NumReservation + 1;4 E9 N/ [' k- P; J; q4 m
end;
0 L5 L+ ^; |8 E% O d! X! ~7 X7 K @.CurrIcon := "drivingHome";
1 Z6 Q: U/ M' w+ K7 o" D4 s# { @.DrivingHome := true;2 p% w- D, ]" x* O
end;: K5 X( u/ d q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; |1 I9 y0 o. a( p5 ?
part := @.transpOrder;
# `0 g4 q$ R I1 t% g+ w( m part.move(@);-- load part
7 B: F- |/ d5 v8 t! ~ @.CurrIcon := "load";, W) L% C# C* h, ^
GlobalDistObj := part.globDestination;$ r$ W' O. s7 Z/ K2 l
assignLObj := rgmanager.rgAssignL;1 _' u# R- I5 A' H" P: }
row := assignLObj.getRowNo(GlobalDistObj);6 v: d! D7 W% R6 T# u
if Row = -1 then -- since 70
6 c$ i, H7 `' K* q1 ~ A if lan=1 then* e5 ~3 f% D, z" d7 Y" q, I* P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) ~$ A) X. y) H8 d
to_str("in der Andockstation: \"",?.~.name,"\""));" o8 {0 G* I" O
else- c! ~5 N8 o9 D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, i8 L1 I; ~8 [. t1 R3 z to_str("in docking station: \"",?.~.name,"\"")); 9 }: h- U, Q6 B2 [1 b
end;
1 j6 _0 t% t) N4 o1 s- c else
2 F5 f- T4 ^. `3 D+ x$ P @.Destination := assignLObj[1,row];
R0 e2 c) ^* k% c0 u* r end; 9 F) a1 x4 l# w
newDirection(@);
$ m( D/ u4 h4 K @.HasOrder := true;
9 m3 {* [# C% e5 N) P end;
6 U3 N% u$ W* f; Z0 u end;3 {3 p# v% s4 `) x$ @' h1 _
end; -- of the method
0 l) c: _6 Y% Q |