/* called by: entrance ctrl of the object 'track'
* I. H! I' X; j* Y2 i5 ~4 d, g*/
j: Y& C# m5 _# Ris. M u6 P, h$ p
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 U/ D2 U, i, I; p- @; V& j% ~do
; h- p5 [5 v8 d7 e+ k) {7 c- b3 O# T Lan := rootfolder.Internal.Tools.AOLlanguage;
$ \$ a( s: J6 Q6 T& F* h$ [2 Y: K if current = @.Destination -- else return
; d. y, }8 C2 Z9 Z4 [5 { then( R; i; H, F, D8 Z! L( B; B% |
@.Destination := void;& ]4 r; C0 Y% i6 O# Z! W
if @.occupied then( d9 _0 g! X9 _' U6 C* @
part := @.cont;
+ Q' f% k `& i. ^. p0 y @.transpOrder := void;
7 X% N9 m+ ?2 U+ t! q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# o+ H$ M1 Q- B; v/ g! } ~2 ~ @,root.eventcontroller.simTime);
) Y$ O! z. W( p- \& O! Y7 I @.HasOrder := false;! Y! f) q. G7 y! B
@.DrivingHome := true;. Y5 R- \) s: T2 ]
rgManager.tryToStartTransOrder;
5 u! L* A" m% G; U if @.Destination = void# ~3 M3 Q5 r5 j* H8 F3 c- z
then -- no transport order for vehicle @
: c# `4 T! _' }/ F @.Destination :=7 V4 S; ?2 p. [5 @: _' d$ M
rgManager.nearestFreeStation(@,track.~); @: \+ j$ G" N4 j! D3 w( N, n
newDirection(@);
7 c" G% P& l# n& c3 C# d, e# W if @.Destination /= void then8 ?; p. D: r, q; ^) V, @
@.Destination.NumReservation :=
s: @( O; {0 u( B5 h3 |0 n7 x @.Destination.NumReservation + 1;
- r5 t8 a# F: B( M' b: \6 R end;2 c& `; I8 h% Q& P
@.CurrIcon := "drivingHome";$ G8 B# U/ p4 R2 Y4 b$ i& d
@.DrivingHome := true;
- g1 v5 K. Y- O% @! W# O0 N end;, L' p Y3 z" F( y2 M: L- U
else -- the vehicle @ is empty, both vehicle and part are in the same dock station h5 m; d6 }! A4 V! f
part := @.transpOrder;) f! ~( Q; O7 R
part.move(@);-- load part
. r4 \2 [0 z. E! {3 ^) R @.CurrIcon := "load";
3 a! X9 i: |& x+ \# V* y/ A GlobalDistObj := part.globDestination;5 ?5 `. L2 {3 n2 Z
assignLObj := rgmanager.rgAssignL; O- a+ l2 R2 J4 J3 W! l
row := assignLObj.getRowNo(GlobalDistObj);
$ d; l+ U& ]/ R$ c2 R if Row = -1 then -- since 709 Y+ g5 W2 U. b1 S4 g. b9 G
if lan=1 then: ]. o5 ^) E5 u. l1 c0 q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, v. A6 N7 m& w" p0 U* O to_str("in der Andockstation: \"",?.~.name,"\""));. V! S) c! _/ {9 L6 N N9 n3 Q
else5 o {8 `# J3 R0 j1 X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& u; W9 Q& f0 G; P# B
to_str("in docking station: \"",?.~.name,"\""));
/ F# c/ S- {- I: q; M end;
# |2 z# t$ _ b8 l! k/ B$ r, `4 _ else9 J! k5 N; m" F* X1 ]' A1 h5 A1 `
@.Destination := assignLObj[1,row];7 L0 }& ]1 b0 Q- B' I& K
end;
. H' ~" V3 t" s5 a' s3 ? newDirection(@);$ K6 z, c+ e' u
@.HasOrder := true;
( `2 V- m' B# S0 ~5 F& v; j2 | end;
+ z* p8 v* _! J end;: o" i1 T9 b6 i! c \! R
end; -- of the method6 @3 S M! ?: z4 T4 V# H
|