/* called by: entrance ctrl of the object 'track'
* M+ I( g! @) i7 I6 Y9 l; h*/# ~; }- [: Y: z: \
is+ Y8 _5 Y1 |% G9 ?. L" H# W: M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; q. D2 z; W5 n7 fdo
" a* C: p( q, s Lan := rootfolder.Internal.Tools.AOLlanguage;; j) \9 r, y* O; t: F6 v: f
if current = @.Destination -- else return# G% t/ L) T* J2 [- g5 D" P
then
8 U, O& ?' P: z v6 i& Q$ _' ] @.Destination := void;7 E& f; L0 |, f: ?) U& ?4 y& U b
if @.occupied then
R8 r0 q7 y8 l1 ~) e# Y' k; j part := @.cont;0 e; M% w8 q# D+ {# q" ?
@.transpOrder := void;
P# z. x& F3 N5 k; B$ C part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 k1 S Q$ r+ K H4 w5 `( \& P @,root.eventcontroller.simTime);
7 M/ F. U8 I/ ^( X9 l @.HasOrder := false;% K9 D2 A8 U* l0 J
@.DrivingHome := true;
" d, e: H3 U& ^9 n rgManager.tryToStartTransOrder;
5 a9 Z( J% w0 a$ p2 h if @.Destination = void
- S9 L, a1 {- f$ {9 D then -- no transport order for vehicle @5 m3 |" T9 L: U' ~
@.Destination :=
q9 W0 N3 E/ U6 Y* V9 L8 y; x rgManager.nearestFreeStation(@,track.~);
; a* m1 A# l0 A: H# d newDirection(@); % \: ^' {' G9 F9 I) Y9 Z1 `
if @.Destination /= void then. U) y. p) X. s% z, t: a4 S7 Y0 {
@.Destination.NumReservation :=
1 r2 H1 p& {8 w8 k5 E0 ` @.Destination.NumReservation + 1;/ I2 ?+ X; ]% G
end;
+ E" j% D2 a6 p# s7 i. |- L @.CurrIcon := "drivingHome";* y& O9 M4 Q6 h" c3 V
@.DrivingHome := true;# \8 S3 C7 K; c5 ]0 M, U
end;
$ E. f$ A; _8 Z3 B+ j else -- the vehicle @ is empty, both vehicle and part are in the same dock station: Q; I) B3 J! U$ b
part := @.transpOrder;
p8 Q; a9 D5 S3 P2 ~ part.move(@);-- load part
+ P# N' S% z J5 c @.CurrIcon := "load";
7 r$ n4 |; ~2 ^. d GlobalDistObj := part.globDestination;
) l' D2 ?/ N( B assignLObj := rgmanager.rgAssignL;
~$ r: b5 A: }4 Z& g' l8 Y row := assignLObj.getRowNo(GlobalDistObj);
; K$ o/ k6 ~ @% |& p if Row = -1 then -- since 70
4 B, u' |1 c2 Q* ?3 W" ] if lan=1 then1 e1 ]# @) R9 `9 _; _' @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ M; j; ]) i# ^( i: `& S {3 s$ {
to_str("in der Andockstation: \"",?.~.name,"\""));
& N: W. q. E8 W7 q! O4 r else
$ o C' E5 E7 U* Z( O& b" S4 h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: J2 d2 V! n/ B2 n A5 ?7 g1 U; s
to_str("in docking station: \"",?.~.name,"\""));
! b* [0 a! @' G5 }: @9 v* }. h end;
! ~5 W& o! a- q& T. X else' S8 B" E8 F) x8 G. s
@.Destination := assignLObj[1,row];
9 \- u- ?( _0 ]# u/ @ end; # @/ W, R" E5 p8 C6 ]4 y
newDirection(@);
* T0 U s0 W/ g2 v( ]2 y0 o @.HasOrder := true;' D1 t% O+ Z& q5 K3 B
end;! A+ a0 F0 G p# u4 |3 P A
end;
# X3 \7 g* {' @/ r, m6 u% P! }' wend; -- of the method( Q3 R* F) F& s1 m" D
|