/* called by: entrance ctrl of the object 'track'
/ z* ]+ D1 _' B. o* s' ^, W) a# e*/
& j( V! u" `8 Q$ L3 Cis: E1 H7 z/ E0 A# a E, F, H! b. T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 I+ {$ H$ Y: [3 W$ bdo
?( l+ p3 w8 M" {- P2 ^6 B. ` Lan := rootfolder.Internal.Tools.AOLlanguage;) v) k4 ?+ r' w, V" V
if current = @.Destination -- else return
: B0 g! Y- G( Z then
' [: l, S( f6 ?7 z R- f* ~ @.Destination := void;' \# X- J1 D1 D* Q9 k( d0 |/ b
if @.occupied then5 }- T o( S; o( z- q, {
part := @.cont;+ l$ e1 c: I) T9 m$ o1 Z
@.transpOrder := void;
4 k" s/ s, d y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; ^ ~# O6 W; z8 T% X& w- R4 g
@,root.eventcontroller.simTime);# n4 B) R% o, T$ j$ c
@.HasOrder := false;
% I6 ]9 d* D( A$ Y4 M% K$ ?- M @.DrivingHome := true;
3 m5 W) p, }+ r4 t" M- L rgManager.tryToStartTransOrder;0 V/ E+ U/ w, F* `# s7 O" c: i
if @.Destination = void) u _, N0 ?0 b! g
then -- no transport order for vehicle @
5 x6 v& b3 d1 l$ ^( y @.Destination :=
0 Q1 E* R3 M# h" `1 d( N# E1 I, b' w) d rgManager.nearestFreeStation(@,track.~);
+ c9 Y1 Q8 \: H5 S" ` newDirection(@); : ?( \$ m4 j' ~# S4 a0 x
if @.Destination /= void then: d7 x, y; j N; }
@.Destination.NumReservation :=
1 W+ v2 ^& L" l& Y: L7 p @.Destination.NumReservation + 1;
2 v# \$ M- s% _8 V* M' i end;
, `; F9 S! x& O: R @.CurrIcon := "drivingHome";# _2 o4 I/ M z) B
@.DrivingHome := true;0 j0 U( O5 `$ F6 p. I( A) Y2 n! [
end;
5 @! m% r$ N1 ?: X' I else -- the vehicle @ is empty, both vehicle and part are in the same dock station: y, a/ f) c! |& B
part := @.transpOrder;/ R$ a4 S8 t) M, G- H6 K0 x- {
part.move(@);-- load part4 b$ c4 p; F: E" L4 t# N; ]: m
@.CurrIcon := "load";- b9 w' O; }) S- f4 M' w; b
GlobalDistObj := part.globDestination;
; M @/ w! o% j3 T" O assignLObj := rgmanager.rgAssignL;% F L1 l" V* P* u
row := assignLObj.getRowNo(GlobalDistObj);
% i# Q/ J$ J' w: {* c8 U ~# r8 c if Row = -1 then -- since 70
7 T+ Y: a5 Z# }6 a7 m$ U* L if lan=1 then- c# B, H! `, X) {( {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
w. ?6 J) V% ]9 `3 ^) g8 g' N to_str("in der Andockstation: \"",?.~.name,"\""));( [/ j: t' Y; d" Q
else7 e* K( U6 g& T) y2 X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# u7 q5 A2 @* U0 Q8 j1 I to_str("in docking station: \"",?.~.name,"\"")); 3 K2 Q3 B( f5 a' O5 X5 R! N
end;/ V' x/ G, J& z+ S O9 ?0 y3 x, L
else' \3 e0 `- i }0 |. k) h3 ]
@.Destination := assignLObj[1,row];1 |, v0 g8 ]) i+ W5 ]- E
end;
8 H- L$ j0 E1 Y" U6 c3 v newDirection(@);
6 s, ^8 C6 y( Z* h0 q) a @.HasOrder := true;
5 ~& _/ c4 i4 |0 @ end;/ L- q5 C( P* F
end;, g* \0 [& o( [7 Z0 ~8 Q
end; -- of the method
) [" i$ R1 s3 o4 B1 \, \ |