/* called by: entrance ctrl of the object 'track'- W% Y: e' A' q# u$ E5 m) t
*/
z" W2 g a) X" his9 R' I2 j* h: M/ }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# R: Z) P! }; r, xdo
6 i9 Y L# ?0 r& g2 r Lan := rootfolder.Internal.Tools.AOLlanguage;( ]5 V8 P0 ]( a; L) Q' _9 z
if current = @.Destination -- else return
# j3 a N% t- z* E then
( t1 }& i/ q5 _. r @.Destination := void;
7 D- S, }2 Q% R( |, X if @.occupied then
" @/ n# r! L: A. B( Q part := @.cont;
9 |" ?# W: ]+ ]4 Y t6 T @.transpOrder := void;. ?) l9 g2 D$ @
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' f$ O& }! I7 A' _4 H @,root.eventcontroller.simTime);
( z, L2 y1 I% J- [. [0 | @.HasOrder := false;3 P; d: J" l& w! F j8 R* V2 C
@.DrivingHome := true;$ p4 |) w5 U' P+ C% a9 ~
rgManager.tryToStartTransOrder;
% n: |2 y% `" W2 v, h2 T if @.Destination = void1 a& R/ Y7 ^* N' W" }1 v3 c6 m
then -- no transport order for vehicle @
W( x6 s8 }% g+ r. W% Z9 b9 {& e @.Destination :=
- }4 H; c7 G# Q" i2 F2 t rgManager.nearestFreeStation(@,track.~);- X4 |9 C% H% ]6 ?& t" B+ j( O
newDirection(@); 0 k! H% l8 |+ k. E! }% d, p, v' S
if @.Destination /= void then
7 w/ Y. u/ m" s, p+ |/ c! | @.Destination.NumReservation :=/ f: @7 J- r. H, R- a
@.Destination.NumReservation + 1;
$ r/ d# ?) T0 b1 R! ], Y end;
+ |: h3 I8 E# c: M, t @.CurrIcon := "drivingHome";
; X) b- N0 @3 G8 @ @.DrivingHome := true;& a# H! t$ M3 n) V8 z
end;1 x* h0 D! z/ M$ |! H3 M
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ F4 e& t. M2 D/ ^
part := @.transpOrder;5 c. m& ~; {9 V: ^+ w1 v; Q1 s
part.move(@);-- load part
7 v M6 e4 m5 r1 G1 J" G) A @.CurrIcon := "load";
: W- c1 c- ?8 K: j s: ], ] GlobalDistObj := part.globDestination;& t' n3 h5 R/ Q6 _ M
assignLObj := rgmanager.rgAssignL; }2 X4 u( H6 s& A
row := assignLObj.getRowNo(GlobalDistObj);
+ z n+ R( ^" }! q1 P& K3 U if Row = -1 then -- since 70
* v/ v/ l3 d& Z. b) ^( Z1 h# A/ G if lan=1 then
Y/ ?6 A# ~8 }: u# O5 { promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 d( G% E% |. [& |& T8 o+ G& \ to_str("in der Andockstation: \"",?.~.name,"\""));/ {' S+ K( ]0 n4 |/ u3 @# _
else: Z+ p. Z+ C8 M' r
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
\, w: |4 {6 i to_str("in docking station: \"",?.~.name,"\""));
f1 U6 M# _9 ~( ~: X! i end;. h6 q6 J# q4 m3 V/ m7 Z0 g0 g
else3 F' J S0 B1 {& r
@.Destination := assignLObj[1,row];
8 T. q! c2 f! h# W3 u( Z5 [$ k end; |. x" h9 Z6 T, A$ M" i6 U$ G& o f/ A
newDirection(@);
( l7 `7 z" A9 O! v6 D @.HasOrder := true;8 k2 b8 {0 N3 x/ R1 a- ^
end;
* X t. _1 P( j* w3 J" k end;0 w7 {. o, [; w3 U1 c/ ^, b
end; -- of the method2 F" B# W; a9 H' Z& f3 j# s3 z* `2 Q
|