/* called by: entrance ctrl of the object 'track'8 k% F: h* r; j+ z6 m: P
*/7 d& b0 E9 Y. R/ _9 ^
is. E: r+ p+ C1 Y7 Q2 ^ m( |
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* e; V! P# i; \1 h) o8 x$ f& ado. [( B) X& K3 s
Lan := rootfolder.Internal.Tools.AOLlanguage;" u# T/ e9 U5 R) v/ e+ L( k# d8 ]
if current = @.Destination -- else return$ o# @; p# d. v
then e8 } V- o7 n. ~. q
@.Destination := void;! u! H( H0 H& A
if @.occupied then
. @9 t; G" S( m3 }, \ part := @.cont;
2 `6 @' ^1 V" h! y$ L- u @.transpOrder := void;
8 e+ E& z) x" L+ d) ?7 v part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ Q0 t6 u1 q3 F
@,root.eventcontroller.simTime); ~6 d# y- L2 ]! E
@.HasOrder := false;
- ^" I( W! f$ ] C @.DrivingHome := true;* M( |+ j7 J6 |# q, N9 M: Z. i5 G: Q
rgManager.tryToStartTransOrder;! C7 D+ o& L+ e; u8 m/ P9 r
if @.Destination = void+ T6 s1 B# J" Z# k1 D9 s! i
then -- no transport order for vehicle @ c& {; c/ B, o( o0 G4 ? c6 Q
@.Destination :=
' f* Y1 m+ r% V6 @- b' t rgManager.nearestFreeStation(@,track.~);
$ ?2 T& [; ]0 i* y, t newDirection(@); 3 B* C& S$ a7 m
if @.Destination /= void then9 e# B8 W2 \0 s0 u5 |+ m! @3 u
@.Destination.NumReservation := R2 ~* r& F# O9 A' u& p
@.Destination.NumReservation + 1;
% X6 e ]0 |/ s& v# P end;0 Z9 r# l" Z; }: n
@.CurrIcon := "drivingHome";
- P5 e8 h7 B+ w, _ @.DrivingHome := true;
( h- ~- s$ `* }7 q/ u8 ] end;
& Q R' u n7 q6 s {. [% F else -- the vehicle @ is empty, both vehicle and part are in the same dock station. E8 O% _ U% ~2 ?8 ]( ~: f0 l
part := @.transpOrder;8 `5 T I0 S- ^% U8 f
part.move(@);-- load part5 g& w& N$ j( f4 `7 ^
@.CurrIcon := "load";
- q( |2 d# r$ Z GlobalDistObj := part.globDestination;
' J a6 z( P2 D; b assignLObj := rgmanager.rgAssignL;
8 x& c& L( _: j1 u4 J row := assignLObj.getRowNo(GlobalDistObj);
2 w% `! t3 o/ q5 F5 \ if Row = -1 then -- since 70
6 Y9 g$ z* m$ `7 j" L if lan=1 then
2 z8 U& ^% F8 e& C: e' ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# L1 c" H. K, M% X; E to_str("in der Andockstation: \"",?.~.name,"\""));8 E5 G! J& H$ k, \
else
3 p) L1 P( q4 j8 m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: L) s( Q3 j; M+ V0 J
to_str("in docking station: \"",?.~.name,"\""));
* b' C3 Q4 ~1 |1 ?3 z( D end;, q1 F4 k5 ^9 k i9 P! M0 h
else( [$ U: J0 R# S
@.Destination := assignLObj[1,row];
$ s* m- Q9 K6 j! t- r4 Z4 W) d end;
' r3 m, B6 r; [. Z2 J+ i7 z9 u" _4 v newDirection(@);- S; X6 S0 |9 f/ }( a* v
@.HasOrder := true;
5 c1 q' p' N; A* J end;* U' s8 s& q5 y f
end;( q0 g! s, Q5 L# {
end; -- of the method6 j6 M1 R5 x% F" s$ p/ F; k
|