/* called by: entrance ctrl of the object 'track'
7 |% J2 _: X; z- T. G) q*/
6 G7 c% L+ K$ ]" {+ x: L+ bis. A4 K% [0 M3 [4 u5 C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ u. i& S# S6 N1 Jdo
7 u- a% P- g0 Z5 g, }8 d5 w Lan := rootfolder.Internal.Tools.AOLlanguage;& {, c9 T! f0 C% i/ C7 @
if current = @.Destination -- else return
- X, L2 E1 Q) s8 N) ^2 S then
t: K$ }& u! z3 i3 Q8 D @.Destination := void;+ |. {# W0 f( x) u* Q5 m
if @.occupied then1 J0 T; E+ p" J6 K$ _7 J
part := @.cont;, j5 c, B6 s, w* k' r; f C9 f
@.transpOrder := void;( [0 @# p- a2 C9 z1 g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# v( W7 U" y1 D2 z/ ? Z
@,root.eventcontroller.simTime);
; A) E; \9 b0 n. Y* ~0 c' H @.HasOrder := false;
o3 ~2 M. M% _ @.DrivingHome := true;
6 r) c3 h& W1 }7 C& S/ K4 U8 z( O: } rgManager.tryToStartTransOrder;
: t( I- g w: `3 y* Y if @.Destination = void& v4 Z4 E# x, J( r* N# \' G. J
then -- no transport order for vehicle @9 g. K- T( |4 Q3 x! H2 ~
@.Destination :=
3 E' t. A ~0 ?7 G( s rgManager.nearestFreeStation(@,track.~);
0 p5 `4 y* P3 G# P, @ ^: G( f$ W newDirection(@); 7 V$ l2 i. ]/ @0 J1 ^# r' v- `$ d
if @.Destination /= void then
q1 `( Q L8 R' P @.Destination.NumReservation :=
, a7 V5 e% j: Z+ \; @: j/ O @.Destination.NumReservation + 1;
# M# l$ G" I" o$ Q. A end;% n% H+ L `; D+ X/ F
@.CurrIcon := "drivingHome";! e5 [ g7 o7 {2 ^7 [
@.DrivingHome := true;) w0 v. e$ W* F* L# H3 \+ U) c) d/ T
end;
$ o2 P8 v& d" U; q' E' |3 [& ?! ^& u) W+ e' a else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ d. {5 \$ N/ l part := @.transpOrder;) z) B9 e5 W1 ~, H1 S& q+ }9 \
part.move(@);-- load part' ] S8 G; q6 B. F
@.CurrIcon := "load";, F: C9 H" |* E, h. `9 D* o0 z* _/ p
GlobalDistObj := part.globDestination;) X% V Q! N }% x
assignLObj := rgmanager.rgAssignL;
1 N& I/ N' o1 A& D8 t! T4 D0 B row := assignLObj.getRowNo(GlobalDistObj);- x; u- _( N x5 @; L# P9 W
if Row = -1 then -- since 70
4 Z4 d0 t" J7 m' g8 U if lan=1 then, F) z9 `* ]3 f8 |& g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 n' A$ C( G1 ?7 Y9 d; F3 \ to_str("in der Andockstation: \"",?.~.name,"\""));
# }( S& r4 B9 r5 m1 h else
4 ]1 {1 v8 u( o7 d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' u4 M" w9 H" Y3 \7 z
to_str("in docking station: \"",?.~.name,"\"")); & Y+ D* W3 |2 C6 A
end;
7 W" v. l6 X8 z2 }* x else3 X& R% z5 R4 {6 S F5 Q. \7 i
@.Destination := assignLObj[1,row];) C1 }$ j) f ]- K" u
end;
& W* H7 `$ g+ n) c, ` newDirection(@);3 k+ h( v3 _! J& b; q) V6 V. d
@.HasOrder := true;' a) y& X5 G$ o: V/ W* W
end;1 F9 s4 `" x" I. Z
end;! [3 [. y) G s
end; -- of the method
. h; D* q7 Z1 I( w |