/* called by: entrance ctrl of the object 'track'# H5 U9 M( L4 s0 r2 ~! e
*/
. n: D h: s" K9 x4 ris
& P' ?) ?3 W* l- [* y# z1 S; ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 N5 C) P! I t5 S. B1 v% W {# j9 m
do: @4 Z: A( ~$ c* T
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 H1 [7 h& H$ T" s" x+ Q if current = @.Destination -- else return
$ s- z4 c0 G1 U% r$ N; b2 ~/ x then
+ O# l. _/ n/ r; l4 i1 A2 u# y% _# D @.Destination := void;3 O) l- ~" H5 ~6 q' b( D
if @.occupied then
4 w, m5 ]+ U+ w- M" O2 D7 q3 b) X part := @.cont;
+ _2 I+ W2 p; E+ ?/ D @.transpOrder := void;, ?7 S" Z* y$ D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 I5 e0 `, V5 O5 i @,root.eventcontroller.simTime);8 i/ ?! N6 I' b. h! J2 A3 T
@.HasOrder := false;
( N2 O/ K6 \ d( V% R5 r @.DrivingHome := true;+ Z, e N4 M; B8 s- D
rgManager.tryToStartTransOrder;# u' ~% l ?3 N6 S- c
if @.Destination = void
5 q1 s* I7 l" F6 c3 U then -- no transport order for vehicle @' z. d7 D' L4 t- P) z! j; Z& G
@.Destination :=$ z/ A( _7 O7 @' a; L. `- d! C* S- K
rgManager.nearestFreeStation(@,track.~);+ X( \+ I9 m0 x( V
newDirection(@);
$ ?( V$ S7 i0 o/ n5 h7 n if @.Destination /= void then
& e3 Z- f# @/ c$ e2 k2 T @.Destination.NumReservation :=; Q6 Q6 Z- h/ j
@.Destination.NumReservation + 1;4 `6 B7 F u, ?6 L& p4 f4 I
end;5 n1 ~- w; Z& w& }% p
@.CurrIcon := "drivingHome";2 A+ T7 z- J1 Q* r
@.DrivingHome := true;0 o3 }- ^0 u* N- @- w" o
end;
3 Y P8 {3 e f5 \3 { else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 ~$ @* W5 X- ?6 @+ I& s
part := @.transpOrder;/ ?2 |8 a8 @2 T+ X! U# v, |
part.move(@);-- load part8 q( V+ b |1 P, \& x' U
@.CurrIcon := "load";
3 \% [1 s o j4 @ A* j- j) [ GlobalDistObj := part.globDestination;
9 }' Q8 J6 Q; k, U- q/ ? assignLObj := rgmanager.rgAssignL;6 ~+ p% ?* h+ Q) C3 ^1 l
row := assignLObj.getRowNo(GlobalDistObj);, S+ |: f2 [' e9 r1 H: ]
if Row = -1 then -- since 70
9 `% J/ C" H6 N if lan=1 then! S7 M: @" Q& P. l0 I3 [7 k9 n9 w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 B" M7 f) K1 P; H# s3 R( v( }8 i! I: d
to_str("in der Andockstation: \"",?.~.name,"\""));+ T0 s( W% h! h/ q- x& D) {3 t7 I
else9 J; q- X! y l* o/ b
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: \# s6 R1 H/ v1 y to_str("in docking station: \"",?.~.name,"\"")); " w2 K) H8 Y2 ]
end;
; a1 s$ Q" F3 M+ a else
+ A1 m- b) R! S1 ~9 P; k @.Destination := assignLObj[1,row];( P a \ y; h: i
end;
6 K( v4 B9 i" _+ C1 @ R- X newDirection(@);
2 L( o. }6 \8 q' _% i1 U1 r @.HasOrder := true;
1 s3 L8 p2 I( @- p5 G end;! D2 a; u, k2 n! s2 Y$ R, e6 L9 e6 v
end;
/ z2 ]6 ?1 K1 e; r' n; Mend; -- of the method8 h% k0 H$ Y: a* T3 `) y: L
|