/* called by: entrance ctrl of the object 'track'1 q4 l& k2 t* C5 k2 B* m0 S& Y- z
*/
+ Z) X0 q6 c7 eis: G0 a( J i$ f0 y3 e r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! d0 i( g/ o# udo
% N! X' X( m: o- y Lan := rootfolder.Internal.Tools.AOLlanguage;
. c4 O# a) f0 I: J8 v if current = @.Destination -- else return
3 e0 y4 N4 E* ` ? then
; M+ F) n! {7 |# K @.Destination := void;
$ B+ V. F; X' i# b0 U4 s if @.occupied then
) q* h& S2 C$ I. W( p' [ part := @.cont;
7 K& l0 R+ a/ e2 ^- ` @.transpOrder := void;
. L- _$ g' B; G part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( `: V" B' M! l9 d- a @,root.eventcontroller.simTime);
7 S# M8 S1 d+ C1 n7 D& | @.HasOrder := false;
7 O# N; V/ e) d' J' z @.DrivingHome := true;
( M1 E* n. t* e7 L rgManager.tryToStartTransOrder;) B9 v- i4 g* p+ T6 B' C6 ]
if @.Destination = void# v: F% G: ?+ O
then -- no transport order for vehicle @) q/ j. m7 X3 M- C; z5 L( G* H
@.Destination :=+ b7 X: O' q; a+ X7 T
rgManager.nearestFreeStation(@,track.~);
' X& N" E0 P" a8 ^, k$ r% e7 `& c newDirection(@); 8 M+ ~: d2 T8 Z& n: v. b+ o/ l
if @.Destination /= void then4 J$ t+ `' x+ r1 w0 E# G: \
@.Destination.NumReservation :=
+ A- L( E6 M, G, R% J+ O @.Destination.NumReservation + 1;
$ [) K0 a4 d8 L2 j end;
% M# Y( y6 w7 R3 j @.CurrIcon := "drivingHome";1 Q; {# l% r2 a. T
@.DrivingHome := true;
+ @8 T& l" b' ~7 e( u end;
9 j1 N2 M% \# K0 w8 `( P else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 ]/ H# y5 K5 h5 e' g4 F& M( r5 S part := @.transpOrder;
. Y& z: Q G6 v$ j& j0 g part.move(@);-- load part
% @ _+ E' Z7 z- O @.CurrIcon := "load";4 |" |2 C, I1 m4 l
GlobalDistObj := part.globDestination;
8 a+ O5 @+ I" M" J+ z$ n assignLObj := rgmanager.rgAssignL;( f' S3 c6 e- ]8 K9 c
row := assignLObj.getRowNo(GlobalDistObj);6 v, m% H: c/ p. ^( D
if Row = -1 then -- since 70" K" @+ n# o6 R% n! {$ l2 ]5 a
if lan=1 then/ K7 G9 O2 R$ Q6 w# C
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 k: {4 s$ @) m to_str("in der Andockstation: \"",?.~.name,"\""));) \/ U1 V5 i4 ~( N
else
! i" {! a! y; H# d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# a- h: H" q4 ~& ^6 j+ ~
to_str("in docking station: \"",?.~.name,"\"")); # V7 {0 {% b1 R: ?
end;) k; M( n- `) b- k& G9 c" G
else
+ n: a9 V- F, }: \2 Q! M" J @.Destination := assignLObj[1,row];' C0 ?& S% w& Y4 s' D
end;
* z g p# q5 a- m) K% s newDirection(@);; e, @' ^! g' \( N) D+ v
@.HasOrder := true;0 p" Y' N) h/ ^: W# f
end;
1 K0 {- e: }+ ~" N% T end;
; B+ ]7 E( Z9 Send; -- of the method4 k! Y- I2 \( t: {( a
|