/* called by: entrance ctrl of the object 'track'; x$ N0 A% S# }2 Y
*/
# Z8 Q. F7 k( E+ {: dis
5 K0 |8 g- w) S3 S1 r4 ^4 s+ ^3 [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, X5 i/ _5 l, a! xdo) o' Q; u1 k+ s) _5 u# n
Lan := rootfolder.Internal.Tools.AOLlanguage;: u2 Z$ C6 W! [' x. u# F
if current = @.Destination -- else return
, ^- h5 L8 U3 w& l R: e9 ]7 i5 L then% C# Z0 o$ C+ J6 z
@.Destination := void;
5 m6 B, ]9 Q8 {$ g' W1 { if @.occupied then
5 R* E8 r* }3 ` part := @.cont;
' v6 S/ u% u( ]4 v$ ^# W+ S @.transpOrder := void;
% [9 i6 r: _8 ?% d: e |5 e9 _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& ^1 l/ h& M) v
@,root.eventcontroller.simTime);
/ v! f* S' i c4 y$ E" I. s @.HasOrder := false;5 u- w9 M/ ~% b: H' {* F0 C5 k
@.DrivingHome := true;
: K( g z# k, s& n, p! I4 d rgManager.tryToStartTransOrder;
! U6 Z5 [) f8 Q' k/ {1 I if @.Destination = void
! O0 U( [: m ^2 x0 l9 {- J then -- no transport order for vehicle @
" z, T+ |- z; @; O# ~3 U; ~/ c @.Destination :=
# _! j" _& a% Q6 V# B rgManager.nearestFreeStation(@,track.~);4 w& q. Z9 c. i+ M5 F
newDirection(@); , [2 Y$ P# O6 q6 ~( `
if @.Destination /= void then
6 U# q8 X2 Z- I& t1 O @.Destination.NumReservation :=# _* i# |, h( N0 c7 t
@.Destination.NumReservation + 1;
1 n, t& _) H9 S* @( | end;
' v; s4 \# h- B/ x) I) i9 x0 o @.CurrIcon := "drivingHome";5 C9 E5 G( {4 d$ h; y
@.DrivingHome := true;- w. P: z- v5 n" h: G
end;
^, `! A7 W4 E( |/ ~& `0 `. k; v else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" \* u" k' L; C, \2 r part := @.transpOrder;/ } i$ o1 M8 k: z3 K
part.move(@);-- load part
1 \ [. p o% A2 k; v @.CurrIcon := "load";
3 x$ C( L8 z& R+ ]* M+ t GlobalDistObj := part.globDestination;
0 }6 R; M- `3 E- m assignLObj := rgmanager.rgAssignL;
4 ?$ h$ X: B0 @. ^4 {6 o- R row := assignLObj.getRowNo(GlobalDistObj);! b; W% w! \ M
if Row = -1 then -- since 704 e/ `1 Q( z& X# Q
if lan=1 then
: q9 d% l2 K0 n d; v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" x5 e3 H; l- Z. J- p to_str("in der Andockstation: \"",?.~.name,"\"")); D% ]% o C/ }; p* f/ W% a2 \
else' L& J& S8 K0 ]- U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, D* A" ~2 Q9 _7 x9 N% r, C, ~
to_str("in docking station: \"",?.~.name,"\""));
4 d3 }" [0 x$ m6 @* V0 e+ j& z9 | end;
9 @5 p6 [# E* L else
; M) }; H- x0 j* N- U. \9 X; Y @.Destination := assignLObj[1,row];
& C1 [+ G6 r* k( ~ end; ( y d9 K8 ]. D& o. V% ]
newDirection(@);* Z& |9 r4 i. q) q7 b2 C, V9 e
@.HasOrder := true;9 y! o8 I ^/ }2 \8 K
end;
' w$ i# q* l& t, G end;
7 Y9 w) i9 |7 {6 Z- Jend; -- of the method# V# Z; t, L- y# D' |; ], r
|