/* called by: entrance ctrl of the object 'track'9 S% ~; B- s) L7 E$ G9 u- w, e
*/
9 r/ l* o7 y. I: E& _, {5 X3 U4 Vis
7 R; g/ J3 @. { part, GlobalDistObj, assignLObj:object;row,Lan:integer;" V' [6 U1 D* S
do% c" y1 J3 J! I1 d( b1 j- U* ]
Lan := rootfolder.Internal.Tools.AOLlanguage;
% |2 T, }. k/ Z! [8 o3 a if current = @.Destination -- else return
9 t. ]- c9 l0 z s! G. }' Z then
( r2 _% S6 v) {2 ]" ]* { @.Destination := void;
: T4 C( ?- l$ C o/ t* } if @.occupied then
' t4 _$ d0 T7 v" b part := @.cont;9 v" i8 I% l1 p4 e5 X2 A
@.transpOrder := void;
3 X5 H+ k. _" C! L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! N$ H" Q% T0 A( @ @,root.eventcontroller.simTime);& V# g4 ^5 ~: z) |5 o
@.HasOrder := false;
8 p. M6 I2 i* e/ }5 }8 v' T6 H- o+ y @.DrivingHome := true;
2 f1 X. F3 S. ]( g rgManager.tryToStartTransOrder;( O5 z$ _9 g+ G7 d. R+ ^9 ? a
if @.Destination = void
" I0 N( B* Z3 P: O9 D6 O then -- no transport order for vehicle @1 ]. h7 C4 z% l& v
@.Destination :=5 Z! L6 [) o" E2 q
rgManager.nearestFreeStation(@,track.~);2 @3 Z7 ^# _! ?" J5 A U
newDirection(@); 4 p! w( k6 l2 E; m; m
if @.Destination /= void then! B [# w" p# \& X. Q
@.Destination.NumReservation :=
8 ?2 O) b: d/ c" n K$ O @.Destination.NumReservation + 1;7 V L* T, ]( d( ]9 g' w
end;+ ~* ~& C) i, a! F$ k
@.CurrIcon := "drivingHome";6 X3 G3 d9 X* U
@.DrivingHome := true;
9 F" P9 k* M! I8 _ end;1 P5 c0 I0 {% r6 E* f+ d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. ]8 |8 a9 `1 b4 E) t1 S. O& a part := @.transpOrder;$ O& p# g7 \4 V; P- r2 n
part.move(@);-- load part
8 b# a' A% Z, W9 d! e @.CurrIcon := "load";! c+ {: w( n$ B2 B5 y) M
GlobalDistObj := part.globDestination;% `' H. i0 D# R! n% Y
assignLObj := rgmanager.rgAssignL;
# y+ K5 u! l$ e9 C% P7 h9 {# G+ h row := assignLObj.getRowNo(GlobalDistObj);
% L: ^+ X1 J" [# x; ^4 J if Row = -1 then -- since 70
, T$ m, p3 R( A1 v L0 a if lan=1 then; C( A$ E9 W3 `$ \& c3 i. O9 y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 { V' E4 i, q$ h, q2 J, a
to_str("in der Andockstation: \"",?.~.name,"\""));3 r+ R9 N+ J, G. N% j
else" [' ^2 y) H0 S3 Y1 u# @7 }6 p
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# o4 Q( G( \. C, V
to_str("in docking station: \"",?.~.name,"\""));
. h, M- b( p V% n end;
. |4 d% V- w6 B) ^4 Y! y else
8 E" t g U" P+ e' W: V' C$ D @.Destination := assignLObj[1,row];
% q! n+ g2 P8 I; C5 e end; % g" l4 W# v4 K+ ?' D5 P+ _/ y. e
newDirection(@);1 x2 e6 F6 \; S: i
@.HasOrder := true;
1 b4 R ], t3 i, f end;
) k2 w. _6 n2 {. l, l end;
8 s* h, e) W9 K6 jend; -- of the method7 y8 U" t$ w" n9 f _5 j
|