/* called by: entrance ctrl of the object 'track'5 ~, x1 v) H5 u* C
*/
5 w8 j7 j8 M1 ]" U# ? nis
7 r8 A0 j1 Z% S3 T A* p7 q# t part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ e- U4 }: _6 S6 J5 y3 S0 Sdo
) ~! Q% s# y) h4 M4 N* L Lan := rootfolder.Internal.Tools.AOLlanguage;1 J9 K( l+ q. e1 y g) C
if current = @.Destination -- else return. d! ^7 s; |, D& \) w
then1 b2 \" I0 p6 Y, m' n( z0 _
@.Destination := void;5 ]* T6 Z) Z, `9 S5 z, c m# t
if @.occupied then2 d. C% C: x: h. |8 y# _8 _
part := @.cont;
* q" B! B5 b5 |9 c @.transpOrder := void;. K. R# }- c! T& U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; l# E# I5 ^* `1 c3 Q
@,root.eventcontroller.simTime);
- m4 S4 b" f5 f7 u# L: x @.HasOrder := false;& i) u% q5 y0 D/ Y0 K
@.DrivingHome := true;
* _9 s, _7 j. ~! z2 [! y; ] rgManager.tryToStartTransOrder;
/ P$ I- o3 z, o if @.Destination = void
. N6 W( z* ~4 j g2 @2 ^$ N then -- no transport order for vehicle @
% L2 t7 l+ y L/ T' ?" a4 Y @.Destination :=4 N; ]" P( e5 |$ W: n: S
rgManager.nearestFreeStation(@,track.~);
, e- r- K+ w/ x5 } newDirection(@);
( W { d- J$ B$ l& j6 X0 Z if @.Destination /= void then
$ p" t" R9 ]3 P- [$ Q8 X4 p @.Destination.NumReservation :=2 M( B x* A4 ? ]
@.Destination.NumReservation + 1;/ D! k' Q1 f0 I8 J8 M- {
end;
, z& l6 b+ M6 r) b$ ? @.CurrIcon := "drivingHome";
( r0 ~3 i: L9 [4 i6 U' s @.DrivingHome := true;
1 ]0 O" q# A; Z( | end;
|: G( f0 e1 C" x8 l else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" p' a! Z4 P( V part := @.transpOrder;
) W+ C. g' k+ P# |) ] part.move(@);-- load part
4 |; W. O( O! w6 B @.CurrIcon := "load";
& |$ n& G- Z+ |- i7 k' g GlobalDistObj := part.globDestination;
0 Q5 K L" m6 P% r assignLObj := rgmanager.rgAssignL;! \0 w7 b$ l5 L5 C( u2 {9 f7 M9 X8 H8 k
row := assignLObj.getRowNo(GlobalDistObj);
2 r0 G2 h. j ~$ }4 c/ X% U' w p6 B if Row = -1 then -- since 70
8 ^1 V- Z0 |4 E3 R if lan=1 then R- A5 B' o' _% |3 t1 B9 Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. \4 V0 I X# i" @# M9 i9 @
to_str("in der Andockstation: \"",?.~.name,"\""));) P# b- e0 E* E) m
else3 n( M$ z" P9 l) c. K0 u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) a _9 J! \* X. x' o
to_str("in docking station: \"",?.~.name,"\"")); ! }7 W$ {+ `7 O0 K1 B, k3 J0 _9 N R9 U
end;) ~& P# f8 N% U. Y% f. u. o
else
' ? n, b' H; f' s @.Destination := assignLObj[1,row];
7 s$ U' _1 d- O- R end;
8 U0 u" d/ G0 |+ H4 `4 x4 | newDirection(@);
: b" l" {; L: W( x3 V6 y I @.HasOrder := true;
4 ]( L$ _% L) d- ?4 i2 n end;
( a# d i$ h Z( ?8 p& @; V end;9 c: j) c; D4 i) V
end; -- of the method2 x9 i" O; Y9 V. a
|