/* called by: entrance ctrl of the object 'track'5 T9 m5 E2 r4 z! x
*/
" l7 `! @( u1 V+ sis+ p: I: b3 F7 N* v, ^
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& o" u6 r# C' N2 a/ K2 t+ u6 Ddo7 I W1 }; c" t" }) {, H+ E0 C
Lan := rootfolder.Internal.Tools.AOLlanguage;
: n \8 X% L, X) w1 Q" c if current = @.Destination -- else return
& B/ f' x; [7 m! l4 J# m then
- t& D. e6 J; v, s( M6 q: b @.Destination := void;$ }- Y" Q8 y/ G* K- |; p
if @.occupied then
7 x: p9 U" k# E# |1 T part := @.cont;* D# j4 C+ w" n) O- h3 C$ x0 U3 Z* d
@.transpOrder := void;3 j8 F7 Y' E4 c! H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& T( p9 _; [8 k
@,root.eventcontroller.simTime);
/ V! `3 p6 S& v8 @0 H6 k+ K* } @.HasOrder := false;
, y& C, N$ O9 h! q' W- R3 e0 B @.DrivingHome := true;( K& [; H1 F# n* A
rgManager.tryToStartTransOrder;
8 ?, ]7 N* |8 R, f, @; A if @.Destination = void9 I3 A7 {! t! V& ?! [
then -- no transport order for vehicle @/ y& `; E8 \2 q. I
@.Destination :=
3 e8 A, q9 L- ]3 u/ O* x rgManager.nearestFreeStation(@,track.~);; V/ f2 c8 q. z' ]8 T) y
newDirection(@);
" c/ U1 C6 B8 U( y if @.Destination /= void then$ Y( v0 @ \5 b$ g
@.Destination.NumReservation :=
. o7 `. u% [# P7 _# e @.Destination.NumReservation + 1;% c. j: x) {! v! u, V7 v: A
end;
' d! q/ s5 v+ s @.CurrIcon := "drivingHome";6 | e& `6 v2 U" O( z; Y
@.DrivingHome := true;0 K1 I% N% O( g9 n% V l! K5 T
end;" l6 g; {& k( \" L! m' S
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 q: y3 Y/ z) B) |8 @3 M; R6 R
part := @.transpOrder;
5 \1 X6 a. N! j6 {& k part.move(@);-- load part
. { d/ G% L8 ^% n7 i& y @.CurrIcon := "load";
- v) u& L3 F# v0 q( G GlobalDistObj := part.globDestination;1 |/ Z; N, w$ J7 {& O; _1 {
assignLObj := rgmanager.rgAssignL;, x$ T4 s* b4 ^! p8 Q
row := assignLObj.getRowNo(GlobalDistObj);
7 T- N7 c, A* m if Row = -1 then -- since 70
+ V! o/ R' u$ [3 m- X if lan=1 then
5 G+ m3 _ x/ ?' U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
b1 r* s2 {- n- M x& ? to_str("in der Andockstation: \"",?.~.name,"\""));
, b0 k* l/ C" [9 I1 F else
6 n9 i3 C. k) D" a$ l1 R promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- r9 {& g7 p( [* q to_str("in docking station: \"",?.~.name,"\""));
# |9 q' c( i' K) ]) R end;
8 v' U3 a# ]& O) m5 m; C- H* k5 Q else. ]( l* o. E% A2 w' V; A1 U, b
@.Destination := assignLObj[1,row];; c/ }! O- W* @3 h$ _
end;
& ^1 y: d5 I3 P, V+ ?' T newDirection(@);
+ o" ]& F( y: o% N @.HasOrder := true;
3 [0 w: s9 m- i3 z/ J0 `- Q end;" V) E* G, P7 Z! S* b
end;
9 y" F4 J% Q* J7 B7 q; F" O+ kend; -- of the method5 g3 T; i3 k2 X. J
|