/* called by: entrance ctrl of the object 'track'. K# P- }4 q0 @8 A- i2 y
*/) C" r* }7 b7 T! e! z6 @
is
+ r" T6 C( O7 K6 L& [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. f( C+ C3 E. M0 H/ ~$ b+ _2 E( Ndo: D4 k0 Q7 k, T3 @" h0 _) V. P
Lan := rootfolder.Internal.Tools.AOLlanguage;! J. Q( y: @$ t& z% V1 n9 m- `
if current = @.Destination -- else return$ K- [5 F8 c( {" v
then! g# t5 ?* `$ x0 o W
@.Destination := void;
8 ^ i+ s$ x) Q! b! Q' `* O if @.occupied then! x6 ^% z7 F7 W2 C& m0 c
part := @.cont;
' N5 N. u- N; H/ c4 s2 ? @.transpOrder := void;. p' l! R' G3 n2 U7 O
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 r d8 T& Q5 C& g1 W y
@,root.eventcontroller.simTime);
: ]0 R, Q4 s1 B; X1 ^ @.HasOrder := false;
& R3 }3 ~* a8 J# n" o3 V @.DrivingHome := true;, Q. V9 l* l# ~5 Z
rgManager.tryToStartTransOrder;
S) `7 f! e; c3 ?) U$ q if @.Destination = void
8 x* ?0 w- H0 \$ z$ C then -- no transport order for vehicle @1 w& U+ N5 s2 b2 A
@.Destination :=
7 k/ ^0 G& ?+ q* T rgManager.nearestFreeStation(@,track.~);: V5 c5 u- R5 ~+ i0 _. `/ k
newDirection(@); 7 B: a0 {6 b0 f1 g* e2 z
if @.Destination /= void then7 o( n4 B& ~! D4 Z! E
@.Destination.NumReservation :=: G& \( B/ G+ n* f5 C$ r7 V7 n
@.Destination.NumReservation + 1;
5 e% b+ N4 z5 \" O end;
6 `" e) E+ N$ D' }* v @.CurrIcon := "drivingHome";5 j1 W" {# H- K ]
@.DrivingHome := true;2 e& l U9 R' N0 _3 ]( C2 o8 K
end;% R, q X# X$ p; o' m, n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' Y8 p4 q! @% T1 `; }
part := @.transpOrder;2 ?( @& A6 ~! M/ [6 v. }
part.move(@);-- load part4 I( M8 K9 o/ }) ]# A: o$ Z
@.CurrIcon := "load";9 x7 w! l+ P3 U! a. E# l
GlobalDistObj := part.globDestination;
2 y5 D" F& ]4 j/ T assignLObj := rgmanager.rgAssignL;8 o2 Q2 F2 H$ L5 f$ [# R8 X* V
row := assignLObj.getRowNo(GlobalDistObj);
9 B7 Q1 i3 D: i% }! L* D if Row = -1 then -- since 70
& D, b [# S- Y5 H b7 H: o0 g if lan=1 then
& {( q5 C* s% _3 i; D$ z+ n6 @3 c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 S# u6 X3 E; V$ t' V4 O to_str("in der Andockstation: \"",?.~.name,"\""));# }/ p! p! i- P+ ]
else
' ~) U; r) c5 [- e7 c' r promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( I& v, Z8 z0 [/ z4 M$ o
to_str("in docking station: \"",?.~.name,"\""));
9 ?8 Z5 A7 x, u5 e. S end;
7 s9 W% Z2 c0 l6 H E5 r! C else
4 o' M* V4 q+ E& w: M9 C( h @.Destination := assignLObj[1,row];
) S \; u: p$ u; Y end; # _5 R5 E. B& `$ P9 x
newDirection(@);5 [; z# I! F2 i. _. S7 l
@.HasOrder := true;
: {0 x. O: v1 d end;
9 f8 U, p/ j- X2 R1 O1 G* ~) U end;' u1 {( n* o7 M% D, [: U7 M5 T6 X: ~
end; -- of the method
" I# P8 Z. C. D9 n' a |