/* called by: entrance ctrl of the object 'track'
/ A, @% t) C* v# ?; Y; {*/
2 J7 s$ h& j2 ~: Iis
9 Y5 E! u8 q8 y9 ^, A+ S part, GlobalDistObj, assignLObj:object;row,Lan:integer;* R: a1 u$ A8 t$ S* S
do
3 u' b- h% W. n& V* y+ V. B( d+ E5 f Lan := rootfolder.Internal.Tools.AOLlanguage;- C" f! k* v$ m+ T8 t4 C
if current = @.Destination -- else return
& Z: W+ P" P; q+ n then
8 Y7 ` G0 a; B% D4 w, Y( J @.Destination := void;
9 ^9 }. B& W) W8 y* Q; [5 W if @.occupied then* n7 Z$ j ]! u) l* I
part := @.cont;
9 f: r$ K' [7 ~ @.transpOrder := void;
2 F- y" K! \$ S' K6 N4 B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 g2 ~& O1 b! R6 ^$ g
@,root.eventcontroller.simTime);
( @( q) N3 g3 h" [6 ~# E @.HasOrder := false;1 V% e1 L: O/ q _3 h
@.DrivingHome := true;
& l: O' p% `9 X5 j8 s. g3 A' P rgManager.tryToStartTransOrder;4 i' `) g( W" |
if @.Destination = void
8 E' ~! M7 F2 K5 W6 b, o. Q/ A$ G2 v7 x then -- no transport order for vehicle @
* _6 i9 u+ @# w5 a4 _) E/ P @.Destination :=" V5 f. B7 m4 K2 n, N. [
rgManager.nearestFreeStation(@,track.~);
$ L- |; ^7 @' f0 b+ j2 v newDirection(@);
. G$ V* _9 h) f2 \% \ if @.Destination /= void then
I3 z# e5 G# a% S- [7 S |2 X2 O @.Destination.NumReservation :=- k) }! c0 Z6 k% W
@.Destination.NumReservation + 1;
) }7 O$ K2 ~+ F* l& d) k+ P8 }9 N end;7 P+ l0 z* f. I; M& k/ \
@.CurrIcon := "drivingHome";
. u' \. T, D3 D/ K& M @.DrivingHome := true;0 m h) ]+ [( L( c
end;
3 o7 K0 Y f, K2 V% C! d else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 o* j2 A# W3 @- A9 S part := @.transpOrder;
; J0 y( V8 {9 r7 V part.move(@);-- load part
$ j1 r$ Y7 d l" f* \* P* a* Z; U @.CurrIcon := "load";) U2 ?8 |$ z y( I$ T( Q( i; g
GlobalDistObj := part.globDestination;
! C0 A3 V9 n: O0 I" S! {1 B c p assignLObj := rgmanager.rgAssignL;: E- G/ i" W( `, g
row := assignLObj.getRowNo(GlobalDistObj);
: }4 r$ }, C$ S) w if Row = -1 then -- since 708 l' i% C) R$ t- L7 p
if lan=1 then% k$ f% Z& k, g7 K( D
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; X) h% b' r+ A3 X" {( Z2 M0 Y to_str("in der Andockstation: \"",?.~.name,"\"")); Q5 g1 V# x; p9 P! X: J
else: U& s* ~1 c0 U# u1 I8 k0 n
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," u3 [3 W r* y3 H: {/ M+ q
to_str("in docking station: \"",?.~.name,"\"")); ( {% E2 K) Z! l5 M9 k
end;5 e T) p1 u2 N- k. M* `( X
else, G( Y1 J' B; y0 S. R& G" Q/ m; K. X
@.Destination := assignLObj[1,row];
1 B( N$ H' `0 A8 C8 D1 U: N% y0 O; c end; 6 p6 R1 r$ N$ k! g& k3 S
newDirection(@);9 k! q0 c, m w& l* }' j
@.HasOrder := true;* F1 w- V; B8 F, @2 D/ g0 m: P
end;
/ X+ D, f- v6 ^% x$ P1 k8 a& `% X1 c end;8 ~; p" B! Q3 }) @$ Y; {# x
end; -- of the method, m1 _& X5 K. W
|