/* called by: entrance ctrl of the object 'track'
9 S! p* `" C+ `. O, r*/
2 j, v7 Z$ j8 [( r4 Tis& v8 O. j9 C8 O) p% D
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- N) m/ E1 g! [+ L& s' Q6 _% ~do( ?5 ~$ D2 ^, N" I ?2 j
Lan := rootfolder.Internal.Tools.AOLlanguage;+ D) y ?+ E3 h a
if current = @.Destination -- else return
( K4 b+ S1 ?; K. m+ b/ k5 i then
9 H) D; o9 D- I8 P& \% h3 D @.Destination := void;
# g- v5 J" C6 S: f! h if @.occupied then
: |0 r. y2 [; b part := @.cont;
. P2 ?6 \0 t1 C( I% S# [% g @.transpOrder := void;' G' B5 z8 {* D+ u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- w+ J& @: [* n: \* J0 n
@,root.eventcontroller.simTime);
S# N; h+ }7 ^/ p. O- E4 V @.HasOrder := false;
3 ^1 k$ G2 v+ b. Y& p8 ]3 @ @.DrivingHome := true;% u' R0 h( {1 O4 r: m
rgManager.tryToStartTransOrder;% A1 h. l( a4 W& ?
if @.Destination = void8 t1 T! F. m3 R3 i4 y, F" U
then -- no transport order for vehicle @
5 K. f+ Q$ O+ L. f) \ @.Destination :=; C. d+ N' v1 x8 j
rgManager.nearestFreeStation(@,track.~);
$ o1 S% A" ]/ G" m( C4 r; O0 h newDirection(@);
8 W+ s0 e1 D. e; F' j" b0 V6 Q u+ b if @.Destination /= void then
# S7 @* V- P) ]. } t6 d @.Destination.NumReservation :=0 S; ^5 V% F( y- ~
@.Destination.NumReservation + 1;
1 c! ` k# ~" j* R8 ~ end;
7 e7 Q* ~2 j# x1 r: u/ M4 t @.CurrIcon := "drivingHome";
' Q. q5 v0 B4 k0 T @.DrivingHome := true;2 p9 O4 R! ^, x; b1 @5 [
end;6 a, G* K5 n- I0 a1 g* |& u
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' _1 R! K g7 D; r# H) l7 }* j
part := @.transpOrder; f# B4 I% g- w* D; p/ ~, O! E
part.move(@);-- load part
' A% X1 A+ J' g7 K- e7 d @.CurrIcon := "load";
0 `& n, j( y7 n0 v5 z9 D GlobalDistObj := part.globDestination;5 u" O: x/ f6 d1 G
assignLObj := rgmanager.rgAssignL;
- k# Z7 ~- f5 h7 @ row := assignLObj.getRowNo(GlobalDistObj);
1 C/ Z! {2 T9 ^8 r8 X4 Y if Row = -1 then -- since 70
# v% h7 V; o% t if lan=1 then- y, O% T& s5 ^6 G/ y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! l# d. P8 Z# H7 s0 C
to_str("in der Andockstation: \"",?.~.name,"\""));
# ~* V1 D! N/ \+ c else0 {( ?# H8 \! Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ e, Y1 ^/ @+ B" k: y! k
to_str("in docking station: \"",?.~.name,"\"")); - E5 p/ ~4 t2 M& R; b
end;
0 d! U/ }( b# t' M1 S( @; @6 }- d0 v else
5 D! y6 ^0 @( G: y @.Destination := assignLObj[1,row];
1 B1 y$ |3 k6 {* U' F+ |1 T' O end;
e; F R7 d! A4 }$ k newDirection(@);
: T( b) A$ r8 |( C# a: k @.HasOrder := true;& j( z K; P- [9 y3 J
end;" N" `4 m! D# Q4 U3 }0 T
end;3 V, ~3 J& D5 p, A9 P' }
end; -- of the method
+ ~/ P- A4 v5 z8 m, x |