/* called by: entrance ctrl of the object 'track') A; z* }3 u4 _0 V1 Y. T- {' D
*/
$ G' l8 \, }2 His2 J6 ^+ F p4 K3 h2 _$ W
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 Q _+ V" h+ ~ ldo
+ H9 J* d# I* @& E4 K% H6 D Lan := rootfolder.Internal.Tools.AOLlanguage;
* a2 w: M' w9 M8 R6 r2 D1 W8 Z4 a if current = @.Destination -- else return
5 d. M2 U, b$ ~4 b then8 l. }8 h7 G1 Z a4 G9 M
@.Destination := void;
, D3 u; m. g) t: {- ]6 A if @.occupied then
' t4 B/ J6 x* K; p) i- s: L; g part := @.cont;
. A5 M9 B4 P- m. V8 |. I @.transpOrder := void;
$ P! p# P* J- y! }% B( d part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' p4 f; y2 J- r0 V9 j# V; {( v @,root.eventcontroller.simTime);
}6 G; {; K, ] @.HasOrder := false;2 C3 J: t# ^6 N! ?" n& N8 F9 } t' Y* x
@.DrivingHome := true;
4 k7 ]3 x7 [ K6 p1 O rgManager.tryToStartTransOrder;- p; a7 ^% B$ }+ v
if @.Destination = void& d9 @& b r$ X% h$ y
then -- no transport order for vehicle @( M' `) P: ?7 d& T, E
@.Destination :=0 f+ p( E8 U! @. b+ |! [
rgManager.nearestFreeStation(@,track.~);4 q! s! f$ }& ]( I$ i
newDirection(@);
0 G! F0 L/ z3 b if @.Destination /= void then% b6 Y3 u, f" F# j7 A* J/ A! {. J
@.Destination.NumReservation :=
- K5 s8 a2 J {) t8 K! ` @.Destination.NumReservation + 1;6 ?/ ]2 E1 x+ V S
end;
' n; c, @2 A3 L7 r B% N8 ^2 s @.CurrIcon := "drivingHome";
: ~& m4 m9 w' [ e @.DrivingHome := true;
$ x6 [% ?0 D' t6 W end;0 U0 g h4 m: X5 x( P' D7 ]
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 R6 o- z2 r, l+ S7 ~# s" \$ `& W
part := @.transpOrder;
% U" Z! L |: Q' Y part.move(@);-- load part' F9 A) x0 n M6 d3 [* P, r* v
@.CurrIcon := "load";
7 d# X: u" W- k9 { I$ f! @ GlobalDistObj := part.globDestination;
3 Z; A3 _3 v7 q& ~" R assignLObj := rgmanager.rgAssignL;
$ J$ z! `/ ~. w. H v4 V row := assignLObj.getRowNo(GlobalDistObj);; G. A( v2 |0 D, u6 Y
if Row = -1 then -- since 70
( Q; D6 P8 U. O) Y9 p2 o& T% j if lan=1 then
# n1 V* p7 C6 z; W) d& n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; S0 v8 J. v/ W& t to_str("in der Andockstation: \"",?.~.name,"\""));9 E0 y$ s* G5 f
else
" `- b" E/ F' G* I! G/ v promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% j8 `+ q$ Z. z) J1 G3 }% | to_str("in docking station: \"",?.~.name,"\""));
$ w' Q/ o7 q3 R% i. t; j end;
0 y9 M9 c1 y5 Q else" k, f9 F: b, Y4 A0 e5 s
@.Destination := assignLObj[1,row];1 `$ {% C% A9 l2 `$ b
end;
* x6 j$ K1 Q& p/ a m$ p) ] newDirection(@);+ M2 }+ q0 A& o1 ]( p$ T5 {
@.HasOrder := true;3 z8 Q9 \+ M6 o
end;
" ]9 s1 d( [' Q* s end;
: ^5 a' x2 r, y) H# Q. \9 kend; -- of the method6 q( L$ `. D7 p- j, l! N+ r
|