/* called by: entrance ctrl of the object 'track' m3 r3 m8 D+ l% ?
*/0 e3 b# Y/ A, ]4 n0 u
is2 d8 W6 K: S/ H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 c# O+ X4 P% k4 v2 [* Bdo; w k; m4 Z7 c
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ M/ S5 \, N# E) M @# ~$ V if current = @.Destination -- else return
, }( ~+ M# S! l S then
0 R# z8 E3 O7 h0 h4 @ @.Destination := void;: `9 m: H, D6 O& Z
if @.occupied then
3 b; g2 b; H- I. V! `/ ^! V part := @.cont;. M& h, i$ `) s: p/ |
@.transpOrder := void;5 r4 Y, @! v$ a
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! M# ^1 _6 _% R c1 {3 Q9 V
@,root.eventcontroller.simTime);
( Y; ?$ x) A1 O" [ @.HasOrder := false;
3 f0 N4 F; L1 @- X+ `, l( r @.DrivingHome := true;
h7 D# R$ [. ~( p rgManager.tryToStartTransOrder;" t' u5 T2 }& z2 k/ ]4 p
if @.Destination = void- C1 A3 E, m! y' ?
then -- no transport order for vehicle @
0 W+ Q2 U+ q; C6 N4 \$ S @.Destination :=0 l" H" W" \2 n/ s& e
rgManager.nearestFreeStation(@,track.~);
- g0 a( |* V4 q. F newDirection(@); 2 O; Y H9 R- g- H3 C9 o2 j! s
if @.Destination /= void then+ y R. @+ u( {$ n: P6 f
@.Destination.NumReservation :=
d m7 }* d- J/ [% s0 J; L @.Destination.NumReservation + 1;
( ~5 y1 L, _1 y$ o end;! J- v$ F. | n/ ^5 X
@.CurrIcon := "drivingHome";
4 h' s$ {3 t y d* a: l @.DrivingHome := true;
, {- ^( g: l% Z2 ~- i6 ] end;
! G$ e4 E( e6 r+ S$ H0 R8 g else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 V2 H7 L+ x2 U) d
part := @.transpOrder;# b7 Q/ J* e5 ]
part.move(@);-- load part5 O/ L$ o( t+ L! W
@.CurrIcon := "load";
" O9 i9 b' q* h+ \' l6 x GlobalDistObj := part.globDestination;) d4 W. U( l5 |7 h
assignLObj := rgmanager.rgAssignL;
8 u4 w* t" W+ b9 @ row := assignLObj.getRowNo(GlobalDistObj);
5 C1 ~: J0 I+ e) K6 E/ o9 i4 K. z if Row = -1 then -- since 70$ o, T) o% C: q7 o( T
if lan=1 then7 B+ \3 t6 ^ j& A$ D& l; W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 L# g$ B% t' f* |/ \7 R6 B
to_str("in der Andockstation: \"",?.~.name,"\""));
9 f2 e, ?* F; L! @8 {: ?1 Q+ k- Q$ E else+ ^, O1 H& R! l4 r: |% z6 c
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 q. B1 g! |9 k: ~% v to_str("in docking station: \"",?.~.name,"\"")); 6 `- g0 r9 p4 ?; G8 r. J$ W9 Y
end;% |& }. |" Y( [1 I
else$ K8 u& s* B0 Q0 b' ]4 C
@.Destination := assignLObj[1,row];
' X$ M5 o2 |; V% J& [* b9 Q end; 4 f) {4 k, R; d8 L# n/ @
newDirection(@);) {, }$ Q% c: T) U3 x4 V
@.HasOrder := true;9 O9 W% X2 F+ x+ y1 @! R5 H" M
end;
- ^- a' L w6 j6 }7 Y end;
' V6 ?( V. U+ [, D2 Aend; -- of the method* G! j2 d6 Z i1 C' d, g8 d {
|