/* called by: entrance ctrl of the object 'track'. F8 ?1 U, Z( D1 `5 F
*/9 \$ i# R( h2 B0 Z: G( \! q; a
is( b+ ^4 q. u- f! L/ ~2 ?
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 t3 n5 j' n( H& A% J- k" U
do, d8 i0 M( |. s! {4 P
Lan := rootfolder.Internal.Tools.AOLlanguage;
7 W x/ z4 S2 I5 f; S0 d' x2 y* G if current = @.Destination -- else return3 y9 A+ }# J- z9 r+ [+ h
then, s$ t3 U5 t5 g
@.Destination := void;* w. o/ C( n+ n* E
if @.occupied then# n$ M$ {0 \8 X3 }- g; l
part := @.cont;. T( G8 k# E. o9 G( ^
@.transpOrder := void;
& H2 v/ x6 p0 f+ I: s$ x$ r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# ?, m8 E9 y& c/ d. V
@,root.eventcontroller.simTime);: [! G/ o5 T8 ]; K8 Y5 x
@.HasOrder := false;& h5 I6 z- [9 _* U0 {% C( p
@.DrivingHome := true;
) H1 P$ V8 ~4 q7 T' N rgManager.tryToStartTransOrder;
% U# D R2 R1 u/ {5 k: T if @.Destination = void
% ` q8 T e0 _% a1 \0 k then -- no transport order for vehicle @
5 D) m' x8 t# _2 C @.Destination :=
6 q; j) N% x; a5 a rgManager.nearestFreeStation(@,track.~);9 c" c* f6 f/ A; V* U8 {" a* h9 N
newDirection(@);
, B9 x( ?& j5 G if @.Destination /= void then
1 H' |+ o3 A* u% U+ D0 z! S @.Destination.NumReservation :=
0 g' x* @7 l* H8 o8 X. K @.Destination.NumReservation + 1;
) e- v5 d8 w; b' m! t; Q, x end;4 Z1 f5 ]2 i7 H6 ^9 T- z
@.CurrIcon := "drivingHome";
3 h. f7 C: e7 V8 Z1 ^ @.DrivingHome := true;
1 O8 l" v0 V* R; i# c" S end;1 Y7 o* f- ], ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, z. n' [5 L5 X" ~- A& d) C part := @.transpOrder;4 L `/ Q2 K1 s$ s
part.move(@);-- load part' m$ f0 Q$ ~2 a+ D9 [/ W
@.CurrIcon := "load";
~$ i; x9 T3 A/ _ GlobalDistObj := part.globDestination;" \' `. E) B, [, I8 {2 u
assignLObj := rgmanager.rgAssignL;% ?: c2 s6 b' W
row := assignLObj.getRowNo(GlobalDistObj);
5 w8 k# J% l/ G' N if Row = -1 then -- since 700 m: A5 v' `3 @1 F( I8 s$ z
if lan=1 then6 |4 s# p: _. h# h: g, L; ]1 A8 y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' v0 g' J' y1 n' ?; D+ N9 I
to_str("in der Andockstation: \"",?.~.name,"\""));
$ _' d* J5 e% d1 i9 p else
4 d: k$ Z: v. t% Q, W) E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; U) C' L) Z1 V) {* Q% }
to_str("in docking station: \"",?.~.name,"\""));
8 J& L o# p# u6 V+ j; ~ end;2 M9 Y K2 G; H. O; w' q
else
* b" W& r4 u8 N2 X+ t @.Destination := assignLObj[1,row];/ C3 }1 b& z/ s$ r: w# L
end;
" }; h) W" T6 Y R* m' ]. K! [ newDirection(@);7 R' [0 ]# c3 j8 ]6 H7 ^
@.HasOrder := true;
( t% ~% U, B3 m1 r! K( L end;
5 N8 g. n8 n: }" }. {+ y end;
2 ~. q( N$ b- Yend; -- of the method) x0 U) k5 W4 X1 J
|