/* called by: entrance ctrl of the object 'track'
6 Y5 n& k6 `" U7 L/ |; d: I*/
1 }& ]! W+ b. w$ Pis6 |6 [: W- i, a5 x, m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ X1 _2 T& \1 f& T. C2 L4 r+ Fdo
6 x* l" x. k$ | Lan := rootfolder.Internal.Tools.AOLlanguage;9 s- U3 z# r% @* ?4 m9 V3 N* j y
if current = @.Destination -- else return
- I7 a. w- A5 A8 ]2 \ then
5 X" z7 N; E: A/ @ @.Destination := void;# G& {' H- M1 ?
if @.occupied then: D8 A2 ^9 S4 N ~, d) P" q
part := @.cont;
3 ~# f# G F9 D" e; J @.transpOrder := void;, }8 g& Y5 q: B9 o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 w. i" w; q2 x @,root.eventcontroller.simTime);
4 f% \" \' @& K( x) ~+ g/ C @.HasOrder := false; y& |5 `' p3 \; e4 A& u" s
@.DrivingHome := true;
( a" v" \- y# ~) h3 h rgManager.tryToStartTransOrder;
6 E8 a, |4 H& ]) D; l g2 n1 I' ] if @.Destination = void
! g+ ]9 ~- }) Z- @3 } then -- no transport order for vehicle @
8 j G; [1 z+ z c. ~ @.Destination :=
f+ F% K! G1 y! m/ Q, f. D2 b rgManager.nearestFreeStation(@,track.~);
) _! I% s9 ~1 K; T8 d. b newDirection(@);
: p: F3 R% y, V8 G! {' r, P3 E0 P if @.Destination /= void then" m2 h1 [1 ]9 m& S- m3 E
@.Destination.NumReservation :=8 Q% x" o" p- r2 P
@.Destination.NumReservation + 1; q5 H2 e/ x' E. j3 c- P3 c
end;
3 ^% {+ ~5 K% p* F1 K$ m% I! { @.CurrIcon := "drivingHome";8 E) n5 N% ^ E0 m# K, p8 O
@.DrivingHome := true; |9 j- d- l" h T
end;( V& p: l9 G+ c9 I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 i! ?; E! m2 }- i
part := @.transpOrder;4 Q5 p2 }8 ~2 A8 e) n
part.move(@);-- load part( R P K0 k3 c
@.CurrIcon := "load";" H6 _2 V P! Y/ b& s
GlobalDistObj := part.globDestination;( e3 E3 h Z$ R0 @: ~4 j( R# k* {
assignLObj := rgmanager.rgAssignL;% h8 s$ f Z6 t# n6 q: \+ ^5 X
row := assignLObj.getRowNo(GlobalDistObj);
5 w$ C- Z/ R( F: l. u if Row = -1 then -- since 707 ?! c1 B* ^7 U6 N: W, k- d9 I1 [
if lan=1 then2 B4 ~" S8 M! F5 B- @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' G/ l+ [- D5 g" e! ]& s; o9 T
to_str("in der Andockstation: \"",?.~.name,"\""));
1 c& n- y6 R7 O9 J else4 x/ h R5 _. j2 M" Q, W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 ^; l5 u3 a9 ^7 y; T) Z1 w to_str("in docking station: \"",?.~.name,"\""));
0 Y# H4 X# t. ?9 U end;
- [* e! a' |) s' t6 ?+ F* \" C- N/ B else2 `5 ]' r7 x# r5 ?1 n
@.Destination := assignLObj[1,row];
8 E; C6 S3 r y& ^2 F6 D0 q end;
5 D& V& c; \3 ~% }( q newDirection(@);7 d! y1 ` F$ G
@.HasOrder := true;7 L( i J5 Q: n( K
end;' J# F. J. o" g0 e4 m
end;! |* ?" V! Z6 P! R) f0 A
end; -- of the method" V" f5 ^( q4 V! ~6 ^- s/ y9 F
|