/* called by: entrance ctrl of the object 'track'
2 ?0 i h" L2 @' G- a*/
+ w7 ~" m2 w. \! ?- T0 f" ]is
, Y1 z* Y( N$ v- e, A( w: W part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! ^9 R: A* M9 tdo
5 J, ]; S+ `( v+ Q Lan := rootfolder.Internal.Tools.AOLlanguage;
( h& V5 k, Z) T. u if current = @.Destination -- else return
0 O& c3 n% Y/ G9 g* F% |) E, d. C then
$ L5 b0 N2 T5 C7 X, }6 F) `: K @.Destination := void;% N0 F2 k2 ], ]
if @.occupied then
% |) s" O$ E8 G W! {0 H part := @.cont;
9 i" N N3 d' h; w7 L @.transpOrder := void;# {6 s3 h, I) s% e3 h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, S7 K; a# I/ Y# u5 ~% ]
@,root.eventcontroller.simTime);- C' p7 g' v3 o8 |: L4 m2 O: a
@.HasOrder := false;% C; ~& T9 c; X
@.DrivingHome := true;' o5 f, R0 Z' I( d5 n$ }
rgManager.tryToStartTransOrder;
8 ]! y; A/ ?% K, `& `+ h% J* Z if @.Destination = void3 g& d* x. L& [
then -- no transport order for vehicle @% h( D" n2 I$ s& b1 N
@.Destination :=) T6 ~/ l" [4 p! U
rgManager.nearestFreeStation(@,track.~);( M& b: L# M8 P% ^+ p" S. o: X
newDirection(@);
7 G; H4 x7 L2 y; P9 E5 M% `( i if @.Destination /= void then
. c3 [, w" d5 S, O6 F+ ~) f @.Destination.NumReservation :=+ k5 N, i+ p: j" \* n: ]
@.Destination.NumReservation + 1;! s: m. e+ [: I- d
end;9 e4 T3 s' T3 B1 h) g- p! v5 V. j- Q
@.CurrIcon := "drivingHome";
9 t g6 N5 k7 P+ B4 J" Y @.DrivingHome := true;; M- b! b- p; M/ C4 ?
end;7 K+ ^* Q* r/ E: V- {7 i9 Z. Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
A- N/ o, h$ K2 w! H part := @.transpOrder;9 n3 r! Q! s! j
part.move(@);-- load part3 D$ O$ k. @0 a* M
@.CurrIcon := "load";# |% B, j6 \/ @8 N# b
GlobalDistObj := part.globDestination;0 R' {; U; J( p* ~* s
assignLObj := rgmanager.rgAssignL;6 ^# C1 F9 ^" @/ S# T8 p
row := assignLObj.getRowNo(GlobalDistObj);
) h. _" `4 C% G' {+ J1 {# T; D if Row = -1 then -- since 70
1 k" G' o) }7 a if lan=1 then
/ z6 V1 Z3 a" c' B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 Q) i/ V! }( C) m0 c u1 f- e
to_str("in der Andockstation: \"",?.~.name,"\""));& `# r( @' M- ^0 l9 x
else5 z: D- ^7 u9 u' O: Z$ d7 v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" R. }4 Q* R$ t6 @* j1 K to_str("in docking station: \"",?.~.name,"\""));
8 U& X* |5 R! C- e- v end;4 D, D* k" q- i! R' U& x, k% K
else/ c: L# m& Q8 z0 ]7 b
@.Destination := assignLObj[1,row];
0 o M+ x C( _7 O end;
' c& y% [( l" o. [ B5 x newDirection(@);) ~- t1 L" V( u v9 \6 K1 k
@.HasOrder := true;
2 I* D2 w( i6 t+ j$ A8 t8 k end;
9 z" v0 w C, U5 p3 U end;
9 H# J/ g% ]$ r X0 ]end; -- of the method) i; k7 V& y. ~# A
|