/* called by: entrance ctrl of the object 'track'
/ E- y' ~1 ?$ R6 Z7 p8 E*/
: g3 W0 F ?9 m& p* d& v% Jis# B, u) Y( M$ G+ u; W: F/ g$ J
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) N% I" U8 h5 F
do
6 a+ w- J' m/ S+ A Lan := rootfolder.Internal.Tools.AOLlanguage;$ c, l* V0 j" j$ [, V
if current = @.Destination -- else return
# o( ~! g6 z1 Q9 B then
, W7 h; N( e$ U) t8 Q6 [; U; h @.Destination := void;
- S. L* B$ D: x9 |; F! \ if @.occupied then
8 T6 c7 F# C% H, S part := @.cont;& r2 M& R6 ^/ F( A: R. ?$ _7 z
@.transpOrder := void; a: Q- G# j& x8 f1 g, q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' G3 p$ f0 F9 ?1 \) d; i
@,root.eventcontroller.simTime);
7 W A% n5 h6 a/ r" f/ B @.HasOrder := false;
- y$ o2 |# A5 K! t0 s' O. a6 i/ t: n @.DrivingHome := true;4 Y3 D& _( c, L+ @0 T8 y7 U) t
rgManager.tryToStartTransOrder;
/ _1 \: j! z. p3 R1 {4 A8 t: u) t if @.Destination = void
1 V5 {' a" [! |9 J) l$ e then -- no transport order for vehicle @
! B9 O7 \( G+ J# R @.Destination :=
- W, d/ o8 J' P2 Y- S, O rgManager.nearestFreeStation(@,track.~);1 ^( J7 ?. s/ C8 `- M! Y! }, [
newDirection(@); 9 w/ P" D8 ~2 N0 ~
if @.Destination /= void then/ T* L Q/ H' }! A
@.Destination.NumReservation :=( |+ s' @& S; u: ^' F# N
@.Destination.NumReservation + 1;
9 N: h V& u5 l- I8 {) A end;
& F' m! m" s$ ^8 o- ` @.CurrIcon := "drivingHome";% O9 @( a: T% A$ K2 C, A
@.DrivingHome := true;
4 h, Y% N" C: w& v; v: k3 w( y end;
6 ]' c3 ]( I3 }/ c9 w; @# f9 t: W else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ p- C, p: F% {3 ~" v9 ^1 m part := @.transpOrder;( X% _1 C6 @+ g; }3 Z% U; m
part.move(@);-- load part
& Y3 @4 y/ i% e( u+ [6 | @.CurrIcon := "load";
0 C, ]* ^) p! b& j GlobalDistObj := part.globDestination;
}) M n" b @# `+ P! ~, j2 E& v assignLObj := rgmanager.rgAssignL;
$ N# z& e) m. J3 q! V9 O0 ]/ J row := assignLObj.getRowNo(GlobalDistObj);
! w% H8 {( Y# z5 s if Row = -1 then -- since 70
; `( f5 ^6 U0 V* y8 F if lan=1 then
7 o! m) s$ v1 Z% v/ x: e promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 Q+ u. ]' X8 G' a% Q- | to_str("in der Andockstation: \"",?.~.name,"\""));1 L( o! ?+ ]: }7 A
else
+ @* I5 g. T8 O0 J! c( | S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ T7 Z1 h+ R9 r c- C5 K
to_str("in docking station: \"",?.~.name,"\"")); W: [& n- Q* u. D. P
end;2 z9 m; `" Y+ g! _
else
5 C8 I: a/ N6 m# t2 R: c @.Destination := assignLObj[1,row];
3 G/ F, _4 i4 ]; L' Z end; " I! c' {, A' t1 E/ n% t
newDirection(@);" Y4 Q" {9 Y* P0 U7 ]/ H$ y
@.HasOrder := true;0 }+ |& `0 {5 ~: j0 @! o5 Z
end;. W9 K( R+ x4 D8 {8 P
end;" L4 Y' k9 U3 @1 F; r4 G. P
end; -- of the method3 p+ w% s0 j a6 |, A2 s0 n O A
|