/* called by: entrance ctrl of the object 'track'/ ~9 ?/ `/ L8 N; J2 ^! g0 R4 ?
*/
4 v! Y% b) F8 Cis
( {* f _& a$ a& W6 c; f/ ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 Z* }& f. Y1 r/ ~) v# z
do0 G D0 V& O, A
Lan := rootfolder.Internal.Tools.AOLlanguage;; S+ g! o7 Y3 a* F9 X3 R
if current = @.Destination -- else return
# b1 Y9 F' l* Z9 q6 i then
5 c! D+ u6 ` l @.Destination := void;
/ U0 y" o5 K0 E6 Y if @.occupied then( q5 D6 {9 q" ?& h1 ]
part := @.cont;
7 k9 T0 \4 s; Z2 g' X& U# i, d1 J& l+ u/ P @.transpOrder := void;/ j" X# G3 c; f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 F+ s5 e1 A& I8 J* w" o+ V7 |
@,root.eventcontroller.simTime);
" q, D+ s9 t, {0 u' e9 V/ l( \. \ @.HasOrder := false;
9 X" C9 W0 R1 i" }. j% r' o2 F @.DrivingHome := true;
& R2 n" I; _- x9 j$ d, W rgManager.tryToStartTransOrder;
2 W% H) T- {3 f' A, j3 `# m if @.Destination = void
7 v% P% s9 ^% j then -- no transport order for vehicle @# H8 c) I2 Q0 S) c! i& P
@.Destination :=" J' `3 M) \: S- k+ O# p3 \4 M0 P
rgManager.nearestFreeStation(@,track.~);
& Z7 }& @4 `7 P2 c newDirection(@);
2 g, f! }( c: L: M @% S if @.Destination /= void then) ~3 P# E& x, ]( \+ p5 @" N
@.Destination.NumReservation :=) h5 h" R$ `" [" D( I
@.Destination.NumReservation + 1;
+ |# R1 t3 d' N8 P" X end;
$ H: }) E1 n+ o6 h& q# e h1 B6 S @.CurrIcon := "drivingHome";
) ~ _6 y) Y8 |+ d- } @.DrivingHome := true;; X* k9 }/ N1 U+ G9 d* \8 p
end;$ K- P8 G$ P$ t* R) Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, t* Z+ G. v" U& M part := @.transpOrder;
: p- k/ d! g7 _$ ]5 t5 ? part.move(@);-- load part" }2 o7 ^! p* _4 ^# l9 v$ V6 _% o
@.CurrIcon := "load";' ]( B- n" T% V0 m$ @" r' n% }
GlobalDistObj := part.globDestination;
2 R7 ]0 {, m ?* Z' X assignLObj := rgmanager.rgAssignL;
0 q u$ @8 D$ C/ F5 m. Y row := assignLObj.getRowNo(GlobalDistObj);
" o9 `8 a: R. Y if Row = -1 then -- since 703 {; I: N" S& T$ `: M
if lan=1 then3 K$ y" r1 L1 u9 S9 B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 C4 @9 C/ y$ u# \& g+ w8 x
to_str("in der Andockstation: \"",?.~.name,"\""));: G5 U- s7 A8 K1 j; d# N6 x7 {
else
5 \1 V. D0 E# a4 F4 b, [' j2 W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," o+ P4 V( K. m s y3 v$ g
to_str("in docking station: \"",?.~.name,"\""));
2 Z- b! Y' O! D2 F end;$ W x$ E$ J9 `, i. a
else
2 ?' B, a" q! p$ z( Q4 J& }. m @.Destination := assignLObj[1,row];
k7 S" H7 n! {7 X3 l$ M end; ; ^& S5 A* F+ E: F& W
newDirection(@);
: {/ P" v9 b- e w3 _" R: \ @.HasOrder := true;
) C' o( Y' K2 G end;5 O+ d( y1 n$ ]* [9 F
end;
& @9 Q$ L7 b" W# R* w# r/ d8 I7 |end; -- of the method, L; h3 M: L6 m x% K
|