/* called by: entrance ctrl of the object 'track'
L9 `; E% M6 d, E4 ~, ?7 H*/
* S* `/ Z3 F+ a4 his
4 N! m& I! S/ @0 b7 ?0 i. ^% N6 b part, GlobalDistObj, assignLObj:object;row,Lan:integer;. {' u, q, P) Z, q9 n, v5 V; T
do. D# t8 C7 g6 D! }
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 l4 e( ]- T% d if current = @.Destination -- else return
. w' b# T; ?8 G* X then; F* T2 e/ h% N' R
@.Destination := void;
% h8 l/ m; U5 ? if @.occupied then: U( [6 s1 k; ?/ O' {. a A
part := @.cont;
2 O# H% m* a6 p @.transpOrder := void;
2 G) a! |( t) }( t K7 J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; r8 A& q. H. u$ ~. C2 o1 q7 D5 U5 x @,root.eventcontroller.simTime);
% ^' j5 c+ I k$ c2 t: j4 c# b% h @.HasOrder := false;
' |5 z- ^9 ]2 G* J @.DrivingHome := true;
+ ~' q/ f! {2 [; U& r rgManager.tryToStartTransOrder;
7 Q8 [( z3 Q w1 r- f( b6 K7 g if @.Destination = void9 L/ i! F. [2 ]3 M5 L3 a6 W' Y
then -- no transport order for vehicle @
3 Q2 {! m- y5 m4 N1 d& T0 w' R$ h @.Destination :=1 Y+ j! E" |8 a# `0 Q
rgManager.nearestFreeStation(@,track.~);
6 F; o+ W" w4 c% c* i; f d newDirection(@);
H) D; p' e; Z5 v2 ~0 d if @.Destination /= void then- W- d# |. }. h& \* f! M
@.Destination.NumReservation :=
' F; X5 n+ f$ b' d @.Destination.NumReservation + 1;7 `; z" F+ r, X# @. e/ N8 L2 d
end;* b9 N1 v; d8 X6 t( _4 T, o
@.CurrIcon := "drivingHome";% H1 q/ A& `7 r. O
@.DrivingHome := true;
$ b6 W' b" q1 X. u1 |4 \ end;
" J2 o- V' n4 D# J else -- the vehicle @ is empty, both vehicle and part are in the same dock station) r& `2 J7 f$ l; j6 U" P Y2 j7 a
part := @.transpOrder;. U. `! [- m' q* T4 \( S
part.move(@);-- load part k2 D$ e- c' {" C0 ]. S
@.CurrIcon := "load";8 j) a: u& F' `, T. A' g4 o- _
GlobalDistObj := part.globDestination;
4 g- t1 w2 n. \0 Q% P4 b( i+ g assignLObj := rgmanager.rgAssignL; O3 \( `: r [' R
row := assignLObj.getRowNo(GlobalDistObj);
, x- o, q- c( c- J: U% G) s. H8 i1 B+ Q if Row = -1 then -- since 704 k" w$ }7 S3 V+ r, O
if lan=1 then
* r$ B; H5 y* C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 K/ m' _7 _+ _ to_str("in der Andockstation: \"",?.~.name,"\""));
, B7 X$ `" k2 g else1 `' D# Y t( s2 n
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ u6 x* \' e9 x2 v to_str("in docking station: \"",?.~.name,"\""));
9 N- x# ^, B* k: { end;
1 z0 w* X7 R5 n% x else
4 C g- r3 }' W3 y+ q; y h @.Destination := assignLObj[1,row];" l* m$ e) R7 V& ]
end;
! z. Y; i7 t1 _0 E d; K newDirection(@);
8 |, F8 v* L3 v6 b* D @.HasOrder := true;
4 N* }- U$ R) O; x6 j# {0 ]. I: W end;2 k: y3 p1 f3 X' Q' T# S8 _
end;, t2 c* ~$ O( _7 \
end; -- of the method( K( H: M; s1 n* p* ?; G4 W+ ?/ B
|