/* called by: entrance ctrl of the object 'track'9 A' u, k3 o1 M1 Y5 s. _
*/
8 X: K: C4 P; Y) ]7 O& l- Mis+ `$ x. p! l$ s3 s' B
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 S. R6 Y/ o6 a' g1 c) Ddo
. O+ y) w0 I. a Lan := rootfolder.Internal.Tools.AOLlanguage;
3 w# I" |1 ] F if current = @.Destination -- else return5 ?& Q7 P7 ^" e4 [$ A; w% y _
then' X2 g0 n5 a3 F$ W: H
@.Destination := void;/ }! s4 q2 D2 n) \8 v
if @.occupied then
, E1 c& O8 A, d/ g" | part := @.cont;
- b" b# Y* U: G' Q @.transpOrder := void;; X! H8 C5 W6 k
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 Q1 ?: ]2 d, y$ r9 C/ M. L( T @,root.eventcontroller.simTime);) V+ M p. ?) L7 h! M3 y9 g# `
@.HasOrder := false;4 B" ?# U5 d1 z9 M% |
@.DrivingHome := true;
% M$ T- m5 _( `2 H7 P0 W6 w+ T rgManager.tryToStartTransOrder;/ V# Q9 b: p, p5 @% ~
if @.Destination = void _& b& b1 C8 h9 ~5 j3 X) ^* u/ W" G
then -- no transport order for vehicle @3 Y& H! \. R& l! W: [) `
@.Destination :=
1 q8 a$ Z! z4 ~2 g rgManager.nearestFreeStation(@,track.~);
! g! S4 D- g# ~! v6 D newDirection(@); - a- _3 m2 B" L- C6 _
if @.Destination /= void then- V0 h; c/ o( `7 G' X& g) M. S- \$ i
@.Destination.NumReservation :=
7 e9 T2 s- H9 ^8 G4 g% I. ?! X @.Destination.NumReservation + 1;
' g. s4 L+ N5 W P& T end;
; _! w- ^" j0 R, a% V. k @.CurrIcon := "drivingHome";
2 e5 l5 @0 `& Z) ~! h$ i/ ]) P @.DrivingHome := true;( D: `' }( A8 e) ^- F
end;! E$ M$ |3 {' g& W, X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
^% U- Z& b" Q part := @.transpOrder;$ q- u2 O5 b0 |& u& [$ g9 I# a
part.move(@);-- load part' D# k$ \, C* g. }
@.CurrIcon := "load";
# K3 }2 H" _7 x0 F6 m/ a% S( V GlobalDistObj := part.globDestination;
5 M* F6 X& W) q. r" F assignLObj := rgmanager.rgAssignL;
( W7 i$ x6 ~" ~0 w row := assignLObj.getRowNo(GlobalDistObj);3 V2 ?% Z5 m8 q, k) {. N
if Row = -1 then -- since 701 x( `. k; i. G- z; ^ q; P$ e3 b
if lan=1 then
u7 y8 s. n. J" K" I1 v. F" M5 v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! N" L! ^4 q ]( d. t1 r; @
to_str("in der Andockstation: \"",?.~.name,"\""));
% I* s) Y) t) }4 j+ h. \' P% F) ] else" Y7 Q% p3 f# r2 d' C& B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) z. [' i9 d. Z" T/ t$ m
to_str("in docking station: \"",?.~.name,"\"")); # t: r) o" a. R5 P& d0 T* w& Q
end;. S" N b% o a0 ]! j
else
# {; L2 @! A$ _# p+ i @.Destination := assignLObj[1,row];; u: O; k0 T7 }* P: z8 s+ F! e$ K
end; 4 c1 ^' g6 n. n: m" i1 x( {
newDirection(@);, W2 Y+ ]: Y4 [2 z l
@.HasOrder := true;* ]6 c+ ^0 g1 G' {! y$ U
end;
3 H9 ?# e: f8 h; A end;
/ z, {; ~7 G2 Zend; -- of the method1 d1 b3 i# |+ C/ L- M: r" I
|