/* called by: entrance ctrl of the object 'track'
! K: e Q3 |5 J$ q. e. |*/
; ~- L: o s- [* C4 I7 t+ Z! mis6 o2 w E! F8 T- ^2 s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& C" Y$ \1 C5 i* P
do; m, \0 i$ J# T$ t7 p8 X: A) D
Lan := rootfolder.Internal.Tools.AOLlanguage;
: l( _" a) @" s if current = @.Destination -- else return
' \: }* s- |( |7 C M' q; ~ then
: z0 Z$ W: H0 c @.Destination := void;
3 `% |7 K' M5 m5 E if @.occupied then" U: u. w4 o! M* s
part := @.cont;. e0 Y3 N* R" b# Z4 S- w
@.transpOrder := void;
4 b' _% G0 L+ j# m9 Z/ S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% ]$ s6 w3 M0 O: n9 }) j6 {, B$ C @,root.eventcontroller.simTime);
. {; k+ \! V8 I% t0 B6 x @.HasOrder := false;
" o' G9 a1 Z$ L4 D2 O) E @.DrivingHome := true;
) k: I0 J% E" ^) X5 L2 {( w rgManager.tryToStartTransOrder;
8 m4 Q' J, ], c7 a6 H; q" [ if @.Destination = void
& e) o' v. d& n/ m3 i' e then -- no transport order for vehicle @
" h% v2 l3 ~1 ]" i @.Destination :=
0 `9 c3 {- E1 \ rgManager.nearestFreeStation(@,track.~);
# W" U7 _% ?6 u! c( F' I newDirection(@); / B3 ?/ i* i7 ], M' I* \# ^! [& p4 j
if @.Destination /= void then
$ M7 H8 W0 l v @.Destination.NumReservation :=
! C) k9 h& ~8 _8 C: E& ?+ D @.Destination.NumReservation + 1;$ M4 r' _+ P2 K' \9 g" m7 O5 W
end;
+ `/ m' O" t0 R, N# y" S0 W# n @.CurrIcon := "drivingHome";6 a9 G" {0 b. \3 B% [6 D. ~' W
@.DrivingHome := true;
" \$ y9 _( ]7 z9 ? end;
: A* f: B0 J6 M! m4 \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% Z2 Y0 E4 j i* F( j part := @.transpOrder;+ C1 t% S+ t( S8 m
part.move(@);-- load part
! }% a% C% A" Q4 c4 L" _ @.CurrIcon := "load";) {/ b3 t# ~" O) y
GlobalDistObj := part.globDestination;
) C" K1 e: A( S& E& S0 t1 F assignLObj := rgmanager.rgAssignL;
1 i2 P% r, r: R0 _" Z7 F$ } row := assignLObj.getRowNo(GlobalDistObj);, c. l5 u& X6 ~/ Q& i6 m) N
if Row = -1 then -- since 70& U' }5 ]% |0 \6 {* O
if lan=1 then+ r3 c& U% q1 q1 ^: u9 m C
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; j! j, ?' ? b4 _- [ to_str("in der Andockstation: \"",?.~.name,"\""));
K, a) X9 l2 ^. a else/ t3 ^# r! c1 P# R% n
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 j! o& |! Y9 m8 N z2 ] to_str("in docking station: \"",?.~.name,"\""));
5 @0 V4 R4 M. r2 a, H( U+ g r end;5 Q; O. S# U# X9 p1 c4 N5 E6 Y
else% k) z1 j& Q2 i) \3 a( i
@.Destination := assignLObj[1,row];
2 [& R. E8 @5 s: u8 r: [1 F6 Q end; m9 C' e! o! d q
newDirection(@);- H" z0 O/ C( h# d D* P# v# L8 N
@.HasOrder := true;7 u1 ], F# J$ P S" X7 j3 k& p
end;
" C: W* w v9 p3 ^ d# u1 d end;1 c2 v- n4 C; u4 ?8 s5 Q1 Z% z
end; -- of the method" ?* C$ I. {& j, x- }7 p
|