/* called by: entrance ctrl of the object 'track'
7 D" D& `6 b+ L& x*/& `$ L. N1 f2 t
is
d* W& H5 D( s8 J. T part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 W1 P6 F- ~6 m; O) q: w
do0 g8 y: Z: i5 ]. R8 S! f
Lan := rootfolder.Internal.Tools.AOLlanguage;+ x8 i4 b, Y) g9 F- ?$ ?- j* b
if current = @.Destination -- else return/ G! d) L3 H' v7 C1 t) S$ x* W
then1 R0 J. a- D' b1 Q3 |9 F7 t" T
@.Destination := void;
. o1 }! M v$ a5 Z7 V& x/ ^ if @.occupied then# q3 Z) ^* e6 }5 C7 ?* p
part := @.cont;
7 A4 ?9 m- ?2 X# Y$ r @.transpOrder := void;2 A. r. x6 l m5 |2 z+ M
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ t3 M% U+ y7 K2 H! r% Q
@,root.eventcontroller.simTime);( T4 r7 {/ M' g' s( n; W" p
@.HasOrder := false;
& c! U* m+ x% G) ? @.DrivingHome := true;
2 n6 O! r4 Z/ K) E5 P" M, g rgManager.tryToStartTransOrder;
( C `- H7 L' Q8 e; K. ~2 j if @.Destination = void' s8 j; N: w0 P8 E' ?
then -- no transport order for vehicle @* r; m" C4 L7 i) J
@.Destination :=4 A7 m9 J& o; c+ X: Z; R
rgManager.nearestFreeStation(@,track.~);# c0 B$ X K0 ?# J
newDirection(@); + d7 h, l9 Q( K0 b' H" u3 V
if @.Destination /= void then! a6 n6 p" V: j: t/ H( R
@.Destination.NumReservation :=
( ? `( F) ~ _) V @.Destination.NumReservation + 1;
0 T9 r7 p8 Z' G5 H. S end;3 g; X0 w6 F. _& r) `7 J
@.CurrIcon := "drivingHome";
+ |6 Q- w& _# O3 P: q( \, p @.DrivingHome := true;/ e7 I5 a- N# {/ k, P9 a; i) e! v, u
end;4 [) o) T! O& v) s$ P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 k) e7 P! A J; E( a5 t. @! C2 p part := @.transpOrder;
, n2 Z8 b+ ]3 R% u% ` part.move(@);-- load part; k9 F- r( M+ I: z, z
@.CurrIcon := "load";
2 u/ L: O) d* ~ GlobalDistObj := part.globDestination;
2 v: p( z# x4 d; n assignLObj := rgmanager.rgAssignL;
* k( o( s. m- x4 H2 f$ ^ row := assignLObj.getRowNo(GlobalDistObj);
5 n5 U! `' w9 u4 d if Row = -1 then -- since 70) |1 h! g' I6 J2 N& d" i% S
if lan=1 then
" z A) d3 F& [2 H+ N1 M9 L) b promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( L+ ~- ^0 v) t$ |/ a( r to_str("in der Andockstation: \"",?.~.name,"\""));
$ w* y. k! R2 L, f* r- ~ else
% f" h \! |8 ^4 r3 Y& [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, U9 r6 o6 s4 s, n
to_str("in docking station: \"",?.~.name,"\"")); 9 Q0 J* L) ~1 c" G' O% S& p: `
end;
2 B8 K; I S8 P' G" o) h: R else. D H0 D, g7 I1 \5 J+ U( Q0 T C
@.Destination := assignLObj[1,row];
6 G; v' }5 s7 j( V! q: C end; # k/ T* O2 I2 W- W2 i% g: x
newDirection(@);
# e( k1 K4 Y. {, q @.HasOrder := true;
( a" e8 Y/ k5 T7 ]" [ end;
& h6 F4 z8 N7 {% ?+ t end;0 A8 Q% x% O( t+ `7 l
end; -- of the method
# y" z' L# w1 ^. `, u2 O7 g |