/* called by: entrance ctrl of the object 'track'/ n8 a" G |: y- {( ]
*/
& H: e7 V; _$ yis) w7 e- o" x }* Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# M3 @9 e3 X# y, v" p& Z
do
0 g+ c4 h" X! b Lan := rootfolder.Internal.Tools.AOLlanguage;# q) ^7 X- V) U( ?" l
if current = @.Destination -- else return
5 |/ q- E, E& M then
$ m/ `4 G7 ^* v; B; h8 l @.Destination := void;
$ J2 N6 c# H, s' A* B+ s if @.occupied then
1 B' u) ^" l/ f* O part := @.cont;
/ P8 x% ^1 l' A8 ]* x$ w @.transpOrder := void;+ d: \# o3 `: r$ J! N' K
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 T3 m4 F+ Z* A! |! Y3 ` @,root.eventcontroller.simTime);& A* c) g; X8 x( q* ` |2 v
@.HasOrder := false;
9 R' m' Q! r- u' ~. H: a @.DrivingHome := true;0 b9 N1 s5 H# a5 v' @
rgManager.tryToStartTransOrder;. ?% M' e8 I( c% X& x3 [
if @.Destination = void
( }+ C6 x+ z9 G! @" c then -- no transport order for vehicle @
, t/ ^. g( J6 ?) @ @.Destination :=' H$ i; F9 q) E, D e
rgManager.nearestFreeStation(@,track.~);7 m* D1 t% w# \- M
newDirection(@);
6 I, s! D1 |; K- }3 p5 ]2 i1 {0 N if @.Destination /= void then
: H2 z. ]( D& G+ l' d @.Destination.NumReservation :=
& G3 m/ T$ Y1 R2 r [% s @.Destination.NumReservation + 1;. O0 v" b1 y1 I
end;
$ W% G- q/ D+ p( z2 D @.CurrIcon := "drivingHome";! O4 X) Y6 t D7 H
@.DrivingHome := true;
, j4 u/ q* |7 t' W, z+ ]7 S+ v3 s: N end;2 d! e! H" x- d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( l' b3 @) B ? I/ L$ h. f
part := @.transpOrder;4 X$ f, o* n9 O, L
part.move(@);-- load part4 \. w% O( [) s7 }1 o% P$ e
@.CurrIcon := "load";
3 o% x4 P: o0 {, A' k GlobalDistObj := part.globDestination;- U' v, B% P% q1 C; a. g
assignLObj := rgmanager.rgAssignL;
: H- C6 [: y. Q7 R9 {* N: W row := assignLObj.getRowNo(GlobalDistObj);1 l- y$ i2 s- ~ t
if Row = -1 then -- since 70
7 m5 o! ~% z+ [3 G5 _& e6 ]; d if lan=1 then
3 O" e0 X: @, z5 ?7 s8 o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 L# R& V# p# T, F% o* a% W
to_str("in der Andockstation: \"",?.~.name,"\""));
$ S2 d n/ P: n+ e! T; \8 {; v else) z8 L3 h; Z0 j$ B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 p8 X+ Q2 O/ P: Q7 c
to_str("in docking station: \"",?.~.name,"\"")); 4 L* B9 D) ^( v: \5 S
end;
& [$ s7 n9 {" b0 S else
& X6 I' u# X/ V1 _3 z& G0 J @.Destination := assignLObj[1,row];4 K3 @( H" ]( N
end; , a: |; B( r- d$ z8 f
newDirection(@);
3 ?$ Z' J s5 O! X @.HasOrder := true;) s0 W k, a" y
end;" K. T3 J9 \+ R' @' ` S7 u( G
end;" S) S+ h# S% j) `
end; -- of the method9 P2 R& ]; x6 l* b5 D' m
|