/* called by: entrance ctrl of the object 'track'* a% h/ N% `# U! N0 h
*/
: E/ t6 T" U1 ^is
6 C! J7 o" E2 {2 N1 E/ L" l part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( S6 N. H3 ~$ K4 p& Kdo
4 h) P) h8 r) |3 ^1 `3 z, v# }$ R Lan := rootfolder.Internal.Tools.AOLlanguage;
7 h2 H4 |$ ^# v6 N1 Q if current = @.Destination -- else return
( w' ]0 a; H, [; _' Q6 K then* s! O7 `/ a! ]( b0 `0 y$ i2 K
@.Destination := void;' U0 @( u0 }# |
if @.occupied then
4 w: Q$ [6 W) j2 F e1 @: B) W part := @.cont;* D [4 K$ ?6 V% R
@.transpOrder := void;1 I: `. @! m1 l( p/ |4 ], b/ p
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 J+ @% g5 h0 I
@,root.eventcontroller.simTime);
+ A5 S! R! Q9 P. l) `0 \% C* Y) N @.HasOrder := false;
2 _7 D; N- F" @6 k+ b! T. f# A @.DrivingHome := true;+ x# }1 u, E' d& x3 ]# H: ]
rgManager.tryToStartTransOrder;% ~( W0 _) [: C0 [
if @.Destination = void; G7 p2 j6 \- O7 R
then -- no transport order for vehicle @
0 Q% e! t6 N* W @.Destination :=
4 Y, `, }- p( Z" B; q. \+ R$ V rgManager.nearestFreeStation(@,track.~);
0 E# p0 Y" P2 d$ E$ P newDirection(@);
, |6 b& C* ^1 D' E! n# C1 T if @.Destination /= void then5 | w+ \2 |( b
@.Destination.NumReservation :=/ B; p6 w3 t8 U
@.Destination.NumReservation + 1;4 o k/ \, m9 u u& y: h) {
end;
0 a$ }5 |- C' V @.CurrIcon := "drivingHome";4 Q$ ^0 N0 S4 T
@.DrivingHome := true;* X6 z& L6 b* U, C) t& I) m$ [
end;
8 U0 [0 ?2 e& Y' z' w4 G else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 w* i( @. r3 a2 ~' O8 r; X6 S part := @.transpOrder;
* T W( E/ ?1 ?$ U: [ part.move(@);-- load part+ G1 A' x' F7 p4 V$ m2 E3 N4 i
@.CurrIcon := "load";) E- m; f" c0 V
GlobalDistObj := part.globDestination;: e$ f0 P' N# x; u2 Z( A
assignLObj := rgmanager.rgAssignL;
1 c9 h; H( L( q N9 _ row := assignLObj.getRowNo(GlobalDistObj);
! v7 G0 V( J4 g# ` if Row = -1 then -- since 70. u6 V# n6 q) B7 i- U/ {* M
if lan=1 then
( e* f9 y3 y& i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 x1 p( d, R- V% ], N to_str("in der Andockstation: \"",?.~.name,"\""));
" B u R& @( M4 K* \/ d else9 _: k0 y; F$ j% \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: g1 O7 |% k+ ~* B
to_str("in docking station: \"",?.~.name,"\"")); " e; A9 | ?3 K3 w/ k
end;7 Y4 G/ Y& b5 @3 w
else8 H3 a2 [9 W, k& H. T5 F
@.Destination := assignLObj[1,row];
! y2 L" N7 i( {4 F" w end;
; k ^& s, u8 _* l s newDirection(@);: l, x3 U7 f5 K* [) X5 ?0 w
@.HasOrder := true;
o6 |& X% s4 L6 G) N end;
6 i3 c" N, I" o" x, a end; K9 X% P, M. r
end; -- of the method
6 E O. z! k! `- ] |