/* called by: entrance ctrl of the object 'track'/ H& `( Y( r% L3 Z) y$ X4 z2 R9 [
*/% \' i: |. e# ]3 G4 |
is
0 A% z5 v" |$ }2 m8 @. [2 [& X" r part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ C2 m* @( D& c# o/ ^# e* N' G, r: Mdo1 {" d5 Y$ U0 N; z0 ~3 k: e6 M6 t
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 {2 E2 P' P9 A: V if current = @.Destination -- else return
( g( ^" b) m* H5 m then2 j$ ~4 b2 V M. q$ P1 Z. s- _+ g
@.Destination := void;; c9 r5 l% g0 v, [
if @.occupied then
) u4 m" Q; t1 P% @ part := @.cont;
* x+ m, ~0 H1 N5 d2 I @.transpOrder := void;
1 Y, y0 q J: }4 B% x' } part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: _8 G0 b( m* e0 y; o
@,root.eventcontroller.simTime);; m/ h2 H4 u5 k" n; x
@.HasOrder := false;
7 e$ l8 R, U6 Q+ J5 k9 ]* {) O @.DrivingHome := true;# r: H" T( x; y, E2 \
rgManager.tryToStartTransOrder;6 n/ Q& a2 H( |2 q' \9 Q5 P) L$ v: K" \1 d
if @.Destination = void& \& n1 h2 b& b5 ]% e9 {4 Z$ C3 z
then -- no transport order for vehicle @% H; n' i% U1 _* X$ _/ K2 }; w4 a
@.Destination :=
( E4 k$ L. P+ O5 ` rgManager.nearestFreeStation(@,track.~);, V* V. I* U& |7 A7 L
newDirection(@);
* p2 T: A }! X7 Q& L3 v if @.Destination /= void then: A$ k7 E9 h M
@.Destination.NumReservation :=
$ G+ q$ a9 O2 Z4 m3 v( Q Z @.Destination.NumReservation + 1;* y) f0 A3 d N3 d) v
end;
, s9 H! } P6 `3 [) [8 `( S @.CurrIcon := "drivingHome";; V# z% }5 l: C! a: G# `
@.DrivingHome := true;- Q. N1 ]6 E+ U# I [2 V
end;
! m' k/ r+ M) J" Y" c4 O else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 N/ e7 ] f( A0 ^ part := @.transpOrder;
% [" c" ~& W# z% W part.move(@);-- load part
* ?' l6 J. l- }8 \4 C7 O' s @.CurrIcon := "load";5 w1 e6 @+ ?. Q1 e. y8 S
GlobalDistObj := part.globDestination;; s0 F" @6 T& q1 W
assignLObj := rgmanager.rgAssignL;! s/ R( n3 Z1 T8 s
row := assignLObj.getRowNo(GlobalDistObj);3 P1 ]3 f; A4 \4 N
if Row = -1 then -- since 70
" j4 _/ t) e4 _2 j, ~, r+ t if lan=1 then
' b, I6 `% ~/ H j9 ]* q/ O" s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ A! k+ A3 y; n
to_str("in der Andockstation: \"",?.~.name,"\""));0 a+ X, O6 G' ^% J1 \: R: m! l
else
5 Q' Q( L% R. o" L/ b% t& s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: U4 R# V, D- j/ Z3 W
to_str("in docking station: \"",?.~.name,"\""));
0 L* B* S, f7 u3 z C- y& C# `: S end;
: C- g+ U* v, m8 z% z6 D else0 Q! v! f% K+ m. t/ U+ I3 O
@.Destination := assignLObj[1,row];
( G" N7 ?! ~3 d( u: y/ O end; 3 y' j, k. ^, d) l8 x5 S/ I! Q
newDirection(@);
4 M- p, f0 g$ M Z! q8 ]* J) Y @.HasOrder := true;" w" [7 t) U7 T( x' Y# u+ L& s' z5 z
end;
& {. \: Y. A4 m0 c! V1 {0 {2 v- ~ end;6 ~/ W4 P8 a/ M2 D
end; -- of the method8 V# c. U) b* {, h D$ b5 H
|