/* called by: entrance ctrl of the object 'track'
$ s9 q M, w. s3 Q% M*/2 T+ {+ E! z Z0 r2 D" z
is6 M0 @7 p- n& O4 H- r# `# t% `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 d0 V1 e! ~; L+ S' Y ?5 E8 \
do
7 u1 J- {# o, M6 @) t# v Lan := rootfolder.Internal.Tools.AOLlanguage;
! {% n$ `6 H9 p1 e g1 x( D if current = @.Destination -- else return
! ?9 e/ I) u8 ~- | ^ then
4 w2 R) J3 P( X! L6 O+ g1 Z$ m, }$ S @.Destination := void;4 W8 B; u8 E) V: T) a' H
if @.occupied then' L, \. N. U, g7 w
part := @.cont;6 _; O7 k1 G9 _" F
@.transpOrder := void;6 K6 |+ ^9 q; u* z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 E9 s" {. Y7 ]1 ~$ K @,root.eventcontroller.simTime);6 k9 _5 {+ g. }0 C
@.HasOrder := false;& ^# B% F, ]# Y) h) P! p+ p
@.DrivingHome := true;
C( Y6 x9 V/ t& H9 Z+ k rgManager.tryToStartTransOrder;( q/ x5 _; P. k6 S2 z* Z; \7 U
if @.Destination = void8 T5 d& n* ~2 P
then -- no transport order for vehicle @0 D( U- @; C% {6 C0 X
@.Destination :=1 |9 ~8 G# G; g5 P
rgManager.nearestFreeStation(@,track.~);8 ~6 z' q: a! O; z1 [* V( L
newDirection(@);
6 s; q( Y9 ^; t if @.Destination /= void then
9 `8 e/ a3 E* F3 |4 O! W, H @.Destination.NumReservation :=
5 @3 M, l4 w) |9 {& a0 o @.Destination.NumReservation + 1;" w7 V# b1 M& E( F, Z( i
end;
% T. Z% _( h0 C$ G/ v @.CurrIcon := "drivingHome";
. X5 _+ C) M: ?3 F6 y @.DrivingHome := true;
" I" a. L9 U! e* B% ]7 S" Y' r4 V end;& i$ f# Y* [! v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station: { d v; ~, z$ u |* j
part := @.transpOrder;. B% u1 d1 E& f$ s7 p3 K8 y
part.move(@);-- load part
% K8 T9 a7 C; E- m( ]: e- v/ x8 L) E @.CurrIcon := "load";% U* l% x$ M2 n9 @0 U) w% t
GlobalDistObj := part.globDestination;& i( Z% l& R) c+ F' m8 |) W2 O
assignLObj := rgmanager.rgAssignL;
& B) w! u0 F5 x1 h, D& L row := assignLObj.getRowNo(GlobalDistObj);. l3 X" u" V) R8 M o+ w, v
if Row = -1 then -- since 70
8 Y6 m ^: n( i$ V. C- n, |+ L9 } if lan=1 then
0 Q5 n( Z: V' Z6 Y: ?* [5 [ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 [2 ~4 c: }& C4 N, V) U a" l to_str("in der Andockstation: \"",?.~.name,"\""));
$ S/ R X1 `! I6 |$ ~ else
R2 Z7 v' H4 h i7 C, ^' g promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 O2 U# L- R& m* w
to_str("in docking station: \"",?.~.name,"\"")); 1 p) l3 ~& Z! T U
end;* O4 y0 |- {3 G& P7 |
else
# d% K& g0 J# S9 e* R) O9 { @.Destination := assignLObj[1,row];
- J/ {! A2 M8 s1 Z @' s9 Q end;
% q. I; U8 m6 W- A& ?7 d$ P newDirection(@);( K3 |8 p; v7 {- B7 P
@.HasOrder := true;
% U' e( U( g) K end;8 y( ~+ y% i) G# x! I
end;
1 w1 u! r7 H3 Z1 A" k& a) Y* _end; -- of the method
3 g. G6 _: O, }) [6 i |