/* called by: entrance ctrl of the object 'track'5 M X p, K& U/ ?
*/$ \$ f, f5 g) Q$ V) X
is' }1 N( Q }/ D& R G6 r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 m d$ H1 P% t. y; }
do k9 o7 K# N5 h& ^& c& r' r8 a
Lan := rootfolder.Internal.Tools.AOLlanguage;+ e# i2 h+ j8 d" ?$ e. ^
if current = @.Destination -- else return
* E: D) t6 `8 v2 g; R# O/ m then. _4 @; W! s- S7 F% S
@.Destination := void;
& S+ D l. ^3 q, ^! N' } if @.occupied then
& {( c5 j1 P" g+ [$ D part := @.cont;, r9 L( p* {) G
@.transpOrder := void;
# F' n2 o' w* a8 k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 ^+ m! l6 j) t6 {+ m7 }
@,root.eventcontroller.simTime);' h9 s5 M, e- N) o: O% N
@.HasOrder := false;' l, r+ D4 e$ f
@.DrivingHome := true; d. f0 N) |5 Z5 Q7 K9 m
rgManager.tryToStartTransOrder;
- t1 E1 z% {9 Y! J0 D if @.Destination = void
9 |0 T& H) g9 \" B7 F" `" u then -- no transport order for vehicle @
: ]* {$ g0 {- i' D" ~$ O& }$ o @.Destination :=
. q# y% c0 K, u9 p K* G# @3 e rgManager.nearestFreeStation(@,track.~);
) d* G5 W7 v0 j+ O9 m: M newDirection(@); # E3 D8 U' Z8 X/ f
if @.Destination /= void then
0 }, a5 O$ C7 h4 E1 }; Q @.Destination.NumReservation :=
% h( j0 ?8 b- z( Z @.Destination.NumReservation + 1;4 s0 T8 E' Z. m5 C& S( N
end;
% ~1 m- e y9 J; E @.CurrIcon := "drivingHome";
" T9 g o+ O& q9 V/ | @.DrivingHome := true;! @6 J. n! M- z x1 p7 I) y
end;
3 T( L: @# ^; ?3 O3 w else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 U, s( y' s/ e @/ w u3 N) Y2 ]
part := @.transpOrder;( g* ]: i* }8 ?% L/ B
part.move(@);-- load part; R# g6 b$ u- E. v
@.CurrIcon := "load";
7 L$ L$ l3 R4 H2 i" C' _5 E. r GlobalDistObj := part.globDestination;
* A7 y# w3 @; z; @$ r assignLObj := rgmanager.rgAssignL;
* j% B: c/ x8 }* K! k: E+ N: H! f row := assignLObj.getRowNo(GlobalDistObj);
" Y$ k4 v3 i6 q% }) a% V if Row = -1 then -- since 70
- s) s& M; E/ u5 Q E if lan=1 then
9 U3 b: c" v& B- l& d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ S w1 x3 s5 C2 o1 a
to_str("in der Andockstation: \"",?.~.name,"\""));+ N% e8 I7 r a
else- i( n( y+ U: T" j( w) ~+ u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 `6 \# }: G1 N4 [/ E W$ E to_str("in docking station: \"",?.~.name,"\""));
) O8 h8 e( E" v% J end;
& q1 D/ i5 G6 a1 q2 |- ~. W else1 f. ^/ f8 S t
@.Destination := assignLObj[1,row];
+ K3 \- ?8 `5 N( F end; 7 s; l( Y% k. n& z, j8 U, `
newDirection(@);: \/ X% P! s2 d% [
@.HasOrder := true;% f8 l0 V! [4 t, ~
end;
8 B, T0 q1 v- d4 E' O+ } end;/ C& N- t, v: y% r
end; -- of the method
7 I1 m6 \* H. O ^; B |