/* called by: entrance ctrl of the object 'track'# i5 t/ ?! O2 u& {8 b
*/
7 R8 v) p* w3 g7 F6 Z3 ?- D, mis* @! L+ P+ C# X0 u7 `) ~9 ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 T' j5 S3 J1 Odo
% [+ a- Z* n& h7 J7 ?3 [0 E Lan := rootfolder.Internal.Tools.AOLlanguage;! K+ g% H2 J2 ]; V2 r; d) g
if current = @.Destination -- else return
+ \# d. I- n+ c& ]1 O then# k! s8 b# Q! R |% E2 a
@.Destination := void;
' y; B- k3 L: ~# t) d& v if @.occupied then" f7 f* h% J- |+ h K- ^
part := @.cont;8 S& i* s) L5 U. I( b( m8 Y
@.transpOrder := void;0 T6 [" I& I7 B+ O, z2 G* k; j) c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! `( b3 ^( a% J6 |7 P j- F
@,root.eventcontroller.simTime);
8 f9 ^7 B/ a$ a& X3 {; O F$ H4 r @.HasOrder := false;
! x1 }% B6 x- h5 b, o) i @.DrivingHome := true;/ N9 f! X9 ^5 W1 e2 C
rgManager.tryToStartTransOrder;
, ?1 P( R/ e8 i0 `) ^- V- { if @.Destination = void o2 K! ^( i, a4 D; z& V' M
then -- no transport order for vehicle @, p1 \& `2 f- T, o
@.Destination :=
9 p& T2 e% R$ G1 I, ?# ~ rgManager.nearestFreeStation(@,track.~);4 H* d# x% r3 e/ d! X% m" E
newDirection(@); ( v3 \8 O4 E2 G5 O
if @.Destination /= void then7 z$ m2 V1 V. m. [
@.Destination.NumReservation :=
- g' T% W1 L, \2 [ @.Destination.NumReservation + 1;
$ R; F3 ^+ Z1 |4 W }* Z end;1 Y: D* |9 R, W3 h4 s( g
@.CurrIcon := "drivingHome";
6 O8 O; ?8 c+ w |! [ @.DrivingHome := true;
" T* R ]6 r( V8 Y b, f end;# P! o, e6 A2 @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ ~2 a) t8 {, q% g, ~ part := @.transpOrder;: y, i$ c8 h' w3 M; d
part.move(@);-- load part2 K3 t# G! v7 `, B
@.CurrIcon := "load";: ~3 a: [+ @2 m2 K0 y% j, T
GlobalDistObj := part.globDestination;
$ `7 r3 n( }% r3 `( l+ T assignLObj := rgmanager.rgAssignL;
7 D6 G& _! Y3 J! A: p8 P) B row := assignLObj.getRowNo(GlobalDistObj);
2 \/ Y2 i3 x+ U6 Z/ B. Q! j if Row = -1 then -- since 70
$ L2 S3 Q; }1 n( l if lan=1 then
( r( x3 ? |& w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; t+ |1 H% I$ w1 w" K' ?8 [. R) Y( U
to_str("in der Andockstation: \"",?.~.name,"\""));
- h& [8 o, }5 R( E else/ i" r/ H! Y8 ]& v9 a& g$ N
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 W2 X: w6 L: i( T! R# _ to_str("in docking station: \"",?.~.name,"\"")); ( V- f' @) h# B# I% W( R
end;+ ]# ^5 a4 {; ~8 Q' ?7 H
else
4 U( X: @: d% o7 B6 @0 j, g @.Destination := assignLObj[1,row];
1 k2 i! h4 g+ ?' J end;
* _: }" d% W, g, p, ]* n newDirection(@);
, Q4 s" c! m7 M, |* j7 k @.HasOrder := true;
9 k+ u8 C- n+ P" Y: h) U7 T end;
. e' _6 j9 y+ U9 f. X end; ?$ v3 H/ R0 ~+ w* u
end; -- of the method
, L. j# c8 P0 v8 C |