/* called by: entrance ctrl of the object 'track'" G/ X% L( J) {3 z) F% ?( j
*/# i) Q) a4 \* J# d+ Q8 J3 x# L8 F8 U
is4 I) i. T# r0 @ J, o) X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 A) f C" t" u, O. odo
: A8 Q) J3 [8 E1 s! V/ u Lan := rootfolder.Internal.Tools.AOLlanguage;
4 t6 |" C8 x& H2 G) f( T; I if current = @.Destination -- else return
8 P5 s2 {0 u8 I5 m. f then$ `0 G; |( u* g) O7 ^8 N
@.Destination := void;; N$ C# N( }) Y; `
if @.occupied then$ A! p, R* v' w, d; V
part := @.cont;
/ ^5 Y2 R* Q, N6 }- i3 z @.transpOrder := void;6 N9 S7 b$ F' q9 E% z0 X, U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. B' ]) d- @* {5 E: e. F
@,root.eventcontroller.simTime);
7 _ q- N; u- s& P @.HasOrder := false;
; w$ Y c% }' K: W1 k @.DrivingHome := true;0 J3 A8 R! @- E2 r
rgManager.tryToStartTransOrder;# ]2 y$ e5 d3 K- d C, _
if @.Destination = void
* _- n5 ]1 w$ e& K8 ~ then -- no transport order for vehicle @8 [7 u$ i2 Y; ?0 r
@.Destination :=
0 j! g* `) f J rgManager.nearestFreeStation(@,track.~);7 ~7 g: _4 y5 {, I) ~
newDirection(@);
6 |& K: p9 e' K if @.Destination /= void then
6 J$ | R- w: ^, `$ ? @.Destination.NumReservation :=
+ I' A R0 o8 [3 k1 E+ r: J @.Destination.NumReservation + 1;6 L3 s$ N- p+ I: m" |# _
end;0 g; A0 _% g; w7 |
@.CurrIcon := "drivingHome";
7 Y; a$ E: ^( H) c3 _! ^& _ @.DrivingHome := true;1 ?' t- M2 \* f& C7 s+ u$ W$ S
end;
: L$ `' @, k$ ]7 ~2 K6 s4 M/ T else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ [- Q* ?; ^6 c* _0 j j
part := @.transpOrder;
3 T& Z' }/ }5 v' Z: ? part.move(@);-- load part
9 l* s) F' {# o4 r( X+ e @.CurrIcon := "load";. M5 e- M) {) y2 Y y" I$ n5 H& `
GlobalDistObj := part.globDestination;% t' t4 C9 p! C* _4 Q/ h4 z( h
assignLObj := rgmanager.rgAssignL;+ J B% e% y& g; g# }
row := assignLObj.getRowNo(GlobalDistObj);
* y' ^' Z/ i/ p if Row = -1 then -- since 70
, D/ I* U+ y) _ if lan=1 then
?+ y T f" ~8 W& D promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ K: {# d/ W1 y4 `$ b' H
to_str("in der Andockstation: \"",?.~.name,"\""));3 u$ U! h- x+ Y) M) s
else+ q; q) l, E; e; r" ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: \# i0 }( E( y( p
to_str("in docking station: \"",?.~.name,"\"")); ; `& N8 s. z; n3 G0 j% e3 _4 x
end;6 f; U5 z4 e- g' Y- d
else
7 J( E) ?9 t4 R- A, H+ c' N @.Destination := assignLObj[1,row];4 y8 Q+ {2 n/ Y# h; { o: U/ H
end;
3 A6 D. I3 y2 ^0 E4 g/ m, J newDirection(@);# t: k* E" q6 T" r7 A4 @
@.HasOrder := true;9 E0 x& @. X$ [
end;6 t7 h1 ?0 F0 I2 ^# I! Z: V
end;' S- S( u% Z& i* S' q
end; -- of the method" b2 K$ M D* ]8 d# w; {5 ]1 s
|