/* called by: entrance ctrl of the object 'track'
% ]' g/ y( x; @$ z+ \5 Z; S B8 m*/- y( N7 k! @0 z: O3 @- X+ I1 v* P
is" O; c5 j2 t! v1 Y: a; @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 d3 U7 D$ e7 L2 r( Vdo
+ M0 O* Y, v; ^ Lan := rootfolder.Internal.Tools.AOLlanguage;
# ~4 D1 o3 Z8 k; v if current = @.Destination -- else return- {5 m ]1 T8 ?3 U3 w# |
then
) r* [; y& R- O6 }: X$ G" y0 u @.Destination := void;7 \# M) w4 ?) e- |: L, u( }
if @.occupied then
) b/ X: E8 U$ {7 H part := @.cont;6 d1 s5 |$ j% Y% c5 D
@.transpOrder := void;5 S3 _* H7 G q# q7 V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: C, `# n S' _. G. o! Z @,root.eventcontroller.simTime);
: X3 f! E) J' ^4 ]' ] @.HasOrder := false;) l g2 ^3 p; u( E
@.DrivingHome := true;
% b+ b# S& s/ B# ]1 ? r rgManager.tryToStartTransOrder;
# t: D$ W) O( `& ~ if @.Destination = void
7 n- {5 t0 G- g! E then -- no transport order for vehicle @3 x" Y% I, ~# A
@.Destination :=! a4 s4 i% A; [, {( g$ u
rgManager.nearestFreeStation(@,track.~);
& E5 `2 U! X$ v/ M- m; E6 g( ` newDirection(@);
6 M" {" N' G* [0 D) j if @.Destination /= void then
* ~( |) s) n* y- I& g @.Destination.NumReservation :=! n) g* U) a" D7 q4 ~
@.Destination.NumReservation + 1;# e" j5 `& b0 f" G
end;
' H& v) i; v$ t+ n+ Z @.CurrIcon := "drivingHome";6 \! ]) ]# Y* Z$ U
@.DrivingHome := true;
& h' t3 p- d l3 O, e- v end;+ ?8 O/ l G6 A. H8 t8 a' ~
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. R5 Y2 U! Q! N: R4 ` t
part := @.transpOrder;
: k' P! ]8 L2 i part.move(@);-- load part- d% `% w3 ?0 h( Z! n
@.CurrIcon := "load";
. O* v9 `! R5 p2 |* g6 w3 h$ C% l) `. S GlobalDistObj := part.globDestination;: R! ~( U# k: y Q. C
assignLObj := rgmanager.rgAssignL;$ z# w& r% C& Q1 K/ O* j
row := assignLObj.getRowNo(GlobalDistObj);! ~* d: g; _# |( ?" f, m+ l# G
if Row = -1 then -- since 70
/ V' e: y* e# z( F8 t if lan=1 then
N) ]( Z3 L0 ^7 m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 r! k1 [# H5 {2 B" M2 g1 ]' f
to_str("in der Andockstation: \"",?.~.name,"\""));1 ]5 i& x B5 G' s4 t5 [3 Z m
else- S* C- H- q+ l" I3 N$ F, v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- M0 Z% B) ]( m- y to_str("in docking station: \"",?.~.name,"\"")); 3 W- s3 H7 C+ f, F6 F
end;' D& K, { B9 p- m7 M# u
else' A( B' U& O. a; r) }
@.Destination := assignLObj[1,row];
2 o. L; m5 ^' v: e: W end;
$ ]$ G3 I' X8 t- u) E5 e newDirection(@);; \. I6 B2 q% v# P/ ~
@.HasOrder := true;
0 S& R* m( l( @4 y. ? end;
2 E6 p. w) [* T& q( {: x end;
0 x! i& r0 p8 K# K- Pend; -- of the method. W1 K( G" A- V! ?& N+ E! w
|