/* called by: entrance ctrl of the object 'track'
0 w: A& a K5 k' A1 d0 A*/8 X8 ?3 _" f: u3 E% {8 q: j
is6 }+ A, u8 Y# j @2 C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ `0 |8 A$ G- i! p% j. q1 U
do+ L+ M7 j4 L8 P$ z' x* |
Lan := rootfolder.Internal.Tools.AOLlanguage;% {$ X5 [4 x1 y1 C7 |7 ]
if current = @.Destination -- else return
8 V' m {) t; {; \- l2 J) w) g then
9 }: h: b, l7 z8 q/ g @.Destination := void;- P7 A7 q: f7 t; k0 V* B" Q
if @.occupied then" e8 J: h$ P2 j4 r( V* ?
part := @.cont;
) O' _/ f/ K9 F9 { @.transpOrder := void;% I1 o/ M' |0 E- [/ f& r& D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" |2 G% b+ S# t4 E+ w, N @,root.eventcontroller.simTime);
9 b4 C# p1 X9 [ E6 W( l( a: t \2 a @.HasOrder := false;$ a6 M$ j( z9 E9 ~! Y( G
@.DrivingHome := true;
# f6 _* `2 Y& \& W4 R8 U: q! w rgManager.tryToStartTransOrder;
6 ?6 b- c* A4 ]$ a, Z if @.Destination = void
! K' R) g! J/ E% S$ x# ^- L$ J then -- no transport order for vehicle @5 D' r9 `& e7 _- x7 v3 E& e1 T
@.Destination :=
, g2 s! x3 i0 d$ y5 G- ]# d rgManager.nearestFreeStation(@,track.~);. i8 v, {& W: h! S! g
newDirection(@); * b H0 I/ \& r. T0 k5 `' @# l
if @.Destination /= void then0 p% Q+ p6 L2 G8 P2 s6 t9 R w& N
@.Destination.NumReservation :=1 b4 Z: g6 u; i/ e+ r+ |
@.Destination.NumReservation + 1;9 K, M O! i0 N/ I- a& Y7 ]
end;
' Y- B# T; G' o0 H @.CurrIcon := "drivingHome";
3 @' D; \0 R5 T' \! O4 ?7 `$ D @.DrivingHome := true;
+ j# ~: O% [: W+ _6 A% t X end;8 j* o5 M- d8 X1 I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 C8 j& [ D6 Y' H- S( X+ N
part := @.transpOrder;
6 d/ f. }0 c; l( n# I% V8 n+ Q+ R part.move(@);-- load part Y1 Y! q, C6 X9 H( E
@.CurrIcon := "load";
/ F5 Y- V) @; t GlobalDistObj := part.globDestination;
' t |. S6 _2 R0 Z1 j assignLObj := rgmanager.rgAssignL;0 P: h* v `) a$ ]
row := assignLObj.getRowNo(GlobalDistObj);
1 m) E. x1 X$ R5 t if Row = -1 then -- since 70
$ J# j* c, c% |8 _' H* b. s if lan=1 then: e. V# c5 G# p u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% S) s/ X! B! o* ~5 b, e to_str("in der Andockstation: \"",?.~.name,"\"")); Y# t6 h0 `$ q4 Z6 e
else
) y, p+ k5 d" j0 B* H promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, l$ f7 a9 X( X9 L
to_str("in docking station: \"",?.~.name,"\"")); 9 }4 w! I6 v- a: c P" h" @( r
end;0 n7 V. Y7 ~+ i; {, R
else
$ [2 J# J- k( C# N3 r! c( [% k" I6 { @.Destination := assignLObj[1,row];/ _- q! o4 l" P) v
end;
; H9 q% G3 R+ l newDirection(@);
/ i( w3 A) u3 ] @.HasOrder := true;
3 q' d( L4 N4 h% J end;: I, |" u3 f2 G; Y1 ]6 f
end;$ ` b, o( j$ N$ E9 b
end; -- of the method" L5 \( T' k7 C' v0 P
|