/* called by: entrance ctrl of the object 'track'
M) Q9 _; }' }( A*/% F) e4 h0 n, C) O9 H
is; h7 s" D0 _8 ~0 X/ T& n
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. e; ^. D$ { \% {
do
X8 _3 T. a q0 r( R. y Lan := rootfolder.Internal.Tools.AOLlanguage;
$ }" X; t( q7 E. b2 P: D, v) [" c if current = @.Destination -- else return
, t4 N- A* d' Y3 o2 F then: C3 }, `1 }* c4 T: R: G5 |
@.Destination := void;. x, Q7 k/ z6 D" T2 p
if @.occupied then8 T- [( ^' K. p1 u
part := @.cont;' n8 n4 X8 K' l( ~, E4 _: ?
@.transpOrder := void;
" G( j7 K- i! z) o7 @7 k3 @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& P6 z( b" L- D. z7 @" @ @,root.eventcontroller.simTime);0 C! }' H% U+ I0 ?" U
@.HasOrder := false;
6 {8 x% c+ C% x* M3 Y, E, F* w9 h @.DrivingHome := true;
8 t1 L( j9 R2 N0 X w rgManager.tryToStartTransOrder;
D& r$ H/ {9 i if @.Destination = void* S) k" Y8 k9 v. E& [7 b' a& p
then -- no transport order for vehicle @; C; p5 Q( j* I. L Q" E
@.Destination :=
. u- J* M9 i4 ^1 ]- \ rgManager.nearestFreeStation(@,track.~);$ p' U2 O9 P6 I' b9 {
newDirection(@); ' Z4 q3 B9 [+ v, w
if @.Destination /= void then3 [- H5 w4 K2 y! X
@.Destination.NumReservation :=
0 Z; \9 |5 \6 ]9 v8 q @.Destination.NumReservation + 1;, n2 e) b" ^1 I0 t+ G
end;; |+ F3 M3 i! ~+ G1 f+ e
@.CurrIcon := "drivingHome";7 V3 T( r) h8 B
@.DrivingHome := true;* v- ]1 V( S, t; v% D4 f& G$ s) L
end;( E: q% k2 t/ W k Q. Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 H# N( ^. } z part := @.transpOrder;. F3 d# m/ X+ w u) H# w6 L
part.move(@);-- load part
/ X8 G# y3 Z& o( q) ] @.CurrIcon := "load";
+ h( s C+ n F3 J9 _ GlobalDistObj := part.globDestination;: c0 ^/ X3 y% E* U4 C0 V B
assignLObj := rgmanager.rgAssignL;# Z: e6 F. g2 U- F" \
row := assignLObj.getRowNo(GlobalDistObj);
6 A7 @& K ~; n if Row = -1 then -- since 70
8 g! M h, T2 z) S5 Y' J! n5 {4 ~ if lan=1 then
7 A+ c K* e) a, _2 S5 h1 S/ z0 c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 E8 l4 M7 z. f' C/ g( z
to_str("in der Andockstation: \"",?.~.name,"\""));# U! A2 [/ }0 {2 K0 w+ J
else
$ [8 O, `0 u3 R# T" [6 k promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ k3 x9 E2 z4 T! s
to_str("in docking station: \"",?.~.name,"\""));
1 L1 F# z! ~) r5 H% [& K; ] end;
" ^" q9 i; Q5 C. Y, U& k9 P else
+ Z; k! L. I# \% Q/ s: Q @.Destination := assignLObj[1,row];
6 @3 ]0 Y5 N. f, W7 P3 u; t" W M end; / T: H& z: M3 F; ~
newDirection(@);! D) H9 N S* d. `) \1 [) p1 ~
@.HasOrder := true;/ ?% |* T J+ a/ Z( x- H5 ~
end;
& D3 `& d& g& n" V) b& G; l end;' m/ P: W0 j9 K* {
end; -- of the method6 x; Y& x% |5 w& |7 `
|