/* called by: entrance ctrl of the object 'track'
% E* k) k' x' V6 b* l5 j8 [*/ [7 l1 v# O) B9 _
is
0 n% j8 I* P, Q6 _$ k4 P part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ a; W" m' |6 h9 K! Y
do6 @# v- a( {' s1 |# \% p# `
Lan := rootfolder.Internal.Tools.AOLlanguage;
: b( W- s2 K5 a/ N* E M if current = @.Destination -- else return
3 S- O* b2 T- v then
/ K3 P) n9 C$ X2 l @.Destination := void;9 |- A( x9 S) d
if @.occupied then( K" r- a0 V8 ^+ Z0 G" Y
part := @.cont;! v" Z. C8 E r1 }8 F* r
@.transpOrder := void;
( d! r4 K5 k. c& `. u- \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 {0 e) x* y# k! M* R) j! z @,root.eventcontroller.simTime);1 m/ y# n' t* F4 D& s' g7 X/ _
@.HasOrder := false;
+ P: E; k0 j2 q- \ @.DrivingHome := true;" h# U. D) b% Z/ B ^, e3 s# H
rgManager.tryToStartTransOrder;3 F" h% z5 @! O& P4 l6 F5 `; b
if @.Destination = void
: d4 f. Z* `- U then -- no transport order for vehicle @
' Z' l& D1 l6 t2 c @.Destination :=/ c8 p3 C* g/ D- w6 w& d' N
rgManager.nearestFreeStation(@,track.~);" Y9 \' n2 G9 ^
newDirection(@); 2 k/ ? L0 n6 k& |
if @.Destination /= void then! Q& Q+ {, t" \+ F
@.Destination.NumReservation :=5 {- f' P6 a% i! t
@.Destination.NumReservation + 1;
( X0 O1 m! t0 h) H3 q end;4 u" x5 C4 o0 t# |
@.CurrIcon := "drivingHome";
) e. a) U, z1 a- P @.DrivingHome := true;
% z& @8 `& ~( F end;, v1 m7 K6 z& Z4 s8 v) A) j9 }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
X/ W" D5 t4 h part := @.transpOrder;
. c8 P" N' Q) _# Q' z part.move(@);-- load part" ]" m+ N) A( a$ d( j7 v( {
@.CurrIcon := "load";
* W# w3 c1 B$ p, U. D0 @" D" }9 | GlobalDistObj := part.globDestination;3 Z4 I5 `/ Y: {& e! l0 s% i6 k
assignLObj := rgmanager.rgAssignL;
1 U# c3 m. r: \- I row := assignLObj.getRowNo(GlobalDistObj);, O( x3 z% M3 U; f+ D/ {
if Row = -1 then -- since 70
4 A: ~6 r+ | E& u6 ]3 Y9 e( U if lan=1 then
; ?1 O3 a5 D- b+ \- U: g$ ~- k# V promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ S# L6 P5 b2 @2 Z! Z0 [
to_str("in der Andockstation: \"",?.~.name,"\""));
) u8 }; i6 y: a' O, g* Y; X# I else! L% F2 f& K" X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
|" z6 z0 l! j: z to_str("in docking station: \"",?.~.name,"\""));
6 b* \) b) B) W% p' m4 U end;
( W0 w0 G9 ]7 {! ^6 K else
7 i8 r; ^0 {" r% D- o3 j @.Destination := assignLObj[1,row];
+ y. z' A2 H2 C0 Y' W6 j! E! [: M end;
3 J M0 T& @+ Q- N0 N newDirection(@);
- ?9 g; P8 q9 d( j5 ~4 Q0 v" U+ D @.HasOrder := true;4 ?0 S! n* f$ o% |; t( a. M
end;. M8 d$ m/ ^7 {* K" A
end;$ I0 |3 z! d2 P+ v# ~
end; -- of the method
3 k8 p1 G' d6 \) a4 ~' H |