/* called by: entrance ctrl of the object 'track'7 R/ X. b* [, \ v+ H0 H
*/- n# O" O9 m' s4 W0 q
is
; A& t( d% d$ @7 o6 P3 M part, GlobalDistObj, assignLObj:object;row,Lan:integer; O6 M# y- D8 z* Y: w, i1 a8 g: F
do
! ?3 N& q* z s" D0 U/ [) C Lan := rootfolder.Internal.Tools.AOLlanguage;# C& M- x" N8 p" \. ~% e! y
if current = @.Destination -- else return
) x% K; Y0 y" d( o4 v then# U) o' J: t/ E
@.Destination := void;' y2 ^, Q/ T; c0 k$ T8 `8 Z* E
if @.occupied then1 z1 U: Q* G1 C1 N( x, M
part := @.cont;
5 |- x: O! Z) Y6 N5 X @.transpOrder := void;
. {; _4 u$ ]% o/ Y" S, p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 u* i' A t+ \' n) l2 X @,root.eventcontroller.simTime);
0 P7 z% Z( z7 M- e4 m @.HasOrder := false;
1 _$ P, `( a9 a! J0 F% x; T @.DrivingHome := true;# L% g5 M: n; B/ @! J5 z r/ o0 o
rgManager.tryToStartTransOrder;3 E. l* e. e3 U; J7 C+ W+ C- d
if @.Destination = void8 ^! M* e+ }4 |$ y) H
then -- no transport order for vehicle @, y7 E5 t$ X0 J; U! n& C% R. y
@.Destination :=/ a% K9 I" V( |' i, J
rgManager.nearestFreeStation(@,track.~);
7 P1 ?: b b# f8 Z$ a) f newDirection(@); . d8 g" x' f6 n0 p
if @.Destination /= void then
3 s* |# e2 [3 \' @) \' W @.Destination.NumReservation :=
/ U7 ?9 J! U# n [4 J @.Destination.NumReservation + 1;
, `& h4 J* x3 K2 P9 q& } R a end;
$ ~# K6 u- c8 V8 U. j @.CurrIcon := "drivingHome";- x6 B3 Z& l2 @6 z# Z6 O
@.DrivingHome := true;
: H0 |3 O2 ^/ j3 P l5 R end;
' B' K9 J# P& D0 F, K0 \7 J else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 \) v- ]$ Z6 f9 h0 ?
part := @.transpOrder;
# i+ k, p* w, v. r7 b7 D! X part.move(@);-- load part4 E h9 F, N0 R m& l) x
@.CurrIcon := "load";
: a L2 ~9 b! p/ B/ f GlobalDistObj := part.globDestination;
# ]! P G( c* J O, _ assignLObj := rgmanager.rgAssignL;
0 k" d1 ?" @; v# F5 Y; R0 | L row := assignLObj.getRowNo(GlobalDistObj);
* s; v( V2 Q6 f if Row = -1 then -- since 70
/ J; p0 l) }3 x$ `" S1 a if lan=1 then
4 ?2 L, Q% r0 |% z0 e promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 R8 e" h6 S9 @9 o+ T! B9 y
to_str("in der Andockstation: \"",?.~.name,"\""));" w+ N5 b, Y( \" o
else% w7 O( m1 ~" F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 B! Z: G- @$ e/ O to_str("in docking station: \"",?.~.name,"\"")); # H( Q9 D( y& v" d' G
end;( p' ~5 i* a% u) M6 y3 w! p3 p: H% i
else
; F& j" T d2 w2 f @.Destination := assignLObj[1,row];. C& y1 C' z" L; g5 a: O
end;
3 [7 E/ G, H7 B1 h; L+ e newDirection(@);
0 c9 @- ?4 s! n" b. E @.HasOrder := true;0 M( P# S" I' q8 k
end;
/ [/ w. c) @+ Q# x" W# K( b2 R end;: K* X7 _! p5 h! j# e# Y% C5 E4 ?
end; -- of the method9 \/ J5 _ g2 J
|