/* called by: entrance ctrl of the object 'track'
6 D$ u& q& ]- d* |2 n& R' `*/; |6 m/ _" n1 N
is7 ?- m, e5 |, K
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- Z$ E* [9 s; |; \4 R) T' e
do
% d% p% H2 w! K% u P s Lan := rootfolder.Internal.Tools.AOLlanguage;' J6 O* q. e: W. }* ?
if current = @.Destination -- else return
4 a: J/ d# h. o- b: s+ b$ E then$ D5 s5 L5 D# B# J. J
@.Destination := void;
5 L( |; s. M) I if @.occupied then
|1 S6 v1 ~3 z: j part := @.cont;
8 d ?5 H4 P1 H/ `! g @.transpOrder := void;
( G. _1 O( O: y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 `5 U' f f: n' S @,root.eventcontroller.simTime);1 D5 D6 O8 O' a4 e9 D! S5 N
@.HasOrder := false;
4 |" y8 k0 R& j/ R5 h R1 ]# e8 Z @.DrivingHome := true;2 K4 j8 ~0 N# n. d
rgManager.tryToStartTransOrder;
/ l8 p; Z5 n% `7 P* i if @.Destination = void
1 g. Z+ h+ h4 ~0 D then -- no transport order for vehicle @
. B3 O/ V% W7 z! W9 d; d2 ` @.Destination :=" U' y, P9 P \" I; B* U* s- `
rgManager.nearestFreeStation(@,track.~);# S9 u/ _2 k* D4 w" Q. q) @' C
newDirection(@);
, n3 C3 Y+ S' s/ } if @.Destination /= void then C; @8 Z% Y! x0 ^ n Q3 }
@.Destination.NumReservation :=
- i- N- w9 L/ Q5 O! a& Q2 u0 B @.Destination.NumReservation + 1;
! l0 |2 [3 s+ @3 g# m2 \ end;+ a+ s) Y" I( u
@.CurrIcon := "drivingHome";
3 ?' }+ e( b) v9 L9 I8 J @.DrivingHome := true;
; \8 x" p; r- O: l. @! B end;
( m0 a' W4 i% j% m' ^- E else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 ]6 w% }6 @3 e; [, H4 X part := @.transpOrder;3 F- {. K+ b' \
part.move(@);-- load part0 p" e1 [& r. ~* H; I0 ]% \
@.CurrIcon := "load";2 t3 ~$ c* H9 X( g8 S- I
GlobalDistObj := part.globDestination;: C) a1 o1 t, @* ~5 F
assignLObj := rgmanager.rgAssignL;; M2 W K: K2 x( ], m/ H! }
row := assignLObj.getRowNo(GlobalDistObj);
1 s9 `& g1 B8 \6 G# k+ l0 j ` if Row = -1 then -- since 70
4 r2 F7 Z. s/ W. h if lan=1 then
! H5 D0 k# _' M! Y1 K& S: u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: ~1 `6 j2 R0 t; U
to_str("in der Andockstation: \"",?.~.name,"\""));
4 ~4 {6 t) a& Y/ q, p else6 U* a3 q- B4 }: w' a
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! A: t$ U6 k4 T& C0 ~* ? r/ N5 M
to_str("in docking station: \"",?.~.name,"\""));
( u- k3 N. w1 Y, r end;
$ k/ R# f- i( _5 \2 q" d2 P: d { else4 t3 C' n7 l8 P% {9 I
@.Destination := assignLObj[1,row];/ l& n: N* ~% B( b
end;
, l5 }: c n8 A0 r G! e newDirection(@);" z( p( ^6 K2 y( Q1 |' _4 y" u
@.HasOrder := true;
4 G2 K+ d% x) y& s7 o! o end;
2 ]5 J) s4 J4 I. b8 {# d/ B( S d end;$ E+ x: [* M+ V- a
end; -- of the method, @, B% }) B0 N4 m! b2 v
|