/* called by: entrance ctrl of the object 'track'' N! `, g: R0 q
*/
& a2 f2 R% I4 dis! X' C2 w( X% ~! j$ y7 r0 A( h, }0 h3 s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 h/ i/ E7 w9 z* ?5 O
do
& O2 u0 V% p9 v. Q2 ]% ?8 s8 G0 y Lan := rootfolder.Internal.Tools.AOLlanguage;" h, C" B/ F9 p5 C* \
if current = @.Destination -- else return; b3 ^& q# e! M: m B
then3 T7 }0 Z8 s: u' ?9 P
@.Destination := void;
* [3 _6 r0 X3 T# I' h if @.occupied then5 [$ g1 ]7 P2 W0 K s
part := @.cont;
/ B7 ^7 n/ o( I; W3 L- \& V @.transpOrder := void;
0 a+ W" F$ X" z; t% H. o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. D8 n( }3 S9 p8 U+ L- F
@,root.eventcontroller.simTime);5 e b ?" X9 F2 g; o: V
@.HasOrder := false;
: ~! u8 \" m0 ]. t( y! w, z @.DrivingHome := true;" K7 ?0 I! m* M4 Z0 I/ T' J
rgManager.tryToStartTransOrder; J7 s' X: r! C5 m
if @.Destination = void
" k) w) T: P, f& j7 m0 F9 C then -- no transport order for vehicle @% P9 ?0 F2 M* w* ?! |5 y
@.Destination :=
7 q2 q+ Y, L) d% u) |& { rgManager.nearestFreeStation(@,track.~);
/ Y: G2 w2 t ^ newDirection(@);
$ v+ w0 V- n- [& K. J% j if @.Destination /= void then
* h8 w, Z! g, o @.Destination.NumReservation :=
4 I/ I6 g9 G& Y9 B0 r) F$ i @.Destination.NumReservation + 1;
& ~' l6 F! P$ ]' {2 ~: Y- S: o end;& |, A* o* u, c9 q1 _4 n0 P+ a
@.CurrIcon := "drivingHome";+ k6 j3 m( Y( a1 L7 ~
@.DrivingHome := true;
6 U0 H4 z, q& m" r1 l0 ? end;
2 K0 z7 V* I: n. c3 {5 g/ |/ |# l$ v7 S else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ u( C/ V6 c7 x7 H part := @.transpOrder;# p0 n! P6 K/ H
part.move(@);-- load part
; a0 V/ |, }# M. D2 L @.CurrIcon := "load";% x/ Y$ {: Q: c. C0 B/ R3 z5 C* V! r
GlobalDistObj := part.globDestination; ?1 j S. y- ^. T
assignLObj := rgmanager.rgAssignL;7 ?$ j/ l$ H. d, U
row := assignLObj.getRowNo(GlobalDistObj);6 h2 k; e7 y( {
if Row = -1 then -- since 70
2 R, m$ v+ V$ c* j2 i% n e if lan=1 then
. U$ @7 m: D4 B2 N! |3 U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* D0 X4 p6 Z: q( s; L. t! A% S
to_str("in der Andockstation: \"",?.~.name,"\""));
. X2 T' v2 Y0 B t else3 A+ l( Y! S' t& b
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), f9 u% W) ?& Y9 I7 j" O* \
to_str("in docking station: \"",?.~.name,"\"")); ) n2 J) s6 `' Y# M, t5 F Q2 p" ~
end;
; C( {. f( ?& T% j4 d/ t else. k0 w1 i; T0 K' d# D3 [
@.Destination := assignLObj[1,row];4 J$ W" c; [* k# g! Q; a2 \; F3 |
end; * b, y2 d- g3 S! b
newDirection(@);
. d) I) G v3 l2 b0 N @.HasOrder := true;& v- x' l7 p$ M& f
end;
8 t" q3 n* B" u2 p: n end;) b, ]7 e$ V' B
end; -- of the method
: O3 F. w9 S- z! { ~ |