/* called by: entrance ctrl of the object 'track'8 X# @- P8 a9 N1 C; P: {
*/5 o- K0 w) s& R8 C
is
% L3 v' N; A- n1 U part, GlobalDistObj, assignLObj:object;row,Lan:integer;; p" E2 ]( A* ^, I m( A* ~4 N. K' O8 C
do$ u0 {1 E4 p* b
Lan := rootfolder.Internal.Tools.AOLlanguage;2 L) H& L- u+ ?' n
if current = @.Destination -- else return( H+ a/ p& H; C3 r
then- [, `6 K" Y+ q* [5 D r
@.Destination := void;- Y8 v9 h& O9 I2 d
if @.occupied then$ k' _4 `8 B( R3 q# T
part := @.cont;
; J6 E( z) _) o- s @.transpOrder := void;
4 f7 f" F* G' D4 c# s) Q r* a part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! T0 {$ V6 r6 g' S) t& d @,root.eventcontroller.simTime);' y; Y X/ R; X
@.HasOrder := false;
0 A# Q: [0 ]8 X) p7 z" ` @.DrivingHome := true;+ k& D* ?3 T7 u4 A, R/ T/ A
rgManager.tryToStartTransOrder;
( A1 H( b( e0 \0 A4 D: e: \ if @.Destination = void, x: b- i. ^1 \9 s1 q, _. P# [( R5 @' T
then -- no transport order for vehicle @
. V$ n! ^" N! v/ R% J1 V1 c @.Destination :=' T. ^- y5 y3 ^% A7 l
rgManager.nearestFreeStation(@,track.~);# k5 ?( J" c, D. K: b
newDirection(@);
1 g3 ^2 I! e( e if @.Destination /= void then' V& J7 K4 b& f# W; g3 r3 m$ o
@.Destination.NumReservation :=$ i# R1 L7 c' C1 D+ z
@.Destination.NumReservation + 1;7 N, k! u5 n7 _& r1 q- @" o
end;
' o! x$ ~: O1 V+ J+ ? @.CurrIcon := "drivingHome";
, g/ |7 M: H- W" b9 C k) [ @.DrivingHome := true;6 }& S0 d0 y; \2 D$ {0 w; |* a/ p
end;
! _9 C5 ?9 Z6 [0 n else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 {, K$ z5 |2 m# | e( {" A ?
part := @.transpOrder;
" U7 h' f0 [1 b' B' E part.move(@);-- load part
1 b8 \2 n% p& q; Z3 ?- Q @.CurrIcon := "load";
7 A7 J V( Y+ l# r, a5 u/ a& J5 L GlobalDistObj := part.globDestination;3 S3 f0 q4 E3 w
assignLObj := rgmanager.rgAssignL;$ Q; H" m9 p3 `& r/ t; a
row := assignLObj.getRowNo(GlobalDistObj);( v2 p$ \2 l. b
if Row = -1 then -- since 70
& \' l: v5 o$ Q7 Z if lan=1 then
4 E9 F% u' J* i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& b; h! S( T0 o8 O* @) q4 A7 b# r' x
to_str("in der Andockstation: \"",?.~.name,"\""));
. a8 n( A- v6 h h" B+ X3 x4 P; D else+ o: k9 {0 B8 M3 ]! \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 g( h: Z- ]5 I. w b7 Q to_str("in docking station: \"",?.~.name,"\"")); / ^5 T* G2 L4 l: G
end;
7 q( L5 }; ], m. j( F& P @9 b else
# S. x- N* _% S/ V, t @.Destination := assignLObj[1,row];9 T5 x5 B' f! R: C3 W! w7 y5 x
end; 5 b% t5 U" }! c4 h; u8 b
newDirection(@);& `8 _8 _# \+ N/ O
@.HasOrder := true;2 B7 F$ D0 N* i8 b D
end;
, T; T9 J7 X' [9 s end;
" Q, X, Q2 @; i$ K7 ~# b8 W8 Send; -- of the method5 p5 f6 ]! [ ^; B
|