/* called by: entrance ctrl of the object 'track'
1 F% p2 o+ j" @% k! ?*/
$ e3 c, m' t3 Gis9 Z+ d" `* i, `1 g% Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ m( v8 H! B' n2 e: I2 f3 K9 V$ edo# U- j# z; b. q. x
Lan := rootfolder.Internal.Tools.AOLlanguage;0 ?) \/ ?0 O8 R) s) f5 m
if current = @.Destination -- else return
; S% A' y, J' @6 _3 ]$ A then4 L/ ?( I6 \; p7 {9 c- n0 S
@.Destination := void;
/ O* r/ y, j! D4 h9 p1 W/ d2 T if @.occupied then5 O9 O. P7 I( [8 B) l: P U. f" g
part := @.cont;$ K. P. u2 p6 P( x$ @% V( S# ?$ o
@.transpOrder := void;9 X' W/ @2 M0 j0 S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( y# K, f3 h, F5 W( p5 f! l @,root.eventcontroller.simTime);9 S3 h; b4 A+ ^& d3 Q3 J. o! Y3 Y
@.HasOrder := false;& `0 n( v/ K: Y# @/ v
@.DrivingHome := true;; R }" i7 s+ e: \, p
rgManager.tryToStartTransOrder;; C- k# T/ @1 L) }
if @.Destination = void
Q: T. E! O+ h0 I( v9 a then -- no transport order for vehicle @$ ?2 a! |* M; |# b) t
@.Destination :=
- R1 L ~- ~: I- a. y- \3 D rgManager.nearestFreeStation(@,track.~);
! F: K' n; V$ p6 |4 n8 Y7 C newDirection(@);
: D1 i& M8 S; X: z* | if @.Destination /= void then* y) M R# l+ T# N. c3 }
@.Destination.NumReservation :=
5 t0 Z! s) ~5 l1 a @.Destination.NumReservation + 1;) ^) \6 d% n0 y6 |
end;) X+ A& B, N; J' h
@.CurrIcon := "drivingHome";( D s1 F' Q: u' C
@.DrivingHome := true;
/ \, G/ @0 D9 G" S- y end;
% a# C( [! ^( a- _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 h2 r3 \; H7 m! B2 b5 G4 v part := @.transpOrder;0 Y" B* g1 V3 Z, _, c% Z
part.move(@);-- load part
' {$ k; `# _; `2 l! l7 p @.CurrIcon := "load";
- x0 N% l- Q8 z$ A1 k4 E& S5 ] GlobalDistObj := part.globDestination;
4 X. Y) I( Y- ^. [& [3 Y assignLObj := rgmanager.rgAssignL;- o& b- y6 w2 w9 E) t8 [4 x
row := assignLObj.getRowNo(GlobalDistObj);# B4 V A m( I1 H9 y* V
if Row = -1 then -- since 70
( g6 |- [7 J; Y5 l if lan=1 then- w- ?1 I1 ~ v; ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( h' `; j3 L5 D+ w+ A8 h& T! a to_str("in der Andockstation: \"",?.~.name,"\""));8 v i0 p2 A. J: {5 v
else
. j% v% K9 }4 v$ u- ^. [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 p5 }7 z* ] Y6 P' H( _0 N; e to_str("in docking station: \"",?.~.name,"\"")); # V) V0 W. m- e, d
end;
3 i* f6 R( H- w8 ^3 Q else7 x* W2 n9 S$ x1 ]! O& D/ V
@.Destination := assignLObj[1,row];
1 ]! r, ]! L, R+ ]# f1 N1 ?9 Y# E end; m7 [9 J% n7 T/ b$ D
newDirection(@);7 I9 t8 G) k& v
@.HasOrder := true;
5 F4 w9 A( K- B- }: j4 i end;
3 ]) D( m( L/ Y0 t1 k3 _ end;, {5 P g" ?% A6 Z9 H
end; -- of the method9 y8 K4 g9 H6 a: [! n
|