/* called by: entrance ctrl of the object 'track'; m7 U! s2 D& c* u0 K! A; H
*/
3 e6 T7 j9 g V/ X; n) \is7 o/ N0 R/ B" Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) ~, L$ R' C! m, pdo
9 E0 @! s: d8 o9 ~% Y Lan := rootfolder.Internal.Tools.AOLlanguage;
% y* u0 D: X0 z j if current = @.Destination -- else return
7 O5 h( J: N2 t# {, p0 u then) }4 p0 k5 b3 f0 k2 @& i+ A# P
@.Destination := void;
5 G3 n* P* K: |# I& [+ F if @.occupied then4 z1 O: n m0 q
part := @.cont;
% o# o: e( @. t6 A @.transpOrder := void;
* m/ ^4 r2 n5 c: d3 V part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( {5 I- }& g7 f2 I& p& s @,root.eventcontroller.simTime);6 q) Q) h9 _9 Q' J
@.HasOrder := false;0 o2 {$ E0 q/ |8 x0 i$ p
@.DrivingHome := true;
; A% D& a1 b E# M1 q/ y8 w rgManager.tryToStartTransOrder;
2 N. v- ?, y, f o; q4 m# `& x7 t if @.Destination = void+ b- w6 A, a, L; y) Z8 Y
then -- no transport order for vehicle @1 M4 R: I2 q; E, `; V6 J- v/ e, V
@.Destination :=
; x2 n! |! F; X' b: B rgManager.nearestFreeStation(@,track.~);
1 f1 X+ I# i7 z5 M$ g( N' h; \ newDirection(@); , a" m* S- l5 l# c7 [
if @.Destination /= void then
8 s9 \! e# c+ G) v6 v( F% H0 _ @.Destination.NumReservation :=- i/ \% ^, N( \, d& W- J7 h+ _
@.Destination.NumReservation + 1;8 k) `! Q% L, T9 ~
end; l. t0 N6 A" \% N$ H
@.CurrIcon := "drivingHome";
2 O$ P$ H) o, Z7 A @.DrivingHome := true;: ~/ j' U' K# E' _1 m
end;
4 T* L" X( F5 j* C0 x' ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' y7 T( t0 W/ G# s6 x) Q part := @.transpOrder;
7 k% S8 f8 e9 o; A, e% v+ q9 P2 ^ part.move(@);-- load part
- r" }' n5 P& {+ { @.CurrIcon := "load";
; K3 D( R x6 n, ] GlobalDistObj := part.globDestination;" P, l7 x: Q: h. M! s/ C9 V. O
assignLObj := rgmanager.rgAssignL;
" t+ F* S8 T/ h row := assignLObj.getRowNo(GlobalDistObj);
: @8 n; t) i. Z, b1 o if Row = -1 then -- since 70
7 L W) Y; v8 b8 b! g if lan=1 then& C) O5 F1 d# e% s% x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 H/ y) ^$ I5 H3 R
to_str("in der Andockstation: \"",?.~.name,"\"")); Y& u7 x. `) X4 e; P/ \
else
9 z2 R3 e# A6 { promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 P' L1 N$ _. b7 u) A to_str("in docking station: \"",?.~.name,"\"")); * m( O8 u; T u* `, W
end;. W& h9 _9 q$ M3 q5 {
else, s+ ?) S* _- H0 b# v
@.Destination := assignLObj[1,row];
3 I8 ]5 j* e1 \/ I* a7 e end;
% `6 \+ ]" t: |4 U1 d0 p v newDirection(@); Y0 f" d5 y$ t9 P1 D# L. l
@.HasOrder := true;* d& w8 M0 Z/ s/ T3 u) i5 p0 ?
end;3 \' z* @, k: a0 E
end;; e& h; o0 U, W& [0 o/ t
end; -- of the method0 t6 y5 j! o; e; W, L
|