/* called by: entrance ctrl of the object 'track'
( _% t- [$ q. Y: E1 n7 B7 @*/
5 Q/ B" n7 `# Y) y$ w, gis
9 r5 n6 ?0 W. v& W part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ N9 R" T" v! g" W9 u: b
do
! u$ ^! E7 q- r3 z4 q1 V+ Z Lan := rootfolder.Internal.Tools.AOLlanguage;' A5 b% ^8 d6 Q. p5 @& ^
if current = @.Destination -- else return4 M3 y! M/ r R- n7 |7 |7 X* m
then' F0 F) q" I5 r$ e( L
@.Destination := void;/ H2 h' t/ S6 ^! ?7 c8 [6 ~9 b+ F
if @.occupied then/ s+ G' t' p: ]$ o5 m
part := @.cont;5 Y& J. V0 k4 P c
@.transpOrder := void;) d1 C6 f& E: S$ t
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 q, a( L+ e' b* w( L/ H
@,root.eventcontroller.simTime);
* e1 Z. ?' ]7 z8 I( r" M @.HasOrder := false;
% q$ q/ T t' z- h: T7 ]* s% A9 ? @.DrivingHome := true;
' h1 x& r3 Y* c; ?4 T$ @7 o rgManager.tryToStartTransOrder;: Y, t5 B( {( }+ y
if @.Destination = void+ H3 N8 `6 C$ r$ \2 m1 G
then -- no transport order for vehicle @
5 ]% T( X' q) V; [8 N: z* w4 U0 o @.Destination :=
?3 C4 M6 C: u2 y# w9 D, K8 N9 a rgManager.nearestFreeStation(@,track.~);
# E+ z4 h7 p: p& ?, Q9 \5 k newDirection(@);
' t- C. q7 A4 g, M6 \ if @.Destination /= void then
! L; X0 H9 p9 D. }& w2 X( [ @.Destination.NumReservation :=. Q+ h6 U& l( a" j8 z( |
@.Destination.NumReservation + 1;1 D! c& v) C# q8 ^& {
end;1 O: P/ c0 k6 o# n8 l0 v, d; x
@.CurrIcon := "drivingHome";
, E/ V g- L9 ~4 `1 z# F4 f7 H @.DrivingHome := true;
2 D, G/ ]0 s) T- q* Q end;
+ n9 ?3 e7 N* O* g; [% r* W( B else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ I- a! v# c5 @( u! |
part := @.transpOrder;
. N& N1 l9 d: L part.move(@);-- load part
& e5 T0 I2 _; i- F @.CurrIcon := "load";
( x% j! `- ?( r3 q" {$ U3 }$ A& m. p7 ?& ^ GlobalDistObj := part.globDestination;
, f0 m v4 [: ~5 W assignLObj := rgmanager.rgAssignL;
7 H+ N* ~& h6 C, b& W5 ] row := assignLObj.getRowNo(GlobalDistObj);! K: h$ f' @9 L- Q% |& o0 `6 @( T% ?6 [
if Row = -1 then -- since 70; ~6 R5 _5 g& i
if lan=1 then
0 d6 C8 ]; n8 q8 G h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( R6 [6 j1 g6 a4 C4 C% m: s' j
to_str("in der Andockstation: \"",?.~.name,"\""));3 @; |; T% j e) i" V& {1 [: A
else
2 X* f: h+ h8 P9 g promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 F% K* O$ _: m) Y
to_str("in docking station: \"",?.~.name,"\"")); 6 h/ C6 x4 {8 p! Z; i8 ^& r! m
end;/ m ~ I4 \8 k9 \& Y8 b* _4 f3 Y1 l
else7 c4 J% Q Y% u6 r
@.Destination := assignLObj[1,row];% R: q+ w; ]/ I& A! z7 ~* H
end;
1 z# W1 W1 D+ y9 o6 R \0 h newDirection(@);
+ o9 [) N+ I1 j& U9 d8 E, n @.HasOrder := true;
: j- F# p4 ~" ] end;1 f8 x5 X7 C: L% \1 q6 p
end;3 K, q4 T# G# m6 W" n! `9 p* g
end; -- of the method9 M4 a: U: [) \: L5 j
|