/* called by: entrance ctrl of the object 'track'
n* m M' C3 E" d2 ?*/
4 C" Q- y+ b0 B& t+ q7 vis1 d: w. \$ @! z, u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' y2 s# E% ^ U! j! X
do
) n" o9 a$ r; _7 x Lan := rootfolder.Internal.Tools.AOLlanguage;, l5 m' ?0 V% C) W9 Y
if current = @.Destination -- else return
! F9 ~ J D8 h" Y ?! M% n, I& l then- X! ?# b- ~7 n0 E
@.Destination := void;
( n3 |+ H) u. N$ m3 v# V7 l if @.occupied then+ q( m8 a8 i3 `( g
part := @.cont;
4 y$ }2 g J# x# l& ^% ~ @.transpOrder := void;
7 ^) z- y# _5 n7 D2 v& w' I part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 R. R5 s* } C% r* r @,root.eventcontroller.simTime);
% x" _: J. l5 } @.HasOrder := false;
* G# W6 K$ J9 k8 W @.DrivingHome := true;7 P% i5 r6 M$ E) [: ^
rgManager.tryToStartTransOrder;
- q" _2 X- @% \% F0 i8 W6 _ if @.Destination = void8 b/ g4 [+ r0 G- f! P- C0 y# Q
then -- no transport order for vehicle @
8 _* ]- {4 `1 q @.Destination :=/ y. W* V: _( Q. U/ O
rgManager.nearestFreeStation(@,track.~);
8 D7 ?( c/ U# h newDirection(@);
: _4 D% y/ s" d; S$ r5 Y if @.Destination /= void then/ q7 L/ k( \8 N9 j' V; z
@.Destination.NumReservation :=) k6 `) G+ {+ M8 N$ z& F& ~
@.Destination.NumReservation + 1;
# l# Z* }# L4 s. b( q end;
% X5 \7 e5 A3 _# S! O: W5 Z @.CurrIcon := "drivingHome";
4 W" u& Z8 u, n4 I+ r1 h: L @.DrivingHome := true;
6 e9 A, m& J; I* s5 K8 r' S end;: H# D. b8 T- B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 w0 r5 \7 `2 d1 M( ^8 s! b h part := @.transpOrder;3 Y: W5 @) s3 l) j4 W
part.move(@);-- load part
- T& k* G1 w, U: `. [" E1 W @.CurrIcon := "load";0 @5 H5 ]# _7 Z" k5 Y
GlobalDistObj := part.globDestination;
; K1 o ], m1 A% G8 ~/ a8 u assignLObj := rgmanager.rgAssignL;/ h; q/ [/ R8 Y, T( p
row := assignLObj.getRowNo(GlobalDistObj);2 g: a1 `7 o2 p! T
if Row = -1 then -- since 70
~3 u& v! D; M n# W9 \ if lan=1 then7 q1 l' ~ C" j" F1 k. l) V1 F& w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 s9 S: y: [! q4 Y' q to_str("in der Andockstation: \"",?.~.name,"\""));
. u" R. {" i; b, s2 [ else
* n0 ]2 A; k+ L8 R! a: }; x; c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ z/ P# T% I) |( G
to_str("in docking station: \"",?.~.name,"\""));
K4 K' q! f2 ]8 O! r8 b end;% D1 G% g" ^4 u0 @+ [* L. Z: G
else3 V( Q0 g: Y6 g0 ^7 @$ w4 P; s5 b5 @
@.Destination := assignLObj[1,row];
7 s; E* `+ I t7 {9 L5 \" G end;
# B' d- q8 C6 A" \0 G) `0 L. s3 j6 | newDirection(@);
7 e9 R5 Q$ ]! c6 ~ @.HasOrder := true;
5 T& W$ \2 n) p) {3 E end;* a6 H( z# u% h4 U' {# M# P
end;2 Z" w' B3 p4 Y& u2 n
end; -- of the method
( i0 c- J" j/ `7 w |