/* called by: entrance ctrl of the object 'track'% {: C1 T' d# r1 w
*/
8 Q) T, R+ S8 `- |/ \. p& k$ mis" H- p4 R" c% t0 I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) b' J3 G5 ?$ j9 F5 kdo
@3 [: Q) p# o6 |. M# K9 u Lan := rootfolder.Internal.Tools.AOLlanguage;7 k( m5 G) G( y; m& N* _' @
if current = @.Destination -- else return
0 _7 I) k v# p$ X% g% a$ ^( w then
0 A8 J$ Q X3 ~, J5 ` @.Destination := void;$ }; y9 B/ H% |8 \+ ?" V# S
if @.occupied then
$ s# s9 g8 W: i5 E! ` part := @.cont;' d* j4 O5 Y5 r1 ?- r/ n! E1 S
@.transpOrder := void;- i$ I- V# K2 J/ g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 N6 u8 X8 c. @+ ~; _* Q* G
@,root.eventcontroller.simTime);
4 k f# i0 i8 y$ G8 K# d( P1 Q" c @.HasOrder := false;7 r8 X& |1 `. e
@.DrivingHome := true;
" ]$ @8 A! g- `) v- k# a rgManager.tryToStartTransOrder;# m' O) N$ Z% `3 M+ `( T
if @.Destination = void R5 Y3 T$ D4 z/ \
then -- no transport order for vehicle @, i# l; @( n. ~3 J
@.Destination :=. N3 [3 ^. c* }- E; \
rgManager.nearestFreeStation(@,track.~);% Q" s T/ S8 y
newDirection(@);
1 R& P, {5 \3 j$ v& L8 u( F if @.Destination /= void then
, e4 t1 G4 A9 G g+ t* M @.Destination.NumReservation := f6 f( H2 F( O5 Q
@.Destination.NumReservation + 1;
0 A/ _; ]% G/ T ]% z: k end;' v. f$ m0 p, ]* |, W
@.CurrIcon := "drivingHome";# U$ M! Z( v' i
@.DrivingHome := true;
+ c3 S) A6 |6 `0 M9 ^: j end;" y! j9 y t2 w) P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 l/ k, |0 F9 t- f part := @.transpOrder;
, \0 {* @% D6 H part.move(@);-- load part* o2 B' P+ l, C! u7 Z
@.CurrIcon := "load";( v% {2 L" B3 A" _3 D9 B" U8 }
GlobalDistObj := part.globDestination;
. m& T i" E6 P, {4 P, m8 o assignLObj := rgmanager.rgAssignL;
9 @; X* v1 c$ z# |. ` row := assignLObj.getRowNo(GlobalDistObj);
Q1 ~6 e+ d: o0 \4 K if Row = -1 then -- since 707 G7 K( ?8 S* ?( \: `0 B
if lan=1 then6 O O4 Q7 P& u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
F X3 y9 S; h9 K- N! c, d# x0 Y9 t to_str("in der Andockstation: \"",?.~.name,"\""));
4 j4 a- v9 l: Q0 G& n( n else9 \; S- m5 N z3 d! C+ @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' G: w* B4 C/ q4 U to_str("in docking station: \"",?.~.name,"\"")); " B# x2 u/ T, D# b# ~8 v: F
end;: }( B3 D, W9 k9 {% x
else1 x: f9 B8 ?; @ D! t
@.Destination := assignLObj[1,row];
8 r1 V: v$ ~+ \1 q* F4 p end; . X: Z1 O: T3 F. n5 w1 N
newDirection(@);+ z; J% ~% v/ U8 J3 o3 n
@.HasOrder := true;
" C2 ?. ]+ o5 I; ?: d end;
# T/ S! @ i& Y1 H, Q- Y: h end;
4 s3 c# }% K# t0 G7 rend; -- of the method
0 n: t+ A* J, r1 i4 G |