/* called by: entrance ctrl of the object 'track'7 n w7 @1 b8 U. e
*/; ?# ?8 ?1 B$ Q3 _1 h; U. Y
is
q# L- T% G$ r9 {! A part, GlobalDistObj, assignLObj:object;row,Lan:integer;( I* {' u# u' ~5 v9 t+ j5 F
do* M$ P) p v, g! a) |8 k
Lan := rootfolder.Internal.Tools.AOLlanguage;
: C4 T* |2 Q* e v( s; P3 I6 D, @ G if current = @.Destination -- else return
' H9 k0 A: F0 n then
3 i( j6 a) T* _. i( f7 N4 @* `: q @.Destination := void;
. }: Y' c+ k6 [, x" X- u$ n if @.occupied then# D* b- M* K* ?% a) L. ]
part := @.cont;
4 d' W* ~, M# z. ? @.transpOrder := void;
; ?3 X) i% A+ s3 s# O. F+ e( b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) X3 z- A0 x5 l; X+ @) ~/ l3 P
@,root.eventcontroller.simTime);4 z1 X& Y: e, t% d0 i
@.HasOrder := false;
4 K) X3 S4 F$ M1 K3 T5 J9 N: r0 h# W: }1 m @.DrivingHome := true;
2 Q0 z% C; v; r. {- J4 a3 W7 K rgManager.tryToStartTransOrder;
* N8 v+ m- O( w J; R2 z+ o/ I4 R if @.Destination = void
: X. D" _: ?1 y. W6 q then -- no transport order for vehicle @
( [5 }: B( a- Q( M. s0 l @.Destination :=+ J; V3 t8 Y3 |! q4 ]
rgManager.nearestFreeStation(@,track.~);
0 x0 c8 K2 B3 B# v K' t/ S/ j: X newDirection(@); ) I. M ?# a4 y
if @.Destination /= void then
& |- m1 t# P3 ]! X, x; o @.Destination.NumReservation :=* W1 e" C& d) c! s; E3 Q
@.Destination.NumReservation + 1;* e, ~; j& N& e* i
end;) y, M5 \: ~6 z' T( a7 i
@.CurrIcon := "drivingHome";
% J) i% x) B( i6 H @.DrivingHome := true;; @* @! x0 n3 \6 L) V) a; O# o
end;1 P2 M1 z- E* V; N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 \8 |/ t) K. m v& r6 T6 x
part := @.transpOrder;
* J D1 P, p4 o9 D, k2 N part.move(@);-- load part2 p8 E0 M* z; v; K1 y$ g
@.CurrIcon := "load";
* J8 A$ o8 ?4 o4 q# E9 _$ r/ x/ \ GlobalDistObj := part.globDestination;" a4 Q0 [, G. r! z& ~% }
assignLObj := rgmanager.rgAssignL;! k- `1 r; o6 t9 \; W
row := assignLObj.getRowNo(GlobalDistObj);
% K. o8 t& d1 i& M5 l& { if Row = -1 then -- since 70
+ @! f, R& L1 C if lan=1 then# z/ n' D. y+ C
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 {8 [. \; |! T$ _& v* z$ {4 O to_str("in der Andockstation: \"",?.~.name,"\""));
$ W2 i- l6 L. V# e! F# D else. |- U K3 |( ?1 `3 a2 }$ Y, D% Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& Z, |' U1 b4 m" T3 a0 J
to_str("in docking station: \"",?.~.name,"\"")); 3 y( c) w& Z2 w' G6 P3 W3 U
end;. K! d2 B7 ?' I4 `0 w9 u
else: O$ G, o5 A2 D f( p* o8 F, B+ ~2 f
@.Destination := assignLObj[1,row];2 W1 q$ x8 D7 u
end;
" R" K7 S8 ]8 t& }2 t) r newDirection(@);% Z0 j% K5 q2 r
@.HasOrder := true;) f% |) e) q6 P4 l3 l# A& S' }. [5 ^
end;
# X; W0 x, k+ s1 W, d5 d3 y7 Q end;8 K+ u# O' V3 h" n4 M5 K
end; -- of the method. P3 H+ f/ I8 A* K
|