/* called by: entrance ctrl of the object 'track'9 ?# O& | Y4 y" @
*/
" C+ L% f$ b+ i" I" Z$ g( jis
# d0 a6 K7 v1 m* K part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 [$ {3 `+ }6 V( a! F* m9 V0 H Bdo2 R8 `" V2 Q: T8 E4 U7 D% m& ~
Lan := rootfolder.Internal.Tools.AOLlanguage;% I; \5 k2 C t; x4 B! x; q
if current = @.Destination -- else return
" ]9 V m* w1 J- a' P# | then9 } b" o; B2 R, ^1 l
@.Destination := void;
4 H( v/ a' h( t9 L+ B% W9 q* T# t if @.occupied then7 u+ }6 D- o7 h% q. N& h
part := @.cont;
. p, }/ o3 ~& E0 F% ^9 Z. A/ Z @.transpOrder := void;6 e( m9 C+ T, r) J4 {4 p
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 Q- T, q7 z* o2 b3 V% y1 i. t! z @,root.eventcontroller.simTime);
8 d9 `1 q# V1 F1 C- S4 c: {/ g2 P @.HasOrder := false;
4 Z* f: @& @1 Z9 @( H! ? @.DrivingHome := true;
3 B+ J6 z: d3 e, ~- V4 n) p rgManager.tryToStartTransOrder;1 w0 Y- L/ c7 w6 v/ V
if @.Destination = void
5 ?$ G& f) k' I6 x, K$ k then -- no transport order for vehicle @
$ [; Y3 o& H o, A9 O4 w, s @.Destination :=- v# }) p; a4 j& n2 e. S* S5 l. h
rgManager.nearestFreeStation(@,track.~);
# d6 M, \- `: k5 k newDirection(@);
! A* F! r3 O$ i6 S8 V( \ if @.Destination /= void then" x, e9 o( B/ ~$ z
@.Destination.NumReservation :=$ N0 Y3 S2 `+ c6 @' D" m Z% b
@.Destination.NumReservation + 1;
1 h6 G, p$ U, [+ r" F1 l! ? end;0 @& I9 u e! F( ^
@.CurrIcon := "drivingHome";
9 f0 n% x$ X: I% g) Y; j. ` @.DrivingHome := true;
7 U& [ ~0 L }5 B% s0 i/ M, x/ a& c end;
: l' E8 S2 c; @: f+ F' X else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 w& Y+ Y: s) c
part := @.transpOrder; _( v) K1 e9 X- r
part.move(@);-- load part' k2 \; Q$ j6 _2 q8 e
@.CurrIcon := "load";
1 v- O! K7 o' s GlobalDistObj := part.globDestination;& S- p2 G# p$ H' p" ?
assignLObj := rgmanager.rgAssignL;
0 H; w" @. Z) C, Y3 z row := assignLObj.getRowNo(GlobalDistObj);
+ W: e5 G- v8 K# z if Row = -1 then -- since 70" j* n5 |% R; p. A" f. l$ S
if lan=1 then
7 a& R- |. g' S* H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 F3 |7 b/ S( e3 _% G
to_str("in der Andockstation: \"",?.~.name,"\""));
R" d. |2 I. V8 y3 g5 t else1 p: M' v9 B# M* h. y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; f' Y% C5 x& z
to_str("in docking station: \"",?.~.name,"\"")); 6 |2 u ^5 U( h! K; q8 X2 o4 O
end;
8 K# l( j7 T0 M; S2 g else
5 J3 |/ }. P$ c/ D1 T @.Destination := assignLObj[1,row];
- o% U$ G. ]" h) S$ @& j end;
0 l; a$ @% ^$ A1 E) F2 q5 ?& V newDirection(@);
8 U, T3 l K$ a; V3 ?$ m I @.HasOrder := true;: X7 {# F: s) h( G! d
end;
' v, d2 u7 o7 a end;
/ l- E/ `( u1 a7 f5 t( Gend; -- of the method, P+ b$ W. C3 u
|