/* called by: entrance ctrl of the object 'track'% F% t; w0 l* i h
*/% W/ |# M/ y" ~ j8 v6 Z8 Q
is N6 T1 [ `) a3 R& m# f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) N5 Z; Q; E3 C- U+ m8 q8 ^+ R
do
/ t. G2 U! d1 j% ^ Lan := rootfolder.Internal.Tools.AOLlanguage;
6 S9 ]+ E c. G0 F! v* e8 |4 v" s if current = @.Destination -- else return
+ m7 U& E: I' j then
* A0 r1 X* R, _1 u7 o @.Destination := void;
# |% `% P0 U( U- z j1 C# v if @.occupied then% e( G. w9 ?2 |6 @
part := @.cont;
. O- Q, Z' F5 q4 e @.transpOrder := void;' S# Y, T0 D2 x& U, r! F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 b2 M0 X; ~6 v @,root.eventcontroller.simTime);
$ q! v) C6 R5 Z7 G+ E' S @.HasOrder := false;. `9 B7 M2 z J
@.DrivingHome := true;8 r4 p* K& n- a+ V0 ]3 @
rgManager.tryToStartTransOrder;
+ d% ?! d% V/ J! o( i4 A if @.Destination = void% I+ i0 J/ ^7 l- G0 R
then -- no transport order for vehicle @
0 ^% ?5 W/ F: |9 G2 w" ]8 o- Z @.Destination :=* Q/ D* T+ c% K4 m
rgManager.nearestFreeStation(@,track.~);8 @4 u. l [7 L0 p( S5 n" ^- |
newDirection(@); ( ]" u' j2 F2 e- x4 M0 a/ Z+ o
if @.Destination /= void then
5 X- b6 j: v- s' l @.Destination.NumReservation :=) K& [2 F$ Q2 ]1 y8 J
@.Destination.NumReservation + 1;6 s$ a: |% ^' ?" N- q
end;# H& A6 t% N6 L
@.CurrIcon := "drivingHome";1 c2 ?8 s1 r4 z2 q" s! m
@.DrivingHome := true;& H) L4 t* ?! ?+ \% O
end;
. e0 h2 e$ ^3 Q: q else -- the vehicle @ is empty, both vehicle and part are in the same dock station _0 Y. y- e: g9 ^* j( K& U( s
part := @.transpOrder;
9 F( H3 H/ E+ a: k& k5 R4 v1 X; [ part.move(@);-- load part k0 T O1 g: J5 v
@.CurrIcon := "load";0 C! x% S2 A4 N$ U% L- i
GlobalDistObj := part.globDestination;
2 Y- K$ l* {. I+ _ assignLObj := rgmanager.rgAssignL;# i% ?9 X) v" B; P
row := assignLObj.getRowNo(GlobalDistObj);
. U3 I z2 H+ Y9 } if Row = -1 then -- since 70. u/ @3 } N! | f
if lan=1 then
1 P. B4 _/ `# ~# v: x o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% P$ |7 |( a: h6 J8 i7 F: |
to_str("in der Andockstation: \"",?.~.name,"\""));
4 t$ f# B( r3 N9 h$ R else9 j: B% }4 y1 e2 f5 W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- q9 C% k! P. Y! Y1 r4 E# S4 z to_str("in docking station: \"",?.~.name,"\"")); 0 Z* p/ L4 I/ U# u. p0 C! v
end; s/ c4 a! U c+ l1 G! N# l
else
! S$ ?0 d3 s: @* h @.Destination := assignLObj[1,row];
; y1 {) y0 h* O end;
+ [, L& Z E7 u' n) }6 J) ~9 C newDirection(@);# N3 P( |: `4 o' p- {& a
@.HasOrder := true;) E" L, g( V+ j+ r% h0 `) v
end;) n& x+ E" f( f9 J" S1 m; j
end;
. n( j+ V* H1 J# l2 s" Rend; -- of the method/ @2 m& Z4 h4 A0 G, H4 J
|