/* called by: entrance ctrl of the object 'track'1 x! O3 t' p$ c! E$ Z) |- `
*/7 v' w9 C' A/ L- \5 c& J. [( F. ^8 E
is- g, m9 m; v% B# |) A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" F0 m/ q2 h9 c' ~( ado
. v1 _* F- y- A0 Z$ Z! O Lan := rootfolder.Internal.Tools.AOLlanguage;
7 ]3 \5 |. D& e2 u& L( p! l if current = @.Destination -- else return7 l$ S7 K9 F% d6 F, }& o/ H) [ E
then, i; a( t3 l4 I
@.Destination := void;2 p6 R1 i, j6 l1 {
if @.occupied then
! s- \ n. u% L5 s p. ^ part := @.cont;% p; d, [, N" `5 j
@.transpOrder := void;+ v% O4 |# p+ T, Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ x8 q$ g o1 ~- ]! ?! O @,root.eventcontroller.simTime);
; O Q7 V3 d' r4 K" B @.HasOrder := false;
, s) ~! J' l/ g2 e2 a: w) l' N @.DrivingHome := true;
' k) U* I+ P3 @6 X3 T' c rgManager.tryToStartTransOrder;
: D! p5 b2 p' b! T: b/ a if @.Destination = void$ {, }9 \$ t5 U. Q6 {: u; m
then -- no transport order for vehicle @' n- W( ?3 m: _. D$ G
@.Destination :=% b, I0 r( R0 ?$ W1 B4 R
rgManager.nearestFreeStation(@,track.~);
$ w, F8 S( a) M* _: x. n6 R newDirection(@); : ~' O9 |. o9 P7 r$ G
if @.Destination /= void then4 [" \$ C& A9 ] `7 f4 n
@.Destination.NumReservation :=+ `9 f, H$ k1 F% E4 b' P
@.Destination.NumReservation + 1;
" P6 T9 ^' |3 d2 T: S7 g( p end;1 }: _( N* n% `
@.CurrIcon := "drivingHome";* @$ D8 N, ?, j" W
@.DrivingHome := true;
4 T& J z+ r. E1 G( V5 i end;: ?/ A! }$ n a0 P) n3 |1 J: b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 W5 k5 {/ Q6 R9 H) S part := @.transpOrder;0 h: j4 a, f7 g3 d. }0 Z6 r
part.move(@);-- load part) `* r% D" V% H- H0 g3 Z
@.CurrIcon := "load";# X* l5 K" ?9 j/ A* I9 X
GlobalDistObj := part.globDestination;
: Q$ F, }* P# z! V assignLObj := rgmanager.rgAssignL;
$ B' x4 Q( i+ K& W- ` row := assignLObj.getRowNo(GlobalDistObj);- d& b# [. m6 `0 @8 E5 U4 d: l1 \4 i
if Row = -1 then -- since 70
. c7 d. i5 X4 i6 ^- g0 W if lan=1 then% s: F2 p& ]. f( x$ Y" t. B9 ]# C9 _4 ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 j, O9 @" r5 ?; v8 O: x) X
to_str("in der Andockstation: \"",?.~.name,"\""));) k' o0 F b7 G) N8 u+ n
else4 l" O: N6 q6 R# e7 @2 w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ T, Y6 I) Y* M! _0 m
to_str("in docking station: \"",?.~.name,"\"")); 2 Q: |! f# F z
end;# G- ]' S( z# M5 j! j8 |5 r* N
else- e6 Y* I9 J1 E7 S- b, T# i
@.Destination := assignLObj[1,row];
4 G" z; C# e0 ^" v' A3 K end; ( k3 F+ _0 M% k; c; m( U# B+ v' M
newDirection(@);
' T8 u: E7 r& t* T6 ?5 k @.HasOrder := true;' b( I. F& q* {6 q- \3 U+ g
end;& ]1 | D3 L+ G7 B
end;
/ z$ ]2 N2 B% E. |% L7 cend; -- of the method: I; w4 u# L) q6 p0 F5 {
|