/* called by: entrance ctrl of the object 'track'
' e. K. y2 q+ l3 U; H/ B$ ]*/" [& o0 f8 L8 A% W+ x4 [7 n# I& a y
is$ w0 O( C) e; i2 A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 O& t) G" |* x8 p
do6 M# C' d+ C2 C1 r- \
Lan := rootfolder.Internal.Tools.AOLlanguage;
. V) C1 s; Q8 r$ s, Q1 Q; R0 l if current = @.Destination -- else return
* A8 r1 V: ]9 m/ p! V2 h: d( x1 O then
! W3 k7 A2 y3 k& Q. o, W: Q @.Destination := void;3 y" R( G1 ~% n q- _2 I9 c
if @.occupied then
* n# Q0 j W2 v part := @.cont;
3 h. I U9 n. d! E0 t$ ? @.transpOrder := void;" R V" l0 a4 }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( D2 K2 _. J# B: ]* U+ [. Q
@,root.eventcontroller.simTime);7 b' Q& r4 T+ H' `; c
@.HasOrder := false;
+ b0 I! d2 p L+ N8 I0 V @.DrivingHome := true;
( Q% ^7 E `& y, Z5 m rgManager.tryToStartTransOrder;* p) E1 s; g& v6 y
if @.Destination = void# K- _8 q; Z: f' P0 {! f, m8 X
then -- no transport order for vehicle @0 }2 @3 r4 O) d3 X- u1 l
@.Destination :=% R" W6 T0 o2 `) j
rgManager.nearestFreeStation(@,track.~);0 K' T; \6 h# G! S
newDirection(@);
3 ^$ ?5 r& ?! e5 y if @.Destination /= void then
( G: m- E# z: ?0 y, o3 P @.Destination.NumReservation :=) F) p+ Q* @1 F M; r: S
@.Destination.NumReservation + 1;
- ]3 ?3 N6 ]8 R* s/ c3 q9 E2 h end;) K3 L$ a, d* u0 R! }" M
@.CurrIcon := "drivingHome";- B! Z7 c$ U" O1 f* M% p, F# t. `( a7 |
@.DrivingHome := true;4 T0 ~8 v/ e5 h: i
end;3 {& z# f }1 C, C# [) X3 D2 {* R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" R5 l. A1 X+ [
part := @.transpOrder;3 a' Y, v' Y* `" a
part.move(@);-- load part+ t3 n/ D3 F ]
@.CurrIcon := "load";0 h# |" O& D2 \
GlobalDistObj := part.globDestination;! A% K$ J$ x `' t
assignLObj := rgmanager.rgAssignL;% }( H n# {( ]: v
row := assignLObj.getRowNo(GlobalDistObj);
# ?: g8 x. d% b% E' X" d if Row = -1 then -- since 70+ W4 I5 U8 V# S
if lan=1 then7 ^2 m: p6 d: g$ t0 v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 H/ R% j% s6 ~- j u- f+ Y to_str("in der Andockstation: \"",?.~.name,"\""));
5 f3 k+ v e2 F# Z2 T# | else9 A, b6 P! F' n& f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: B: R/ e4 Z7 a& H% U* n y- R to_str("in docking station: \"",?.~.name,"\""));
1 T4 k3 M- B' e end;
N+ B2 n6 F. u/ @ J else
3 o% V$ ?& Y p7 x$ q: I @.Destination := assignLObj[1,row];" t: r7 I4 M5 v1 w4 {9 Q
end;
% s/ k6 x& F! y, P( l6 `! s newDirection(@);$ v. D5 L8 s7 ]6 q
@.HasOrder := true;
, K* Y( h; @0 l+ s* v end;
7 J" ^ i( u# x2 l9 _" [1 n$ N3 q end;7 P: `5 O8 T' V: F, y
end; -- of the method, A1 `$ h9 d2 O+ g5 l$ r
|