/* called by: entrance ctrl of the object 'track'
?, I \, o* B* h ^7 `. v5 Z' f4 F*/' `# E, ?; ?7 T
is, ~! l, v ?( X8 z, E
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% d7 T0 z, X* R2 Ddo5 F- L5 d& x5 v* d6 n
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ Y7 o0 ^" a- T- Q& t/ { if current = @.Destination -- else return- l8 K; z, V: I5 U* ~ C# J
then
5 m' z& [: c q( D3 p% s @.Destination := void;! S2 ~/ T2 P1 r9 H# Q; S
if @.occupied then" i d& b0 x* ], K) e
part := @.cont;
! r5 w0 r. D; h! | @.transpOrder := void;
9 e2 a+ `5 r- z$ |' m8 x0 M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ c- C! _/ K4 [+ H7 O. V
@,root.eventcontroller.simTime);
- _2 R8 I& d: o* z, M @.HasOrder := false;# q( m( h# t1 ~) E D
@.DrivingHome := true;6 \2 P2 b7 E: Q7 W% t& U
rgManager.tryToStartTransOrder;
, z3 q1 | @4 T! g1 R if @.Destination = void
; z. Q- v2 B* p then -- no transport order for vehicle @; g4 Y( [+ E+ b& A- ?( Y
@.Destination :=
A( ^- X; s5 E2 K rgManager.nearestFreeStation(@,track.~);
* R2 V) O: q2 r0 r. Y* z& H newDirection(@);
/ x- S" ?$ m" O# K if @.Destination /= void then
- z2 D0 N+ U3 d& I @.Destination.NumReservation :=: f" ^; h% s& m7 e
@.Destination.NumReservation + 1;
: b# ?- l$ j/ @3 S7 { end;
$ x( X6 E9 G4 M! w0 u2 i, J- N. ?- N @.CurrIcon := "drivingHome";/ q2 B7 C+ }/ \. P5 K, G3 s
@.DrivingHome := true;5 ]2 P$ ]9 ~. y" u0 m+ A1 G. e
end;
/ S+ h( F7 e5 A' C else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( I. E- A' r8 v1 K( p part := @.transpOrder;+ V* L. ~, w0 ~: |0 J7 m1 W$ H5 k
part.move(@);-- load part
# F6 b3 z* o: F+ Y$ ^- Q0 i @.CurrIcon := "load";$ B A5 k% [, h
GlobalDistObj := part.globDestination;3 P' i! Z; Z& u1 [
assignLObj := rgmanager.rgAssignL;
& z8 m! o$ c" \$ i- u row := assignLObj.getRowNo(GlobalDistObj);4 j. u+ d3 n1 P `1 x* i
if Row = -1 then -- since 70% P" v" G" V3 l0 j: s8 h0 l
if lan=1 then& t: M% d! C9 u9 {/ ?; T# Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) S* x1 k) f6 R* u* u6 X% G to_str("in der Andockstation: \"",?.~.name,"\""));+ M: f$ \% g! v% A5 R5 g# M
else4 c+ L/ `% R# J0 W7 J# ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) B5 Y: p { V+ }4 Y
to_str("in docking station: \"",?.~.name,"\""));
: ?2 w, i$ Z7 b0 w& c: j ~" a1 G. B1 C end;" z6 a5 n; E# ? V: s
else) Q) `" o" x# U5 \8 B# m4 @- R
@.Destination := assignLObj[1,row];
5 }1 M: j& i3 P6 P0 ^, | end;
5 ]; m: J8 g* K& g) G) g newDirection(@);8 L2 L2 {; ~% k1 I! f- W$ q2 z: S$ N
@.HasOrder := true;+ t, \! t& W; M$ ^+ f( [# M! M
end;$ R% a) l2 {7 y8 d. j, u
end;
3 L8 [) |- @7 [9 {4 ~end; -- of the method
$ G7 A( `" h( a: N1 S |