/* called by: entrance ctrl of the object 'track'& e% ? [4 s+ e% J: z# v9 t
*/
; ~, h9 c/ i" Q8 qis, P% F5 @0 r" t0 n9 m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ w+ v% {* @( M$ i$ U* \; g, P
do) X9 }* B q* Y9 w: V6 _; q4 ?
Lan := rootfolder.Internal.Tools.AOLlanguage;$ X) C, T( Q! G+ J* g
if current = @.Destination -- else return: w5 s8 a/ ~$ v" @
then
5 ?; N A) \+ U @.Destination := void;0 X- K7 ?% F8 x
if @.occupied then
$ D3 X, X4 L& F+ p n3 f% L/ a part := @.cont;0 u& g2 @* k) r2 J
@.transpOrder := void;
( X4 u, S5 [/ a4 @7 b. S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," V# L( g' U( [ k1 a% J
@,root.eventcontroller.simTime);7 J) x2 U( I5 s2 J8 L
@.HasOrder := false;" e/ V0 V# e1 t/ [1 _ M) r; h6 P
@.DrivingHome := true;' ?$ I- J0 r) i6 m% s! K
rgManager.tryToStartTransOrder;
) V! O0 M1 ?; n0 U O3 Q if @.Destination = void7 W7 N5 P1 U/ ] [5 g; ]
then -- no transport order for vehicle @) l" E; A" c3 l1 h% R9 L
@.Destination :=
$ `5 w6 {- U- B) H& G' A) Q rgManager.nearestFreeStation(@,track.~);
- @6 {1 D# O' \: |7 ~( M newDirection(@); : D2 p1 M1 P' W
if @.Destination /= void then4 A: k. N: @8 g5 }9 v
@.Destination.NumReservation :=
1 I1 [: e# s* \ @.Destination.NumReservation + 1;
& @8 e6 ?7 p, f P' r1 Q+ h end;
4 J7 q* n6 Q1 R& q0 Z @.CurrIcon := "drivingHome";
9 H! Y4 O# ^) j( t2 c& G/ y7 N @.DrivingHome := true;. b2 x1 ]# S# |7 S
end;
3 g. z/ p9 L3 S- y2 ?: z else -- the vehicle @ is empty, both vehicle and part are in the same dock station" P7 k$ _, I! R! \
part := @.transpOrder;
x% s* \! P4 z part.move(@);-- load part4 k& d- A1 v" V# `
@.CurrIcon := "load";% G( |# D* Q: |5 j9 G
GlobalDistObj := part.globDestination;
( p7 W" q$ m" l assignLObj := rgmanager.rgAssignL;
& q) D- e. ` E$ ^' [/ j9 m row := assignLObj.getRowNo(GlobalDistObj);
3 U' M8 h7 C) {4 K if Row = -1 then -- since 70
( v. y/ [4 t' O8 V if lan=1 then1 y* b) F% z" j6 b/ m4 G) x N5 H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 |% l, Z9 q8 \) B to_str("in der Andockstation: \"",?.~.name,"\""));& n7 U$ K% y( @ \% Q" |( b
else- I6 S. `" I R) A7 F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ D" L, j& I; f2 F0 @; m
to_str("in docking station: \"",?.~.name,"\"")); ; ^4 f7 F7 G9 S$ i# }" y1 S2 q
end;% `- |* r3 x) G) @6 h& E4 I o
else; g, r9 h4 z! T/ B0 S L
@.Destination := assignLObj[1,row];/ |9 |; a( a e$ C& x
end;
5 a( _! |$ `* ^( x6 H e% o newDirection(@);
. z3 }7 K$ G/ f3 T7 \+ e @.HasOrder := true;5 W2 E0 c2 v9 t7 j9 W
end;" Y6 b% T; F$ t2 e" Y5 h
end;" N- ^- d5 r# s4 N
end; -- of the method: ^( P# w( J- W( Y( t ?/ C
|