/* called by: entrance ctrl of the object 'track'! u# n( n2 U5 }4 d" `" o2 ^0 Z& p
*/
, F" T9 x6 i& [! r+ c. zis
5 i/ y; W' c* m, o part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 m O: J4 m. b' h, S) K- d, \* a
do$ h9 a: b, O# ^8 v0 f- @! O
Lan := rootfolder.Internal.Tools.AOLlanguage;3 Q! h( x8 p6 @5 O4 W# x* `( ?" A
if current = @.Destination -- else return
* z. w- N9 U9 X: H7 m9 y3 _$ {0 ^$ \ then' r' l" U/ L$ S/ Y/ p7 j0 U
@.Destination := void;
/ {! ?# \, H4 F$ E if @.occupied then
1 Y, }0 j1 G- @ t2 ]. L8 j$ }5 w part := @.cont;& ^, _3 I0 u- [$ B, x
@.transpOrder := void;6 ], w. {8 b* i w! }* z8 ]! e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; t( j+ m2 }3 @5 Y; R @,root.eventcontroller.simTime);7 [( F! U; B" W
@.HasOrder := false;. I1 q1 [" N) j& D+ `, x
@.DrivingHome := true;/ V( N* u# ^. P! d
rgManager.tryToStartTransOrder;
4 Z5 k' _2 P" r3 O5 I* N! L if @.Destination = void3 I: W3 Y: \( x9 B7 Q" @
then -- no transport order for vehicle @! J7 v( E' k+ W# O9 b+ g
@.Destination :=: a9 `+ H6 C! D) T
rgManager.nearestFreeStation(@,track.~);
6 O* g7 e1 u2 [% w* r1 B newDirection(@);
7 l) G3 j* L2 l, q if @.Destination /= void then
6 a% e( A( t4 [- h, F @.Destination.NumReservation :=
# J- I0 D- r$ M @.Destination.NumReservation + 1;1 f% s* }+ O8 ~* s [& e
end;
; T$ j# e5 E6 u3 X0 p1 H" v @.CurrIcon := "drivingHome";
* G T( ~3 [ G @.DrivingHome := true;
' B$ D, `4 N. E+ V$ h" x( d" X2 k: C5 C end;2 ~2 S: }2 b* U% f! |( k( Y- D$ C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station* [' o' E4 D3 g7 e+ k
part := @.transpOrder;
: j/ S- i( ~) o( q part.move(@);-- load part! y, @# F0 o' j
@.CurrIcon := "load";% W2 c& L9 m( H# w9 M3 [* P
GlobalDistObj := part.globDestination;) Q4 c1 c l) e3 X! }: k' H( o- D, r+ J: d
assignLObj := rgmanager.rgAssignL;
* J7 E# ~: u1 v# J row := assignLObj.getRowNo(GlobalDistObj);
, d" T1 J3 w; b8 |8 y" D3 K0 ] if Row = -1 then -- since 70
( i, V8 ?3 C5 Q P& o if lan=1 then
; ^1 L$ P: P; ` n4 ?7 G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% {3 O" t @ ~2 n
to_str("in der Andockstation: \"",?.~.name,"\""));
* x* @9 ?( C! K4 I5 Y else
0 N7 a& {' u$ P9 W) P& P) C promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 }. d- p/ Y: l, e& X7 i
to_str("in docking station: \"",?.~.name,"\""));
& M2 g$ ^1 [( ?* Y end;
( F* o8 A; }8 Z. v1 u else( x! U2 S" `9 z$ e
@.Destination := assignLObj[1,row];
j- r) T4 p7 i& k; x end; / u5 W& N8 u/ L& m) K, e
newDirection(@);+ b h. z7 X% A' S1 x6 ?( p
@.HasOrder := true;
* D2 p" s0 c: m3 j% L1 K end;
) u, f4 C. B+ l, `. k* d end;
5 m' y7 e& h6 r) D# f/ B2 Qend; -- of the method
2 K. Q9 e5 d2 |7 T: ~ |