/* called by: entrance ctrl of the object 'track'! Y6 ~' K1 H$ j2 W
*/3 K: ?3 q! P+ G* J" V
is
" ^ g4 Z1 n( {; f: ` part, GlobalDistObj, assignLObj:object;row,Lan:integer;# [0 V" C z9 i: E/ ^
do5 P" D7 ~* U3 a6 ]- k6 s$ q( l$ w
Lan := rootfolder.Internal.Tools.AOLlanguage;2 {0 B' }) P8 i$ p: c8 }) u# f! f
if current = @.Destination -- else return! v7 `* ?' v$ G- p0 d; I8 w0 A
then4 ]1 V* G4 R% s! X& g/ b
@.Destination := void;
: J9 p# @9 e- g( P2 s3 P% N+ U if @.occupied then6 v/ X/ `, M+ E
part := @.cont;
z, o W7 G. s' j! k& J7 t" O' a @.transpOrder := void;
( M, m! Y2 ?; H; f. D& Y$ L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," T9 s7 O- z. O- s8 E$ ^ f0 E, @
@,root.eventcontroller.simTime);
3 U3 w- H' [' y' T3 [ @.HasOrder := false;2 B+ U8 x) P- U9 Y: S; m7 P6 V
@.DrivingHome := true;3 ~) Y9 O' R( N, K
rgManager.tryToStartTransOrder;2 U% ]2 A! i% S
if @.Destination = void
- b( [4 d( p. L/ a7 H0 m then -- no transport order for vehicle @
) @6 t3 Q- L' L1 d- m. V! c# V6 p @.Destination :=( m$ Z" _ {4 C
rgManager.nearestFreeStation(@,track.~);. i: X+ B G; ], U. f
newDirection(@);
* J" s8 E8 J! j+ M" D5 ?7 r; W# f if @.Destination /= void then
: e/ x3 b0 ^) C" R @.Destination.NumReservation :=
) W. v# C' {' V9 Z# }' Z6 A! ~3 g @.Destination.NumReservation + 1;
) T3 @9 C; n( v! {, S1 } end;
6 o7 e) F1 ~: m) G; Y/ f* @" m- _ @.CurrIcon := "drivingHome";0 P8 g k! N, c0 b
@.DrivingHome := true;
9 S, P1 ^# E0 @' S% T4 H end;
8 d! o" N) B i& f, B; K else -- the vehicle @ is empty, both vehicle and part are in the same dock station" d/ p- B8 ?* G5 Y& C( ^
part := @.transpOrder;8 Z8 v6 [1 z6 i8 ^ n
part.move(@);-- load part1 u1 x5 I: `+ ?5 Z
@.CurrIcon := "load";
' F7 D A/ l% [! ~4 v! E( d GlobalDistObj := part.globDestination;) X9 l b0 g( g1 _* T9 D* F9 D
assignLObj := rgmanager.rgAssignL;/ }! Z+ t: L* H+ }
row := assignLObj.getRowNo(GlobalDistObj);" C: j1 Q0 G* r+ W! o5 a5 g
if Row = -1 then -- since 70# R" M: m# G' E8 w
if lan=1 then7 a5 o% I" Y5 n# _# S8 x' D, G
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ c9 ]2 }. a; u5 U3 l to_str("in der Andockstation: \"",?.~.name,"\""));7 p: n7 {4 o0 b8 V6 f) S* S( M0 \
else
1 v6 @! R. L% N5 Q6 N0 W2 w( c9 h7 v promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
M* T; x3 H- x; i7 m to_str("in docking station: \"",?.~.name,"\"")); 8 N0 p: G5 L/ ^ G+ l2 Q; n$ R
end;% s3 [) }( d- u n# m
else
2 p, h& G2 y3 S* c9 k2 \ @.Destination := assignLObj[1,row];
1 F6 g4 h* c5 u' K. X0 w1 | end;
4 R3 @' k6 X# \5 r8 u$ U5 k k newDirection(@);! A, f, g+ D# S0 M
@.HasOrder := true;% v+ ^1 {4 W* J4 ]7 ^
end;
$ p* r, S' [) q end;, g7 `& j: ]* W/ U7 O9 Y. ^
end; -- of the method3 ~8 s! b \2 H' s5 f g
|