/* called by: entrance ctrl of the object 'track'
+ a e- r5 g, {/ y*/7 ? J# J+ U5 G3 P; p6 u% t
is6 y9 i# o/ K+ T. D
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ Y( [9 t, m- z' v, zdo
0 W( K, s$ \; n Lan := rootfolder.Internal.Tools.AOLlanguage;2 r* M+ F4 x7 a/ Q0 i& w4 b
if current = @.Destination -- else return
& U2 H. V+ t4 Z. F) L then
- `0 y. w0 x- r! e5 E @.Destination := void;
/ w3 n2 S( U/ L8 e) T if @.occupied then
8 I E. B! _- Y0 J { part := @.cont;
5 ~1 B# A, w' i# a' J @.transpOrder := void;- l7 _2 P# I0 S, o& A" N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ v w9 s( y6 u; D1 v @,root.eventcontroller.simTime);
. c9 G$ Y; M. r$ g8 o2 Z @.HasOrder := false;& c9 H3 [' P- ^2 c T- T: m/ N
@.DrivingHome := true;
4 H7 d! c, j8 T6 ^' h/ q rgManager.tryToStartTransOrder;
8 C B! T7 L3 B( E0 N if @.Destination = void
! V7 _6 ~6 W$ S then -- no transport order for vehicle @1 W4 x' C+ A8 o1 [ l8 {3 ?! I: @: j
@.Destination :=
* q& U/ ?& ]* k) r0 m rgManager.nearestFreeStation(@,track.~);
5 \6 e; F2 C. v0 H% {# _ newDirection(@); 8 B) ` s9 a0 u1 Z, u3 x9 p* q
if @.Destination /= void then% ?- H0 b- s) q8 Z, X
@.Destination.NumReservation :=
3 Z: Y+ K0 x" I5 t& _1 J3 D! N# |/ Z @.Destination.NumReservation + 1;1 V( q5 |8 ^: F" n% E
end;
8 l# M$ H. x% F$ L2 H @.CurrIcon := "drivingHome";
1 T8 L% w5 f( b @.DrivingHome := true;6 \; O+ o y8 h1 f
end;
* C( y/ r8 ~8 S, c U) w% l6 W" s else -- the vehicle @ is empty, both vehicle and part are in the same dock station: R! h! d& [4 D; P4 P! K9 j
part := @.transpOrder;1 \# x4 e& Q) l; H: Y
part.move(@);-- load part
# E. O9 I* F% ~3 f' P @.CurrIcon := "load";
* z# k: R5 [! S$ s" u2 Z/ } GlobalDistObj := part.globDestination;" _8 e8 }/ p! a& r. N9 a0 q6 A
assignLObj := rgmanager.rgAssignL;* s7 v1 Z, _$ O( r
row := assignLObj.getRowNo(GlobalDistObj);' R) v. n' M y( c. T2 @' v
if Row = -1 then -- since 70
; e& G! w F4 @4 u$ a! c if lan=1 then
' r# L! ^3 U# c" ?5 e' h1 H8 w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& {8 X3 N$ f* M( \% W9 q to_str("in der Andockstation: \"",?.~.name,"\""));0 f+ R% g8 p/ ^: u' C
else. ~( V; A* H8 Z+ l2 B6 _; T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 F' K# x& q3 M# D) `+ U to_str("in docking station: \"",?.~.name,"\"")); % x# T! W1 A: F1 H, t" b, i1 B: s3 r
end;% _5 \! ?' \- q; M, `2 e
else! T& i; X9 G- d7 P5 i- \' y
@.Destination := assignLObj[1,row];+ @7 I. Z R% Q% _2 U
end;
% |! d" l, \! l. U; f/ f* R1 [ newDirection(@);8 O y& g! E' T. H% k
@.HasOrder := true;7 {7 |8 w+ J; T: h. h
end;% b) j" U) v1 q3 B3 y' a
end;
4 E u# O! v" I) ]% f7 kend; -- of the method- m% E, g( Q" \
|