/* called by: entrance ctrl of the object 'track'- k x+ ~6 @) n$ S" L+ a9 p6 Z- I# `
*/1 n. T: r' ?% i j3 F2 w
is
( Q/ E8 m. B' B8 H9 h5 P6 j1 E" w" ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;. j0 z$ l5 _9 w3 d2 d! d- r
do
0 F$ W8 U. U4 e% n Lan := rootfolder.Internal.Tools.AOLlanguage;1 [& ]* M% b+ f# H) a3 Z4 c( V7 U* A
if current = @.Destination -- else return4 Y7 n& p+ S/ @* G( ]3 p8 |
then% A9 l7 O- B1 F, L* o) v4 M& {
@.Destination := void; z. m5 a. n" r& e
if @.occupied then2 N% S2 W3 Y: N- _
part := @.cont;; A+ Z) Z; `2 g1 o) m
@.transpOrder := void;
9 K+ J/ ?0 j0 h. l" k* M1 _( Q4 C part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, q4 h: f, s0 N. W& J( c( X* R
@,root.eventcontroller.simTime);, p) O( V" I; c3 H% [7 J
@.HasOrder := false;" c: e- H/ w0 i2 D" _; ], z. U. H
@.DrivingHome := true;
: ]3 h) E' L: |) z; e$ H5 L) d rgManager.tryToStartTransOrder;
5 |7 G0 s# Q' R: E if @.Destination = void
4 X+ a b0 O$ {# C5 H6 G- Y! ^% p then -- no transport order for vehicle @1 g f' l X: H4 p5 i
@.Destination :=
! d7 ]2 C- T! m2 }/ `/ ^ rgManager.nearestFreeStation(@,track.~);! z( V- R2 x& a5 n [" T% x
newDirection(@); 5 K3 k" [( C( Q( k9 G/ J% G
if @.Destination /= void then
% ~8 f1 O! R5 V7 ^% A @.Destination.NumReservation :=6 u# p% w2 _4 z# ]$ e
@.Destination.NumReservation + 1;
9 b' `% H" W; H* E) ^4 l end; O2 G. v" P C0 b7 ^; k
@.CurrIcon := "drivingHome";
6 {5 X5 N, b* _9 Q3 {7 Z @.DrivingHome := true;; j) Z# b1 \: c6 E1 q
end;+ x/ Z! q9 s6 g! n' \ I; x
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* ^5 a- M5 X1 J. }8 f part := @.transpOrder;
+ ?5 @/ ?( _: O part.move(@);-- load part- [/ h+ W! c% K$ N1 s
@.CurrIcon := "load";
. d, @4 c9 g. q. O) b/ y GlobalDistObj := part.globDestination;
/ P& w- {. f: a3 x assignLObj := rgmanager.rgAssignL;
4 Q e t/ g& w$ [1 V% v- z5 M row := assignLObj.getRowNo(GlobalDistObj);
: w% \9 w, H: M if Row = -1 then -- since 700 G; @2 X+ t" l# G" u3 l
if lan=1 then
. N& F: i! x0 b7 P8 u0 { promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 T% f; A0 X7 _! E to_str("in der Andockstation: \"",?.~.name,"\""));
; L2 v |6 L9 v$ z I. `$ Z else
1 [3 s* Z# o" V6 m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- ^8 w3 |0 \# a, d
to_str("in docking station: \"",?.~.name,"\""));
5 q* z* v: h: Y1 c. {: V end;
/ E/ {5 l) K( k- f) a- v( ^* J else
+ W' u$ Y3 z1 v- o$ F* [ @.Destination := assignLObj[1,row];
; C: ]; r: p9 J) ?; y7 u5 Z3 i6 G end; ! E% X: v+ [ m" U1 l* |; t0 }( X
newDirection(@);
8 i" }7 s- n6 b( b1 W; G @.HasOrder := true;
5 S! o$ i3 U) M7 u+ a0 P6 ]; ^: x% k end;
* [' a1 f6 h5 S' Z end;. j) e; f. V1 D- } `
end; -- of the method( P2 L9 z$ F; L& z5 Q
|