/* called by: entrance ctrl of the object 'track'# a# Z% Z; K9 D' u& R; V
*/
; K3 D Q; m# u: v- p, P* y8 Lis
, p$ f6 ~: B9 ], R8 v6 m part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ V0 Z) F w! O1 `2 w7 j3 g: edo" k g/ o, b/ l r/ T: V9 `
Lan := rootfolder.Internal.Tools.AOLlanguage;* _& K# b, b, ]8 k6 O
if current = @.Destination -- else return. z5 O0 Y. Z2 N/ c+ Q5 E* `3 f
then1 F; ]; S3 j, {3 N* r" I/ i7 b
@.Destination := void;
+ a' h% c. ?2 m; g! u if @.occupied then
p! V9 L& B. o* N4 N# B8 T9 l part := @.cont;6 g" v7 D# `6 \4 L( X
@.transpOrder := void;
9 @: B) B, y+ L4 u Y6 H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 f* c! a' c1 i; z0 T @,root.eventcontroller.simTime);( U5 s) ]$ y0 r2 r
@.HasOrder := false;
3 J" G0 v: h/ O* O# O8 U @.DrivingHome := true; I; n+ }) Z8 ^, C$ N
rgManager.tryToStartTransOrder;; ]' p$ M/ o: y( v4 V/ M* C$ _7 P
if @.Destination = void
7 F+ r& B1 m) J2 \- { then -- no transport order for vehicle @/ c; |0 L* L7 W9 i* ~" b
@.Destination :=
8 d9 [' s, {1 T1 w) N rgManager.nearestFreeStation(@,track.~);9 {4 v1 x4 y! T
newDirection(@);
, E/ ]- H9 w0 {! O j if @.Destination /= void then
7 K7 \, B; d# t @.Destination.NumReservation :=
) W0 A, \7 K5 C3 G+ h @.Destination.NumReservation + 1;" d% K3 Y4 u6 ]" k* j+ W: U
end;! y8 m* w V2 y6 ^7 g# V* M v
@.CurrIcon := "drivingHome";
1 k1 W. ^" S ~. \: b5 ^$ h2 @! Y @.DrivingHome := true;2 @% J t, j0 o/ P2 X' X
end;
* i0 q3 K7 S' { o4 z& P else -- the vehicle @ is empty, both vehicle and part are in the same dock station; A" O6 f3 [) o8 @3 K
part := @.transpOrder;
' A- d: f7 @5 Z part.move(@);-- load part; I1 ^' g8 j) {- X8 {" }
@.CurrIcon := "load";2 m" r5 g$ X% ]
GlobalDistObj := part.globDestination;3 t4 h2 I4 D2 m, F! M' T
assignLObj := rgmanager.rgAssignL;
! q. U* Z( o& q x/ F" s: V9 }8 W row := assignLObj.getRowNo(GlobalDistObj);: w; i/ ]. K4 W6 i( _4 i
if Row = -1 then -- since 706 b( L- v: a- g/ g
if lan=1 then
6 m1 Y# r% d; ?1 R( @; L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 k3 }/ K4 |* I, y1 f D/ V# t to_str("in der Andockstation: \"",?.~.name,"\""));
. h7 i% Y- M. a2 X o* g* g else. `- n! t% s% l6 l. W6 P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! A* l* m- z" f) ]" x# C4 ]( a0 i
to_str("in docking station: \"",?.~.name,"\""));
& D* @ |& R. u end;
* o6 {2 t# O5 D6 ^% s4 a% d- o else; @6 K7 d! H' k2 |! \
@.Destination := assignLObj[1,row];
4 K2 @# D9 z6 N! r. v: u4 ]1 t end; ( C1 y8 Y5 ]5 b8 j5 ?
newDirection(@);: l7 Y r: x' |( m1 }# m1 t
@.HasOrder := true;
! w% ~. Y) {: s! \0 z$ k end;/ b) h& f8 J/ I5 D
end;
% {2 o% F3 z8 Pend; -- of the method. B/ c7 f% ^2 O K
|