/* called by: entrance ctrl of the object 'track', f w4 h' f; V8 J
*/1 j& D) F3 Y' i! d G
is
! ]6 d! J0 T% K w part, GlobalDistObj, assignLObj:object;row,Lan:integer;' X7 k8 }: v9 J! ~) E( ~1 W/ C
do
J' l+ S- J: Y. K! ^' m Lan := rootfolder.Internal.Tools.AOLlanguage;& Z4 Y6 }9 j: O
if current = @.Destination -- else return3 {' L' K$ O% E
then: u! U0 b* e5 j0 t m6 P. b
@.Destination := void;
% s7 D0 d7 }( C6 H if @.occupied then$ c- w6 r- k2 Q; m
part := @.cont;7 y3 ^( T& q/ u) i+ _
@.transpOrder := void;* \$ m: ^+ p5 f7 j7 _$ D0 F; f; S1 r
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ k& |6 a! H7 @; W/ @6 M
@,root.eventcontroller.simTime);9 l: i- E. K4 Y* y X6 D2 P
@.HasOrder := false;: ~1 t- d$ N `% \' `4 Q
@.DrivingHome := true;
% F% D3 s( {3 \3 N. ~0 S rgManager.tryToStartTransOrder;
/ `7 v9 b0 r' Y$ P# i if @.Destination = void2 z( [( M5 P% V) R, C" G
then -- no transport order for vehicle @" e i( G5 [( L+ ]8 d5 X+ ?: a* [
@.Destination :=( a* z7 X! g) H, u- Z7 j4 r
rgManager.nearestFreeStation(@,track.~);
9 J: ?" U1 f, `4 \$ b8 c5 @1 h+ m newDirection(@);
: {) y1 b0 a9 f if @.Destination /= void then0 v( n! A+ }+ I) |
@.Destination.NumReservation :=
4 A, [# x: H- `$ R, U1 X @.Destination.NumReservation + 1;
" q3 d. B4 d+ t( L5 R" A end;
. i1 p. R0 D. H6 d1 T @.CurrIcon := "drivingHome";
8 G; }6 \- J) z0 [0 ]( r! \) O @.DrivingHome := true;8 w. e/ [% M( U8 ]& M* \
end;1 e" U) {! r9 O
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 @# E' Y, z2 L: |' _/ I part := @.transpOrder;' A5 c. ]/ m7 a
part.move(@);-- load part
0 Z$ w) P5 Y: @. p8 L/ o @.CurrIcon := "load";: {% `2 Y( F5 v' O( s8 q) q! T! W$ T4 L
GlobalDistObj := part.globDestination;7 d2 _# C+ x i9 O! r0 g: \9 G
assignLObj := rgmanager.rgAssignL;$ K6 n3 s) j' c( p4 I
row := assignLObj.getRowNo(GlobalDistObj);. i, Y5 J5 g( m! p1 Z
if Row = -1 then -- since 70
( F+ i, \1 b! B1 k, B- R# O/ | if lan=1 then' u% N% ~3 R7 B0 P9 r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 J/ G4 `, B: o8 M2 M/ C to_str("in der Andockstation: \"",?.~.name,"\""));; N# {8 ?4 ~2 L ^ D8 R y
else1 n" i# l6 R) _# C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& M7 B, b# R. [( \6 E( `" n to_str("in docking station: \"",?.~.name,"\""));
/ u, O+ s+ Z7 X, Z end;
9 a$ Q$ |6 t! ?$ e! b8 Y6 [- e else- M8 p4 v+ z/ t& K
@.Destination := assignLObj[1,row];
$ c+ @2 C- H8 _) w2 V- T1 H end;
O9 k0 S& @9 O/ x, H newDirection(@);
9 X& h3 ?" R! w4 D) ~1 p, t: | @.HasOrder := true;% p+ X% P8 R9 y( |3 j( m
end;
# b# g! D+ V4 k' }! A" n0 v end;
, R( l; ^5 \ {1 _end; -- of the method2 G; F, v, _+ \; o( u5 l8 r) Z
|