/* called by: entrance ctrl of the object 'track'
* l$ c5 \- n( J% Y4 S) S: L1 m*/
( _0 w4 E# U0 N4 q# _1 z( y! T: Bis
! A! Q# V" i/ D, ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- C. a4 S9 X& L% I( \$ L) d4 w5 P& \% kdo
1 k `/ `0 ~. ^ Lan := rootfolder.Internal.Tools.AOLlanguage;: J- s# m" a1 j2 b2 o& e4 L
if current = @.Destination -- else return5 F3 z: h/ ?: C" _
then
4 o1 ?+ a+ a5 U+ ~ @.Destination := void;
3 f, R% h+ D3 h, h1 r3 Z/ [& D O if @.occupied then% B7 |: G) y. M G# `% g
part := @.cont;7 B# \, I8 k: E
@.transpOrder := void;
! k4 d @2 G) i' ^/ _# j5 y2 J2 @. d; B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& G& a U# \5 f2 ^7 Z, h
@,root.eventcontroller.simTime);
; r; V) C$ O! ?- ]9 ?" j& i6 K @.HasOrder := false;
+ W& P' p5 `9 e5 v @.DrivingHome := true;
5 y; X* s6 o- h5 j5 c% R; q6 ` rgManager.tryToStartTransOrder;
3 a2 l' F* y6 j" S1 _9 [4 E if @.Destination = void' B7 ~/ e+ [5 E: o' A) K
then -- no transport order for vehicle @& |: B% E A# _ I
@.Destination :=
7 V% F) M$ {# ? x! o, f rgManager.nearestFreeStation(@,track.~);& p9 q `) ? j+ U v
newDirection(@); ) k$ p" L! T0 b+ @) c) G9 \3 M J1 i
if @.Destination /= void then" D- l* L! i; A- |" {7 x3 ^/ J
@.Destination.NumReservation :=
* l1 K( i5 L! Y1 c \" R @.Destination.NumReservation + 1;
i7 V4 y3 P0 J; u3 Z3 Z" | end;# Z( b9 i) {: y* i/ u4 U
@.CurrIcon := "drivingHome";$ J% j) c" O- _2 \* U
@.DrivingHome := true;
) n+ c5 b( u: z% ]# P2 ~0 ]6 L end;
$ g8 G+ z9 L0 e else -- the vehicle @ is empty, both vehicle and part are in the same dock station. s3 l2 T( y" M1 _
part := @.transpOrder; |' h; E: V4 o
part.move(@);-- load part
4 u! h; u i4 V9 `' Q% T: q @.CurrIcon := "load";
6 J; t6 u3 m; w3 H GlobalDistObj := part.globDestination;& P& p/ m( H1 \# u$ c- V
assignLObj := rgmanager.rgAssignL;! L9 K5 d- B7 x+ ~
row := assignLObj.getRowNo(GlobalDistObj); C' }6 g- f1 H/ ~% b
if Row = -1 then -- since 708 z2 i% b; C/ x0 {. B; t
if lan=1 then
$ F _; o7 @; b promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( P3 l. l- ?; `) Z& P to_str("in der Andockstation: \"",?.~.name,"\""));$ d a5 K) t! t. M z
else
0 \, M! g" H4 [' e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 W x5 p* U! ~
to_str("in docking station: \"",?.~.name,"\"")); - _$ [6 F5 J) j3 {
end;( d1 P5 ^6 X2 L
else
1 j4 p% U4 e% {/ a8 w @.Destination := assignLObj[1,row];$ L9 |. A* z0 f8 ]; w* F. S6 E
end;
0 q" S4 A, l5 g3 C; U- G newDirection(@);& h# d& d# l" N; I1 d3 V
@.HasOrder := true;
j6 Z! r; p1 Z/ Z: n2 h E end;
+ x4 [; G! l. \( z/ `( } end;
0 z" y! K0 K% C" P5 Bend; -- of the method5 H' k, P6 G* ^& a
|