/* called by: entrance ctrl of the object 'track'
) P7 Y) `8 w2 w P" p2 J# u*/
- i( {8 ^3 x0 h& T& V( }is7 v1 B- L% [. T9 y5 |
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' O9 X0 {. F2 g! K2 K; r0 G4 C8 i: V
do
: z6 @ y0 P; E9 S5 I. j. V Lan := rootfolder.Internal.Tools.AOLlanguage;
% R! ?7 E' b! ^' L, P if current = @.Destination -- else return
: g, b: d2 w7 P# s) k! x# K# @ then1 D ~. x5 [) W- b# X# N$ M; G# e
@.Destination := void;
8 t5 x U, \; m$ r+ u: j if @.occupied then
" V3 n3 b3 m: Y- B part := @.cont;- M4 G7 ^$ Q9 ~. c
@.transpOrder := void;0 q% N, g; v( a/ ^" s% w& V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 r {) T1 C) R4 P# D1 k' G; G* g @,root.eventcontroller.simTime);
% q* O0 k# S4 T; Q5 O+ K1 k! E8 ] @.HasOrder := false;
" m( Z, H( o r$ e- K1 }8 t8 ] @.DrivingHome := true;7 P" Q; J. P( u. q+ J
rgManager.tryToStartTransOrder;
0 _; a f H5 ?2 D8 d if @.Destination = void
1 r9 ~2 c D& F9 A6 ]1 s then -- no transport order for vehicle @) r4 X% I @9 O3 X7 n$ O9 H
@.Destination :=; _/ _5 i; r8 N$ A7 Q A" c ^; J
rgManager.nearestFreeStation(@,track.~);; a% D ?7 L+ E8 I
newDirection(@); 9 S- E" K4 _0 l) r2 `2 B: d
if @.Destination /= void then
j7 R2 p. e$ S5 \3 u4 c. V @.Destination.NumReservation :=
8 L* q/ P/ l( r* w* V$ O4 J: a @.Destination.NumReservation + 1;' c. j2 o, W; T
end;
+ c; h# c7 O, E2 r$ X @.CurrIcon := "drivingHome";. H% W/ H) I- R- r
@.DrivingHome := true;, L7 T# B+ @+ ~2 h
end;
: g3 O P6 ]* X/ i0 t9 o7 k, }9 s else -- the vehicle @ is empty, both vehicle and part are in the same dock station* ]/ s+ a1 }" Q6 I- _
part := @.transpOrder;
7 o1 K' e5 L( d part.move(@);-- load part
. I' l1 I3 r$ b @.CurrIcon := "load";
% z) c2 V& ~' | GlobalDistObj := part.globDestination;# L$ ~0 S' ^- ~( K6 W8 P
assignLObj := rgmanager.rgAssignL;# q6 {0 K0 T n n5 @6 Y
row := assignLObj.getRowNo(GlobalDistObj);
6 U: _: I# s6 j, X& V+ O" O if Row = -1 then -- since 705 l2 i) K- [' X/ T/ Q2 }; j( d# E6 S
if lan=1 then
" {' E$ H- [( H$ I+ c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 ^* D' v! M! t) k0 z; x to_str("in der Andockstation: \"",?.~.name,"\""));
/ E- w' E2 ] m else
* D% d, g0 B1 `' g promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# \8 i) C2 t4 u+ x
to_str("in docking station: \"",?.~.name,"\""));
5 j/ I- p* F9 X1 T% R% M+ A- a end;+ _3 R3 j, ^4 k# `, S0 q, v
else+ ^' [5 }6 u9 W/ Z6 J9 K% C
@.Destination := assignLObj[1,row];
5 f' [/ Z+ ]5 Q( H- f4 ^- R end;
! V2 w' Y6 [. t7 L3 H newDirection(@);
# o5 P4 v1 F: l+ T' J @.HasOrder := true;
4 x$ [. |: P' C# y% S end;
/ O0 S* K' G% N4 g end;0 `, P! r' j% }8 U* C
end; -- of the method$ ^3 @, H+ G- S
|