/* called by: entrance ctrl of the object 'track'2 b2 g# |8 Z, R' N- A9 d
*/
/ M6 w+ T6 l8 O7 y. iis8 O, x! C' b" s$ F" e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" [; Y" {# U" P4 \( n6 ?5 zdo+ G% q4 l y, T& q
Lan := rootfolder.Internal.Tools.AOLlanguage;
: k, K2 g3 d; K8 Q0 j. |' F o2 B if current = @.Destination -- else return1 a" a' O0 T% b/ T+ ]0 a' _
then
" G' _6 n0 K i8 j @.Destination := void;
- Q$ p+ ^+ e( k( G1 [ C if @.occupied then
) W9 V, j5 }/ m% Y* X+ I' D2 S part := @.cont;
* [; |7 T4 c2 _, E; C @.transpOrder := void;9 u. F4 L( r& a8 |% t4 j3 j- F5 M
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 K' D' H& S/ p) W6 ^" g
@,root.eventcontroller.simTime);) p& e, p( u9 n8 t1 ^, q% k, J
@.HasOrder := false;
* e# {8 j% c3 ] @.DrivingHome := true;/ Q x* e+ W& y9 H/ Y* n0 H; ^) ?
rgManager.tryToStartTransOrder;5 n% q% p1 |( I- u& q
if @.Destination = void5 ~+ a2 t( I/ ?. J/ w+ ~$ ~3 E
then -- no transport order for vehicle @
( V/ T; h/ `9 B+ R8 F; | @.Destination :=" U% _* h$ V8 w1 ^% S% z" N: t
rgManager.nearestFreeStation(@,track.~);# ]* [8 C7 Q4 y! ^
newDirection(@);
# K5 L$ j( ^1 A$ G" G if @.Destination /= void then! z7 m! i+ i( E- ^3 A, j* r
@.Destination.NumReservation :=2 i' _ @% @7 A2 ~7 N$ m- f. E$ H. e
@.Destination.NumReservation + 1;9 R; K1 [5 L( |$ \ @7 b
end;
: A: E. ]0 \. h" J9 U @.CurrIcon := "drivingHome";
8 n, _: a5 Q$ u x8 N: } @.DrivingHome := true;4 f, w8 f. J. Y; v
end;! w; o( f: Z. E: ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& `( A7 ?8 _2 K" U! l, Q3 v4 @ part := @.transpOrder;
- G5 c5 w+ b, a2 k0 ?* k( i part.move(@);-- load part
% Y4 i. k3 {4 r! N/ i: a @.CurrIcon := "load";- R9 e4 o: g9 z* Y, |0 I: M
GlobalDistObj := part.globDestination;
- Z) `' b8 E; f! ?) @' L assignLObj := rgmanager.rgAssignL;
" b) }! Y" h% w5 S2 _ row := assignLObj.getRowNo(GlobalDistObj);
n( k" E+ N$ J+ l; @ if Row = -1 then -- since 70
2 J5 q$ d& q0 b4 r& _ z7 z9 C/ N9 e if lan=1 then/ _+ G) o! o. d% {$ f2 L* f
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' a# u# ]1 t z H6 I' W% G0 `
to_str("in der Andockstation: \"",?.~.name,"\""));7 d: t, A) ^! l+ x% n" q G* w
else
8 `/ K3 C! r" s" \9 O4 u# D% ]1 A0 d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; p0 ]4 b1 `- a/ a
to_str("in docking station: \"",?.~.name,"\""));
' A' F; t! o. S; Z& m4 E. M end;3 X2 Q' G- N: c* P
else% T, |$ ?" [1 Q* F
@.Destination := assignLObj[1,row];* {4 C2 `, C. q5 Y7 X& k
end;
0 D$ i6 Z2 N7 ?4 F7 {* M6 J newDirection(@);# x' ]" g% Y' N$ t' I$ K. J
@.HasOrder := true;0 [) W9 r5 C5 c6 }. I
end;
- Q6 [0 {% Y2 L- k$ i3 D end;2 p4 R4 [3 Q. n& L: E- @! B
end; -- of the method% [" q# ` ]/ P: P8 Y0 F! o
|