/* called by: entrance ctrl of the object 'track'
! k5 ]; R# ^8 D1 c- Z" G1 r*/
L- t: j1 U& \" Jis, n& [6 o1 T: H) c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 o7 @' Z. Z+ x' ]; P; V! n S1 p
do
( p' D2 {6 H' O3 g- j: c6 Q Lan := rootfolder.Internal.Tools.AOLlanguage;. E- q( `$ l$ T& X2 C
if current = @.Destination -- else return
* t# d( m0 m% b then0 {0 X$ m# z: u
@.Destination := void;0 C# b: t: D" ?1 f0 F/ b
if @.occupied then
0 V% m+ U% U8 p% l: T' ] part := @.cont;# V# c$ a) u! c. L
@.transpOrder := void;
2 V7 x7 I( i$ E, `9 `& o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' Y X1 M$ {: n- |" J5 U% i
@,root.eventcontroller.simTime);
- [' r! A+ p' C; P1 u @.HasOrder := false;6 z1 u) i- I+ i; c+ S. T/ K! f# m4 E
@.DrivingHome := true;! i: d! \/ }- I S4 c+ A
rgManager.tryToStartTransOrder;/ p4 e* Q. H% v) Z! p( [# G
if @.Destination = void
5 U# y+ f3 Z) O& O, \$ N then -- no transport order for vehicle @+ k& d* C& h' r
@.Destination :=( H# ~" S3 u: Y3 M# W( v6 x
rgManager.nearestFreeStation(@,track.~);
3 O: v$ e9 V E6 h6 ~ newDirection(@); ' z' J: ~- Z% {* r r. t. ]- N1 ~
if @.Destination /= void then2 o& y3 Y! m/ |
@.Destination.NumReservation :=; {4 J: U# j- l. Q
@.Destination.NumReservation + 1;
# b( O+ S* a( @( X6 U9 M5 c end;
9 f) _! k" G. `1 \ @.CurrIcon := "drivingHome";+ }) L& q$ C4 A6 S/ i' L: r
@.DrivingHome := true;: w% O! Q) W8 a$ o- [- S% g: z5 Z- F
end;
" H$ [4 m' g/ r( A. ]0 k& f& r d else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 F" { b- |9 f
part := @.transpOrder;
+ [7 i3 Z6 L) x part.move(@);-- load part
: m9 |# y7 c+ Z* @+ X @.CurrIcon := "load";" d6 |2 {2 L/ j* U' h9 D8 E5 ^+ j
GlobalDistObj := part.globDestination;
8 e1 c1 K1 J2 A l assignLObj := rgmanager.rgAssignL;
% ~5 k# ^( B$ Q' ?5 ^4 m row := assignLObj.getRowNo(GlobalDistObj);8 V- C' d; H8 {+ x1 V$ k" L1 ~
if Row = -1 then -- since 70: V8 @/ t% e/ t4 m& z$ M, C
if lan=1 then6 U/ B8 r% X0 \+ }' G
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 i( i$ @7 f7 v
to_str("in der Andockstation: \"",?.~.name,"\""));
* f; |% Q; s$ o1 g$ `- h2 Y8 ]5 q else
3 ^) l8 t1 |3 y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& c2 {; n% y* f S
to_str("in docking station: \"",?.~.name,"\""));
7 @. q7 Q5 a; n: x7 O end;3 S$ @3 M s' w& a. q# e
else
4 O9 ]% G9 u+ O/ k8 y ^% n& e @.Destination := assignLObj[1,row];
, q$ J% `- {8 Y. |) `' K end;
* h$ p0 w* G0 u' t% n2 Z" A! C newDirection(@);
" c" x+ h! |: o1 r% [ @.HasOrder := true;) ]/ b8 C, s: x5 z8 V7 [
end;$ j* Q- U8 A3 H' Q
end;
; I3 l; b, C: @8 s2 ^ M, V& Qend; -- of the method
) B( q7 q! H8 Z. K6 G1 q |