/* called by: entrance ctrl of the object 'track'
# I+ {4 t0 ^( j S, g*/# n* K: M( F( b$ D0 F9 }3 v
is
% S) C0 X6 H- K5 ~1 W X0 z- Q( [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 `8 b$ k2 s; D" i) Q3 @1 T
do
" X6 M0 f5 y; A/ b. q& Y& C- \0 t Lan := rootfolder.Internal.Tools.AOLlanguage;0 G& n' e# P$ ?& J. E M1 U
if current = @.Destination -- else return
4 i: C% \1 `" _+ [; o; f9 H then+ v2 Z6 N* U9 R/ Y
@.Destination := void;8 [/ X5 [7 `8 Q: K) o
if @.occupied then1 O. C4 E t( L
part := @.cont;
) @$ O5 Y1 o; _ @.transpOrder := void;
# j6 n9 ?: X/ S- f0 i# k) y; } part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 B) g- z9 J* ~4 e, j3 g @,root.eventcontroller.simTime);
2 ?7 E4 N- _( j2 B% {" h; m( I @.HasOrder := false;
# v E8 m% t0 r' {7 r @.DrivingHome := true;+ j( @. {3 O. F
rgManager.tryToStartTransOrder;
. [2 K! ?6 @, X4 u T: K8 Y if @.Destination = void8 J3 R, V' `: P% I
then -- no transport order for vehicle @
$ N( \5 y+ V% Q# x' m @.Destination :=$ ^2 i. y6 {$ e
rgManager.nearestFreeStation(@,track.~);
6 _! A# v* ^* M7 N4 i4 r newDirection(@); ( c- I* b: Q: W# U, h; ^ ^
if @.Destination /= void then6 \; ?5 ]+ r1 z" m
@.Destination.NumReservation :=
1 b+ _+ U# x, [& j* P l, `4 O- g @.Destination.NumReservation + 1;
" E1 d6 A& W/ p, v; h S end;) c* O! l& ]. o0 U0 B
@.CurrIcon := "drivingHome";
% Q9 _7 Z$ o2 ^: _9 M @.DrivingHome := true;
6 V7 `# z% F+ h0 d end;
5 I3 _4 e/ x4 B, p6 w. `1 A1 J else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 o1 R) {5 `7 T part := @.transpOrder;7 w, X1 T" G2 v7 w4 z5 R
part.move(@);-- load part
9 i8 n9 J# b$ s) [. @! A) r @.CurrIcon := "load";+ ^2 e& l7 q+ O1 f/ [
GlobalDistObj := part.globDestination;
# c9 e1 B! U+ L% i! L- o* X+ l5 D assignLObj := rgmanager.rgAssignL;* X1 n8 {# ^! c6 g1 ?1 C
row := assignLObj.getRowNo(GlobalDistObj);
! t( `( e, w# g if Row = -1 then -- since 70
( R7 E1 a) \4 l, r5 s' i if lan=1 then; `7 d1 R- f. }" ]7 l" m# I7 l
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: f. k8 o2 U5 s
to_str("in der Andockstation: \"",?.~.name,"\""));
; `! H+ z3 O# h1 C1 P else
! f' }9 D; Q* [& Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 a/ X; h$ z" m# g* `* X" w4 U
to_str("in docking station: \"",?.~.name,"\"")); : o. K" [0 r# {9 {! n, n+ ~" ^ b7 I% _
end;% d8 G/ f' h9 u* B& E
else
# m" I, f9 C. N. z @.Destination := assignLObj[1,row];
3 _# p# z1 Q2 q4 n- \6 B end; 6 I# X- Y- ~6 p F( P$ Y/ ^1 z
newDirection(@);
1 W) n) L2 d t4 ]/ [+ d/ p) n5 p @.HasOrder := true;4 G7 J# Q( s$ i4 h( z6 Q
end;
/ i; P8 [7 Q+ g [" j end;. X" u y. J3 Z
end; -- of the method% x- ]% \9 j/ h- q# s+ u
|