/* called by: entrance ctrl of the object 'track'
}! U- v$ L7 P*/7 r' Y; r9 M# X/ u3 V' v
is" H: _# `- a# K5 x: f/ V
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, K4 M; M$ m! [' V' ndo
" i/ c$ [. T; W2 v Lan := rootfolder.Internal.Tools.AOLlanguage;8 J7 q0 A; u8 D h* b$ b3 E
if current = @.Destination -- else return/ [) Z8 S# ^# v. r9 C% w" ^
then
' j" E% H! X/ u& ]3 R @.Destination := void;" p' ^$ H3 y" A; R
if @.occupied then
) ^- P9 v7 Z0 a, e part := @.cont;9 H) K: i j! ]8 t N
@.transpOrder := void;8 v- y. o3 [' x! d* H' O
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 z$ m( j. Z5 I) m3 q
@,root.eventcontroller.simTime);
# N1 E: q, o8 ?& x! T @.HasOrder := false;
' k1 _& D! I9 U+ r @.DrivingHome := true;
6 F( U5 e1 |. X0 h rgManager.tryToStartTransOrder;' ~6 [5 l- X4 b; h* [! B5 _
if @.Destination = void4 }( i7 w$ }% c! f
then -- no transport order for vehicle @
, [% d1 @9 k4 {% b @.Destination :=
( m) p5 p0 e. j& | rgManager.nearestFreeStation(@,track.~);7 Y+ Z9 _- M- R- F- F. P
newDirection(@); ) \6 Y+ p) A+ }! X$ A4 ^+ O& w
if @.Destination /= void then% h! E. _. u# A, r0 a' f
@.Destination.NumReservation :=
* }, b/ j- y9 l5 ^9 V% Y$ ^ @.Destination.NumReservation + 1;3 S( o' [" d4 j1 h
end;& F2 @. ]+ _# j
@.CurrIcon := "drivingHome";
0 B* I& X% {5 J* K @.DrivingHome := true;& j$ x( ~/ w* i( Y% Q- j8 [% k
end;) X5 n# C! ^0 x5 P0 T
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ [. B# q) A4 l4 g \" y& Q7 h1 ? part := @.transpOrder;
) Q7 p+ K3 B/ ]" ^/ ^* ~' r: Q, O& V/ |9 A( O part.move(@);-- load part" H' O9 a0 ^4 c
@.CurrIcon := "load";
; e3 G+ q) ]" G) e. f GlobalDistObj := part.globDestination;
5 k- A- C& H, P% u assignLObj := rgmanager.rgAssignL;2 T8 Z; |$ b3 {) u
row := assignLObj.getRowNo(GlobalDistObj);' c6 X) k* U) k7 x: A0 V6 m; h
if Row = -1 then -- since 70, [4 c4 z! n: c7 }/ Z! |. U/ E
if lan=1 then) }! c2 n! e: w6 d3 G' \3 b3 [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ _6 B0 l" @- @ Z/ N; x3 p to_str("in der Andockstation: \"",?.~.name,"\""));
% k9 P$ x8 e, q else
; P' e$ J; {+ c; M promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) ?6 Z2 r; J T1 Q- c
to_str("in docking station: \"",?.~.name,"\"")); 7 V O5 v& f1 q3 e& b! G a
end;5 x2 s d" S' w% {
else
4 L R+ N9 {+ ` v) Q# _0 _1 | @.Destination := assignLObj[1,row];
4 Z) d$ e& D1 \( P+ u2 K( y6 P% j end;
7 w9 b0 Q, e+ Y7 U newDirection(@);4 I$ ^* O7 m0 i# ]5 j2 F; i+ S% Q
@.HasOrder := true;$ p- u, \) o9 D5 |
end;, q! E2 w0 R" t/ Q
end;
6 d3 t1 L3 H: M$ A% eend; -- of the method) @7 h; i) N _* ^0 ]( x+ ?2 |
|