/* called by: entrance ctrl of the object 'track'4 u# U! }! d' S
*/
* X' S) [; f/ p8 n+ T) d$ S- i% Gis
% c/ j5 \8 R& t0 M! g5 Z7 J! { part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. J2 ?$ L+ m2 S# ndo, H& f; S! p$ d7 h& D7 {
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 j' v/ E" u o! W7 D if current = @.Destination -- else return2 {! q3 Z9 W1 u: V. |( w. F6 C9 C0 O
then' L" _& z; N0 A* N, R9 O
@.Destination := void;
1 q1 u+ v# l1 M# r if @.occupied then# r# r. i4 l1 G ?9 i; D
part := @.cont;! D- [! O0 M# J5 h1 m. D
@.transpOrder := void;
: a" e" `6 ], ?% f# x0 \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# ^0 \. i- r0 G @,root.eventcontroller.simTime);* V5 d2 b/ w( o4 ~& Q- r! D6 R$ {
@.HasOrder := false;; m! N X: \3 O/ G8 f9 X3 X
@.DrivingHome := true;4 n/ M D6 P% ]8 B2 H
rgManager.tryToStartTransOrder;
: J2 r' `4 n+ P3 ]- t. U if @.Destination = void: E/ b! s1 y* g6 M3 Q
then -- no transport order for vehicle @, @( y& A9 R. [. c5 F" a2 m9 T
@.Destination :=) f1 X b: T% k* `3 y1 ~1 P1 D
rgManager.nearestFreeStation(@,track.~);
7 \& ~& W* b+ V# r. G$ P newDirection(@); & w* l) f8 X7 c n/ k
if @.Destination /= void then! c# N" D, p+ M8 }
@.Destination.NumReservation :=( }5 R) p+ k/ L: y
@.Destination.NumReservation + 1;
/ Z% ~/ t4 z& ?0 J end;
! v* ]* Y& O* p0 h# n @.CurrIcon := "drivingHome";
% j" E! K" P. J4 ?! ] @.DrivingHome := true;
: r2 Q* O/ Y# Y7 r4 h end;
0 c8 C7 q+ _! }" B0 I5 j2 B5 V2 G else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 i' \8 }0 Q" X' H part := @.transpOrder;7 \1 s% L `# y; S/ r1 W) q* p
part.move(@);-- load part
" e7 l& J$ x) W* c6 V# Y- ?" c @.CurrIcon := "load";
5 w) C5 a" F& X# l GlobalDistObj := part.globDestination;
/ K& d. {& Z) Z9 T, f assignLObj := rgmanager.rgAssignL;9 w1 G. {* }* F; V
row := assignLObj.getRowNo(GlobalDistObj);
+ b' \/ j/ H% d0 z* K/ c if Row = -1 then -- since 70
3 o3 S7 U! l2 w# z if lan=1 then
- @; W3 }1 Y; G0 C. q+ K z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# V0 n* W# ]) T7 R& t5 z3 R3 A to_str("in der Andockstation: \"",?.~.name,"\""));
: n& h' z; i7 g! s. C' v else
! h( f" Y+ i( \) l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& d C# u7 |8 l ~3 n' B3 ? to_str("in docking station: \"",?.~.name,"\""));
- z u2 {2 | c9 [) P5 |) C end;
( K3 Z+ @9 @: u else' t* B1 G2 x) |# X' P0 H3 U
@.Destination := assignLObj[1,row];( s) g; ^& u5 d3 w
end;
* J7 @* t' o. d" [' N newDirection(@);
1 U( c4 g, Z4 U9 P9 X+ j: r @.HasOrder := true;) E4 Z3 W2 g; @: y8 A0 {
end;
1 Z Q6 J$ S( i! E/ k2 o1 Z end;- ~1 V- c; k+ A6 {
end; -- of the method0 l+ M$ ]. b& a+ ^2 s1 G
|