/* called by: entrance ctrl of the object 'track'1 E0 ^7 ]' ^& n3 x* K, c: c
*/
0 }" ]2 y5 ^, g5 y2 \9 Z8 S$ iis- t+ J) C$ A3 a# ^! j3 R
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* @- W" i, y" M+ V( P' J5 F/ m
do$ z8 r) {! f7 z! G
Lan := rootfolder.Internal.Tools.AOLlanguage;/ n4 H! E+ t# H0 b" D; t8 ^
if current = @.Destination -- else return
2 E+ T- W; c& A! k% k6 g then
( p: q: l" d' Y0 ~2 s/ k. A @.Destination := void;
; {/ M& C2 b9 y- {# N' }0 B if @.occupied then
3 V$ C1 ` `% Q9 W# x% W9 X4 J2 B part := @.cont;' T- r" A) j; H( S, I5 m
@.transpOrder := void;
: `5 C- o( G& P" h# a part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& [; O( u" H0 f# Q% S; O
@,root.eventcontroller.simTime);
( X$ p' z& o9 r: }# a( n3 n @.HasOrder := false;
5 J# v& ~: @2 d @.DrivingHome := true;; C7 f3 ?7 [3 r4 n0 X
rgManager.tryToStartTransOrder;# n' Z+ S j5 n" z1 w; _
if @.Destination = void
$ [2 }) d9 p( j" V1 A then -- no transport order for vehicle @
3 ]( I% K& g8 s# U! D% h @.Destination :=+ E A& ~* u. W, \) W1 C/ ^9 O
rgManager.nearestFreeStation(@,track.~);
6 {$ J: {$ N7 s% B Z1 c3 e/ C newDirection(@);
' a/ z1 A- v. y, y5 U; r0 Q if @.Destination /= void then$ f9 x" z( A/ j7 S+ P$ Y) G
@.Destination.NumReservation :=
: E/ a, M- M0 E% ^' n- ^( C& Y6 @ @.Destination.NumReservation + 1;
3 r; c/ b$ x9 S+ M' q) X( n end;
1 j9 D9 p) Z( E @.CurrIcon := "drivingHome";
$ R# N+ H, p9 o; n1 v/ t2 Z @.DrivingHome := true;
* m) \( m0 s' K% E$ \ end;
; j4 J9 ]1 |/ r, h8 H* s j* D else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 K, P3 Z1 ]/ d" O& I) d
part := @.transpOrder;
; z: i/ x: ?3 i2 }! ]* m( [. t part.move(@);-- load part _ t: e s/ l, y& v
@.CurrIcon := "load";+ p2 Q9 A7 h7 i
GlobalDistObj := part.globDestination;
1 |+ r0 G E0 B1 ?- V. G" T assignLObj := rgmanager.rgAssignL;
6 L8 D- s% R1 C# r2 f( M' Z% u row := assignLObj.getRowNo(GlobalDistObj);) z2 V% P0 t$ E: V3 i
if Row = -1 then -- since 70
2 @* Y8 e) ]/ P1 Q1 d3 G if lan=1 then# L2 }0 m4 x" c: S9 M- V: h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# K4 ]: \& A8 w# P( _8 X8 Y to_str("in der Andockstation: \"",?.~.name,"\""));( e' o* s- }" S6 ^: K4 X' p
else
$ i7 O+ M: T2 V! ^" Y4 k promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ H6 h$ |; g& |$ s6 T/ W
to_str("in docking station: \"",?.~.name,"\"")); ! Z0 y2 J! }) \2 W0 H
end;* r/ V* ^, j4 ]5 m0 m6 v: o
else
$ K2 T4 Q8 g$ r' p. O0 o0 O @.Destination := assignLObj[1,row];
0 p% @9 ]3 ]0 i end; & k6 M9 Q" A f- `, P% F# L, A! @' c
newDirection(@);
$ l' Z. H& b8 t: n- A @.HasOrder := true;
; U4 k$ K( F. B) P5 i* H) |4 k end;9 x9 T! J' C' m- x% j7 z1 f
end;
; Z2 L, _" _) v3 M; a! Bend; -- of the method+ A' q8 z* b* _1 E8 j
|