/* called by: entrance ctrl of the object 'track'/ H8 x, a5 F7 T- D7 ~9 {
*/1 |, J) a- q" \
is1 X5 x- Q {! n* a9 i v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ h& S" V/ w3 I; c% A% E. Bdo
. S4 h" w' A x( Y. x6 _( g3 M' r Lan := rootfolder.Internal.Tools.AOLlanguage;
. a. {/ i3 Y- G$ E: J0 P if current = @.Destination -- else return; a2 A9 e# t3 |% O* n4 W
then: t; B/ y0 F; k* D6 b+ {6 u# J m
@.Destination := void;
) A4 P& a' N5 ]; v if @.occupied then
% v \, I, V1 g' c5 R part := @.cont;
$ D/ k7 N+ Z0 X/ i/ p+ X @.transpOrder := void;, f: l2 F' W8 G' p
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 b W' }* v# k. z! J9 p3 T @,root.eventcontroller.simTime);
, o) v7 c1 L! s/ }! ?4 x @.HasOrder := false;
: j2 C1 h/ p# \& V+ P8 V( k @.DrivingHome := true;2 H+ b0 Z; r/ M% Z8 Y5 @! ?% G
rgManager.tryToStartTransOrder;
0 H8 \9 w8 _, s8 O& u' q! K6 H% P if @.Destination = void
$ W# y L B. h) a& x/ c/ ? then -- no transport order for vehicle @, Z' M' I) ?. g4 B
@.Destination :=# s9 W j8 P5 ^7 e7 E, Q+ Z6 g
rgManager.nearestFreeStation(@,track.~);0 m$ b) Z7 x2 r+ L
newDirection(@);
- U$ x0 c; H) c, o. T if @.Destination /= void then
6 T) n+ H6 b2 ?$ G: C; ]8 E D- o @.Destination.NumReservation :=
; K/ V% J4 {' K- l5 ~ @.Destination.NumReservation + 1;) v8 w' j) E5 V
end;
% N* E @, M: N5 R4 S+ v @.CurrIcon := "drivingHome";
/ [8 B2 H! ^6 Y! j$ S0 D m' M @.DrivingHome := true;
r3 _+ w0 G P; ^- G5 g end;$ D3 R5 r6 j/ N6 S/ l0 T6 |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station: A4 X& ^( |7 A
part := @.transpOrder;" j+ R( n) u4 O2 \
part.move(@);-- load part
7 ~. o# v b: V( C @.CurrIcon := "load";6 `! u" E. v e$ o0 ]
GlobalDistObj := part.globDestination;2 E% @* z: \3 F v
assignLObj := rgmanager.rgAssignL;
' U6 ^* O1 ]# O' ^/ v- N3 g; | row := assignLObj.getRowNo(GlobalDistObj);; K+ l4 a( W8 u) @3 k" C& U6 N
if Row = -1 then -- since 70
5 [8 N$ A& j. }& `# g$ @ if lan=1 then) e( d: h6 H; {) V& B+ g9 m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" T9 R% j$ S3 c to_str("in der Andockstation: \"",?.~.name,"\""));
8 v, i, m: ^/ D5 E3 Q else
6 U' B: o$ ^0 {9 e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, M1 g& f+ W. x& ~6 m
to_str("in docking station: \"",?.~.name,"\"")); % `0 Y4 w* T+ n3 Z' B
end;+ V3 L; _$ w* E: X
else
) ~" I6 v# w0 m% O! N4 K9 y, @# G @.Destination := assignLObj[1,row];
. c# B% ^' |; s% X- h- B end;
: c# k; ~8 c! T& i X$ E newDirection(@);
7 p* x$ K. Q: ` @.HasOrder := true;
. x( U& }& I! K0 a: b& [( ] end;
9 }1 l# Y- J* o1 E: e. f end; ]0 q( \6 S* ~0 I
end; -- of the method" h# m- p; k2 Q8 ]) {7 {
|