/* called by: entrance ctrl of the object 'track'
6 w3 q* s/ ?) ^' H) E# I/ a+ s*/
/ J5 ^+ m, m/ }5 W" eis) \% }- u5 G1 X b6 k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 @! M' E, |) h6 V1 e& T7 @do
/ ~1 i7 n. U: u" p+ P% F Lan := rootfolder.Internal.Tools.AOLlanguage;
5 C; G2 P8 Y; |, l0 U# S9 p! L if current = @.Destination -- else return
5 C# b& {7 ?2 e9 | then# s# x- }" M* U+ M; J% B
@.Destination := void;
( n$ t( e# h6 D' f if @.occupied then! N# C4 ~; N$ |4 m2 R9 n4 H" c
part := @.cont;8 N6 |7 E3 k+ M& E
@.transpOrder := void;
! f. t3 o" z5 T) C2 M2 s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 p5 ^/ u6 \" r9 ^( X5 U9 d5 Z
@,root.eventcontroller.simTime);
6 A9 y% V, m$ P @.HasOrder := false;
$ P7 Y* @6 _* i3 t1 \ @.DrivingHome := true;0 @* ?' O$ ^+ e% T6 o
rgManager.tryToStartTransOrder;
& d/ ?7 F' a7 l3 c7 |- |' K if @.Destination = void
) ]& y5 ^4 l: S then -- no transport order for vehicle @
. d1 G$ m' V8 q @.Destination :=7 K6 l( L; ^! b+ E) Q
rgManager.nearestFreeStation(@,track.~);
/ p$ V. C' q1 u newDirection(@); ) R4 E& e8 I' A: ^, a; Q
if @.Destination /= void then9 _ e1 s+ `8 Y! O
@.Destination.NumReservation :=
" @: |9 Q+ G: A0 k3 H" @# Y+ i @.Destination.NumReservation + 1;: R8 e' U6 \; U+ `
end;5 b1 s+ S! V+ g4 {* G, S
@.CurrIcon := "drivingHome";
, l( m4 G" O5 X2 a) }! S( D, N @.DrivingHome := true;3 P4 Y3 J! k, s x6 M$ `
end;
) A# E5 [0 P; B: R: c else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 V; e, s w1 v' Y8 m; m. |8 U/ t part := @.transpOrder;" p6 ~; d( l& D' B# V5 K; v% R3 z/ ^
part.move(@);-- load part
. v+ c2 }+ }% V# l2 S" ] @.CurrIcon := "load";
) S3 `; L. _* D GlobalDistObj := part.globDestination;
% K: @5 H6 O6 i* H3 H5 P assignLObj := rgmanager.rgAssignL;& p& G5 V1 ^' u. C
row := assignLObj.getRowNo(GlobalDistObj);
8 s A V+ v, a3 x- b+ w if Row = -1 then -- since 70
2 z! j0 ? [3 v' j; T# X& v1 D' ] if lan=1 then- a F. f1 W4 B" h5 v9 N8 w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 L8 T" p% o5 b F( z- ]- V2 }8 [ to_str("in der Andockstation: \"",?.~.name,"\""));
0 v1 C: o+ D, O" i1 Y else+ \- t) n/ Q% p) a6 U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 y7 P5 d. R7 F) Q
to_str("in docking station: \"",?.~.name,"\""));
! D2 m9 i4 U; Z; `( E: h2 M end;
0 `, Q, z9 D, ` _0 G) F/ w5 z else: I! E. c/ `9 c! q2 L8 [: k' R
@.Destination := assignLObj[1,row];
7 w5 ~, s; |! y5 T' c0 f( ? end; ! U5 p, r, h& D% ~
newDirection(@);8 K4 F6 y% r1 I* l a% p1 a' @
@.HasOrder := true; g& N6 D3 _, y: t2 c9 }
end;; {0 a1 I4 \# H: o4 R+ N
end;
; x9 I3 T& _8 [. Z- Lend; -- of the method6 G5 C2 A( b M6 J/ l
|