/* called by: entrance ctrl of the object 'track'' F/ N( D% M% D
*/( [5 E0 S1 R* W
is
9 l' T: F" P- i6 ~& V) b- L6 V part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& Q# p, F2 j; G) Q0 [+ k* Tdo
. m" M" n/ T2 C; Q) n3 ` Lan := rootfolder.Internal.Tools.AOLlanguage;
. `2 D$ G1 ^5 }/ C: b if current = @.Destination -- else return9 `" y4 }2 X8 \( W$ {2 {' P
then
% O7 I4 z1 a# x @.Destination := void;8 ]6 B) K+ t8 B1 ?1 h: Q: e3 Z
if @.occupied then
* {7 A2 F5 |8 S; ] part := @.cont; J d1 c3 l! W
@.transpOrder := void;' d: _9 M) K+ I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 z( z. C( K( j @,root.eventcontroller.simTime);
9 L) }+ q3 U5 }2 S$ o! E+ k7 j @.HasOrder := false;
; \# b" p3 t1 i" o$ e; C @.DrivingHome := true;) {7 k) a1 c) {# t, Z
rgManager.tryToStartTransOrder;
4 m A( n8 I. z* M0 h2 l if @.Destination = void
& |; _ V8 D; J. j8 x7 Z5 B then -- no transport order for vehicle @8 Y; |' ~! ^" S$ t$ _+ D. y! G; _
@.Destination :=
4 u& V7 p: E* D6 ^ rgManager.nearestFreeStation(@,track.~);8 }' f! h8 b+ E+ q' B
newDirection(@); 1 e' m6 G, h3 U
if @.Destination /= void then( x1 }2 E2 S6 e5 k9 G5 M2 _
@.Destination.NumReservation :=
' W$ a, \- M4 Z# ~: Y! u @.Destination.NumReservation + 1;
% \0 e5 \5 b. m* a5 V end;
$ @5 o$ Y) J9 N @.CurrIcon := "drivingHome";4 u9 s* [. y! y7 y5 w
@.DrivingHome := true;' Y r- W D; Y& w; F0 k* {
end;: Q: b4 B( ?+ {4 Q% ^; u, a7 R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' K5 f8 M g- t9 w" h# U) j4 v part := @.transpOrder;
( `& m K: N4 ? part.move(@);-- load part. {/ ?; W ^5 a% j6 Z ]* g# T
@.CurrIcon := "load";( O( t" {5 s, p$ E* l5 P
GlobalDistObj := part.globDestination;
6 f* o3 |9 u( M: S% \4 q! g3 V$ z assignLObj := rgmanager.rgAssignL; y2 L* n0 m# ~0 L+ v& K
row := assignLObj.getRowNo(GlobalDistObj);9 |( g9 I: p8 ^, J* w1 }' S8 ]8 W
if Row = -1 then -- since 70
* @# D* O/ y% d K( c% W! Z if lan=1 then; E! H" K. b0 j+ P: \4 h- J
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 X6 g" |( p4 x3 p% @- ? to_str("in der Andockstation: \"",?.~.name,"\""));! w7 U; W( b6 A
else
0 P( C$ W) C1 C, M promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! k2 Z) ~4 l4 O z8 |6 D9 r
to_str("in docking station: \"",?.~.name,"\"")); 0 [0 ]5 q0 ]9 s6 W' l9 L, f7 f
end;
& m; n. F. j9 Y' Z. {7 B" N else
- l( h. {0 i4 }) e1 @$ T! [ @.Destination := assignLObj[1,row];6 X3 R& A, W2 a' P% R U: \, m
end; , o$ T- J' `7 F( D2 G/ g! E
newDirection(@);6 }4 r f+ {3 B& v, T) ?* Z0 S
@.HasOrder := true;
$ `7 t- e5 B1 C: u& S0 N end;
0 d6 t- A% P6 [" t( \4 L end;
4 Q) q1 Z) l p9 H# I: qend; -- of the method3 ~3 d4 Y1 |% V. r. Q# g4 ~ z- ~
|