/* called by: entrance ctrl of the object 'track'! g1 G& I0 ?" S6 N. ?3 J+ M2 p
*/% f/ v, J; E. m: L S
is
$ F8 L% ?2 ~# x/ d* A2 |, F part, GlobalDistObj, assignLObj:object;row,Lan:integer;& ]% o+ l& T- `# B% }0 D3 p4 J
do0 w2 U2 ^+ x$ z8 E G9 q7 ?
Lan := rootfolder.Internal.Tools.AOLlanguage;; B9 R l T1 H. s9 M. X3 I
if current = @.Destination -- else return
* _2 W l" I5 o* b8 _6 r' c then4 M+ {& C& f/ } m& R, H6 n% [
@.Destination := void; i2 ?* u$ T e, ?
if @.occupied then$ R3 [1 Z* y" g% Y
part := @.cont;
$ `, Z: O0 i( J& p @.transpOrder := void;5 Z0 j" z! w, P* N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' m/ b. y: p0 I8 n& ~ @,root.eventcontroller.simTime);) P6 T, e! y D
@.HasOrder := false;
* V- ^) A: [ n @.DrivingHome := true;, b# C: i! V, |- R
rgManager.tryToStartTransOrder;
0 S1 D4 R# [& G. i$ g; O7 o if @.Destination = void
% o4 m0 ]0 K0 ` d3 ^/ c then -- no transport order for vehicle @9 I" S0 B. _) m; m. l3 l
@.Destination :=8 d0 R$ q) k3 l% B- ]& y
rgManager.nearestFreeStation(@,track.~);
2 o P; w8 [) t! z! M6 |) N newDirection(@);
6 n' I) a3 Q% \' g7 _+ R if @.Destination /= void then
- s8 U5 k/ K$ x/ s3 p# B! t @.Destination.NumReservation :=6 l4 l/ i8 s! `5 Q* ^
@.Destination.NumReservation + 1;
: I$ C8 [( y6 p end;3 B* h( E# n _# u
@.CurrIcon := "drivingHome";9 F8 O8 P+ J1 j. [( n$ l
@.DrivingHome := true;
* ^0 G0 N( ^# V J; S end;3 @; i B' S* J
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( m( [+ A; v$ d9 f part := @.transpOrder;
( N, {$ P- j( q9 v- A part.move(@);-- load part
Z. _) l# `- k7 c @.CurrIcon := "load";4 d& W* E; s( o( f' T
GlobalDistObj := part.globDestination;
$ S; J6 `7 L: a8 l7 @% O assignLObj := rgmanager.rgAssignL;6 q6 I& o; t8 R$ [
row := assignLObj.getRowNo(GlobalDistObj);( t* r/ R; j$ {0 `$ ^4 D: _' _3 a
if Row = -1 then -- since 70- O, S. T# Q0 G( `! N
if lan=1 then# F( w* v2 \3 s
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) K( Q+ R( P9 U j$ l
to_str("in der Andockstation: \"",?.~.name,"\""));
+ g2 ~0 k# ?7 C' t else
; q# O4 K# @! ^0 X: O2 S9 [, O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ Q7 |0 u; K& W
to_str("in docking station: \"",?.~.name,"\"")); {$ M& v! R( L
end;
# U" ~2 S, k* W$ }1 f/ e# B% E$ Y else
+ E8 f, l6 m2 w8 o; C' x! H7 q& ~+ ?: [ @.Destination := assignLObj[1,row];
8 \" q, V' I6 l8 D: O. b7 p end; / x9 l2 n" M: T1 Z/ {
newDirection(@);5 U* n; c4 V! {' u
@.HasOrder := true;
+ B0 n0 s. A* Q$ S( g/ T% e end;
9 }$ k! U3 _; U; Z5 @ end;
2 I) J5 z# T' T" L7 P$ ]end; -- of the method. b& x9 B/ l: F; r
|