/* called by: entrance ctrl of the object 'track'
! v. T' |3 a% Z3 X*/- h6 i8 n G1 _ B+ W; f; e
is
+ G6 t/ k& F) ? part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 y" M( V3 o* C2 o7 C0 Z- udo
# n7 Z+ [6 E9 h% e) O- Z, f Lan := rootfolder.Internal.Tools.AOLlanguage;7 |- Z. `" o1 J& e% O7 ]! [" Y
if current = @.Destination -- else return
- C E/ a" Q4 n$ I! D+ w" A then
* i! _6 ^8 a. R @.Destination := void;
# D* i. C# h/ B: f( |+ ~ if @.occupied then
4 J; s- H) e. x0 Q6 @5 k' f part := @.cont;
# z6 h8 g' S& h9 w5 A( k1 K4 D @.transpOrder := void;& f% Y1 E9 B( M
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 F1 ^; w; B9 E: H* [ @,root.eventcontroller.simTime);
% x/ y" O" W& E9 o6 D% O @.HasOrder := false;- P% W8 b' ~6 e) f! I. c
@.DrivingHome := true;6 P/ v) I- |0 ~+ N( \! U" Y
rgManager.tryToStartTransOrder;: q2 e. a, Q4 @- X; M) L3 ?
if @.Destination = void
+ B) L& q4 ?% o# p' Y ^6 j then -- no transport order for vehicle @+ W: w/ ]& t" ^! R
@.Destination :=
# o! a' K' _& \! ]% R rgManager.nearestFreeStation(@,track.~);3 d0 o6 l3 J, z$ c F# @
newDirection(@);
, H ~ C1 S; W4 t$ H if @.Destination /= void then
7 z% y5 K7 T) h9 [. j6 y# ^ @.Destination.NumReservation :=
" s/ ^4 b) b* z* m5 j @.Destination.NumReservation + 1;& x3 n: T2 y6 E& M
end;
, g0 Q8 h! z. n) G7 R @.CurrIcon := "drivingHome";
1 O) ~) m! G8 [% N9 D6 L: ` @.DrivingHome := true;
" \5 l E7 n3 e1 N! ^8 T" g end;& I$ m( r6 f# a* q" d$ d8 E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; i D) ~# R- Y5 S5 C$ K
part := @.transpOrder; y0 `% F& r6 L* I: l
part.move(@);-- load part! k/ _% M- z; K m
@.CurrIcon := "load";2 A Y8 I9 h% M' E( ^
GlobalDistObj := part.globDestination;- r. Q% h! i1 b) i* H c T+ O
assignLObj := rgmanager.rgAssignL;0 ]) ?1 u& R8 U- t# }2 F
row := assignLObj.getRowNo(GlobalDistObj);* A; Y+ j% [* F4 I! R4 z% B' h
if Row = -1 then -- since 704 A0 B, E- \4 F) E
if lan=1 then, O" l/ u2 W9 Q2 L* z1 `
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* C; N% w; ]+ t to_str("in der Andockstation: \"",?.~.name,"\""));5 {; P: ?4 n/ R. B3 ~+ y
else8 u4 K" F" C! R1 Q( d
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* Z- [. l2 e: L- v" n to_str("in docking station: \"",?.~.name,"\""));
# V4 w E- \3 N3 M6 M end;
% v) k! E8 v/ X s6 Y else! l* R3 l$ |5 M5 z4 S# [
@.Destination := assignLObj[1,row];4 f- k' i' q; P2 Q7 i/ C
end;
0 H2 k: h$ I- r0 l* D+ e m newDirection(@);3 N( s6 O5 Z, n/ _& c+ S
@.HasOrder := true;0 i& ~$ n4 G! V9 a( s+ U
end;
7 S* F1 r+ ~% A) D$ | end;) g, w- b L6 q( b' _
end; -- of the method9 [( b9 O; P4 c: U- n) x5 `
|