/* called by: entrance ctrl of the object 'track'4 d3 ^1 ]; C! N# Q {) l4 ^
*/- s6 _: L* D' k' M2 Y1 l+ q# _# _
is) e: _7 V( [9 o1 I7 Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, b( r6 |2 `& l3 g: Mdo
6 f5 [1 Q G% M% J) @! e3 I7 G Lan := rootfolder.Internal.Tools.AOLlanguage;
" O- w& R4 L+ h: r if current = @.Destination -- else return
: c$ b& l9 h+ u$ b- l then
2 R2 o0 _2 f2 j @.Destination := void;* @, H2 n4 b2 \5 F' g \
if @.occupied then/ I) A* q8 h3 L1 I( f$ `
part := @.cont;
! K E9 O' k" t, p2 X: D2 \ @.transpOrder := void;7 F' W: P7 {1 N7 Z; X9 n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 h1 P3 \6 N; M: o9 \2 r" ?
@,root.eventcontroller.simTime);) y9 T K9 \8 L* E% b
@.HasOrder := false;' q4 w/ @8 t: Z
@.DrivingHome := true;
( \- D+ B2 n Y rgManager.tryToStartTransOrder;- y4 x. K* T4 x" c& ^! g- J% }
if @.Destination = void
* M% M2 `8 o6 o) A* r( P; { then -- no transport order for vehicle @
! O1 d! ? B5 \& P! T- a) u @.Destination :=: A1 R4 n) m! h
rgManager.nearestFreeStation(@,track.~);
& ?$ B. ^3 c5 X% Z$ v2 ~ newDirection(@);
3 S' u: z9 i+ i$ F0 [ if @.Destination /= void then1 m2 E3 W6 ^- T& q: L7 g" N
@.Destination.NumReservation :=
- m9 W- _* E& D* B+ j @.Destination.NumReservation + 1;" W' B7 V& \6 O) q8 i
end;
' o, b) z8 s3 Z# J4 r% J @.CurrIcon := "drivingHome";+ D* {6 {* q$ i) y. h& [* ~
@.DrivingHome := true;
6 B+ u% f- P E9 X1 M end;- t3 U2 D' @' N* u4 \
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. p3 g$ G0 f+ C$ K5 K* i
part := @.transpOrder;9 J1 M4 O- x; _
part.move(@);-- load part
3 j! R7 P7 O0 \ X* ] @.CurrIcon := "load";6 {2 q5 h e! K; `5 U$ h
GlobalDistObj := part.globDestination;
1 ^& D/ p7 K5 U" z assignLObj := rgmanager.rgAssignL;7 p4 f T# c$ q# g E
row := assignLObj.getRowNo(GlobalDistObj);/ ` v0 e8 A$ X- p$ ~) O* A
if Row = -1 then -- since 70
8 ?9 w& Z0 H( J3 M* `1 C if lan=1 then
& |9 L6 t ^" b6 H; D promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 ~/ e* p$ J& p& V. ` to_str("in der Andockstation: \"",?.~.name,"\""));
$ d5 r9 t' e2 f0 `( { else8 ~5 h4 H9 G3 `" ~/ b, C$ f4 l: N, z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 N' M7 s F4 Z; @- q+ M- S4 E
to_str("in docking station: \"",?.~.name,"\"")); & T9 a0 p" Z2 u) N q/ J* R
end;. b; a- `9 v" [; c# x2 H% O: {. Z, ~
else# Q. }/ v5 x; i4 d, H* O2 S
@.Destination := assignLObj[1,row];& j3 J0 T- P# e
end;
' ]& l" w; h: C newDirection(@);' o+ V: e4 }& S* k: K5 t9 p; }4 W
@.HasOrder := true;
0 w8 e: }& B" M8 I! b- b7 A end;
) N8 _7 N, {! j+ O3 K end;: q0 {4 X( s" _/ J# ]9 ]6 e
end; -- of the method+ T( m) r3 B8 A" a! D. D
|