/* called by: entrance ctrl of the object 'track'- X$ ^" a8 Q+ |0 _5 h% Z) _% v
*/
) ? Z5 o6 b. O3 @is) B o b; v- y$ b2 S$ Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# G8 U |8 V9 ]) ]* h
do
+ ^- f# |* b& k4 Y Lan := rootfolder.Internal.Tools.AOLlanguage;
; Q; P3 a0 }5 i' ^* W1 S4 } if current = @.Destination -- else return
8 m( Z( H3 R( E3 w6 K) v then
& o$ q- a* b5 ^8 l1 Z1 }7 O7 @% Q. W @.Destination := void;& B/ W. p* Y7 r0 |
if @.occupied then; K8 {( {- w/ Z& s0 N, r7 N
part := @.cont;
6 n6 x- ?- b; s! D1 P9 W @.transpOrder := void;
: r2 }; [5 ?4 J9 ^. r% x4 s | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& b& C- Q, k5 Y9 r @,root.eventcontroller.simTime);
. i1 E$ |( m; ^- H( j @.HasOrder := false;, s; b0 N H1 f& i
@.DrivingHome := true;0 e7 o5 M; f+ P- e& V3 O0 w
rgManager.tryToStartTransOrder;
3 `# l+ W: ]0 w! o if @.Destination = void) D& B: z; M. i5 w1 `
then -- no transport order for vehicle @
6 V8 w7 T0 P/ j# U @.Destination :=+ }" {: \+ w* I) B' R
rgManager.nearestFreeStation(@,track.~);
+ O7 D7 y9 M8 }8 S newDirection(@); / I# j# R. N/ r
if @.Destination /= void then
p! V8 ~- H, s/ o @.Destination.NumReservation :=
- b0 M9 i7 \ a; m4 R# Y2 A @.Destination.NumReservation + 1;
. l# }# H- z2 O8 Z end;3 d, ~3 Y$ K$ D' D3 M; b
@.CurrIcon := "drivingHome";4 `) f- ~% J7 u- f! A& n% |
@.DrivingHome := true;) q4 N' _& F8 F" b( e
end;$ x9 S b- F" r! _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 v1 J! s7 i) r! v' Y- s
part := @.transpOrder;
# @( n$ } O4 a! o5 F3 f, y part.move(@);-- load part5 p" V- X1 {+ j- y) M6 D2 l0 [4 x5 F
@.CurrIcon := "load";1 h3 I) M" Y* G6 v$ u
GlobalDistObj := part.globDestination;8 k* Z- A3 {) ?+ b( J& F
assignLObj := rgmanager.rgAssignL;0 U! c# e" E7 b. Q4 }; V1 i
row := assignLObj.getRowNo(GlobalDistObj);+ W4 y w6 k: L6 v
if Row = -1 then -- since 70
% z( ^* }3 j9 o* }) a& h if lan=1 then5 }4 n* }- R; ~7 k0 M, W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 h2 ~) Q( t( r6 k; _3 K1 f
to_str("in der Andockstation: \"",?.~.name,"\""));
0 w F7 m) |: A5 W else
|: f3 K$ X* Y1 o9 O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- \" F3 p7 v+ d to_str("in docking station: \"",?.~.name,"\"")); 5 u0 Z4 b* v' l1 K8 Q2 h
end;
/ q; Z( ]3 V2 @/ P6 b: I6 | else
$ v. h G' B1 A/ x4 m @.Destination := assignLObj[1,row];
5 T( w) w" V+ c3 v } end;
( x$ I' `3 S! q newDirection(@);
' G$ V0 }" s" K @.HasOrder := true;5 G) a) N9 Y, Y) f4 ~3 s
end;0 l1 m& h& Q3 k7 Q; L# w
end;
& ~$ r- _6 U8 X9 L, fend; -- of the method# A$ z3 U. M+ d% c6 X" {
|