Renames BlocksBullets to BlocksProjectiles and projectile High property to Blockable

This commit is contained in:
reaperrr
2015-03-10 22:46:58 +01:00
parent fb710f15bb
commit f9332c9efe
19 changed files with 76 additions and 76 deletions

View File

@@ -270,7 +270,7 @@ namespace OpenRA.Traits
public interface INotifyBecomingIdle { void OnBecomingIdle(Actor self); }
public interface INotifyIdle { void TickIdle(Actor self); }
public interface IBlocksBullets { }
public interface IBlocksProjectiles { }
public interface IRenderInfantrySequenceModifier
{
bool IsModifyingSequence { get; }

View File

@@ -28,10 +28,10 @@ namespace OpenRA.Mods.Common.Effects
[Desc("Maximum offset at the maximum range")]
public readonly WRange Inaccuracy = WRange.Zero;
public readonly string Image = null;
[Desc("Check for whether an actor with BlocksBullets: trait blocks fire")]
public readonly bool High = false;
public readonly string Palette = "effect";
public readonly bool Shadow = false;
[Desc("Is this blocked by actors with BlocksProjectiles trait.")]
public readonly bool Blockable = true;
[Desc("Arc in WAngles, two values indicate variable arc.")]
public readonly WAngle[] Angle = { WAngle.Zero };
public readonly int TrailInterval = 2;
@@ -136,8 +136,8 @@ namespace OpenRA.Mods.Common.Effects
if (info.ContrailLength > 0)
trail.Update(pos);
if (ticks++ >= length || (!info.High && world.ActorMap
.GetUnitsAt(world.Map.CellContaining(pos)).Any(a => a.HasTrait<IBlocksBullets>())))
if (ticks++ >= length || (info.Blockable && world.ActorMap
.GetUnitsAt(world.Map.CellContaining(pos)).Any(a => a.HasTrait<IBlocksProjectiles>())))
Explode(world);
}

View File

@@ -31,9 +31,9 @@ namespace OpenRA.Mods.Common.Effects
public readonly WAngle MaximumPitch = WAngle.FromDegrees(30);
[Desc("How many ticks before this missile is armed and can explode.")]
public readonly int Arm = 0;
[Desc("Check for whether an actor with BlocksBullets: trait blocks fire")]
public readonly bool High = false;
public readonly string Trail = null;
[Desc("Is the missile blocked by actors with BlocksProjectiles: trait.")]
public readonly bool Blockable = true;
[Desc("Maximum offset at the maximum range")]
public readonly WRange Inaccuracy = WRange.Zero;
[Desc("Probability of locking onto and following target.")]
@@ -176,7 +176,7 @@ namespace OpenRA.Mods.Common.Effects
var shouldExplode = (pos.Z < 0) // Hit the ground
|| (dist.LengthSquared < info.CloseEnough.Range * info.CloseEnough.Range) // Within range
|| (info.RangeLimit != 0 && ticks > info.RangeLimit) // Ran out of fuel
|| (!info.High && world.ActorMap.GetUnitsAt(cell).Any(a => a.HasTrait<IBlocksBullets>())) // Hit a wall
|| (info.Blockable && world.ActorMap.GetUnitsAt(cell).Any(a => a.HasTrait<IBlocksProjectiles>())) // Hit a wall or other blocking obstacle
|| !world.Map.Contains(cell) // This also avoids an IndexOutOfRangeException in GetTerrainInfo below.
|| (!string.IsNullOrEmpty(info.BoundToTerrainType) && world.Map.GetTerrainInfo(cell).Type != info.BoundToTerrainType); // Hit incompatible terrain

View File

@@ -246,7 +246,7 @@
<Compile Include="Traits\Attack\AttackWander.cs" />
<Compile Include="Traits\AutoHeal.cs" />
<Compile Include="Traits\AutoTarget.cs" />
<Compile Include="Traits\BlocksBullets.cs" />
<Compile Include="Traits\BlocksProjectiles.cs" />
<Compile Include="Traits\Buildable.cs" />
<Compile Include="Traits\Buildings\BaseBuilding.cs" />
<Compile Include="Traits\Buildings\BaseProvider.cs" />

View File

@@ -14,7 +14,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
// TODO: Add functionality like a customizable Height that is compared to projectile altitude
[Desc("This actor blocks bullets and missiles without 'High' property.")]
public class BlocksBulletsInfo : TraitInfo<BlocksBullets> { }
public class BlocksBullets : IBlocksBullets { }
[Desc("This actor blocks bullets and missiles with 'Blockable' property.")]
public class BlocksProjectilesInfo : TraitInfo<BlocksProjectiles> { }
public class BlocksProjectiles : IBlocksProjectiles { }
}

View File

@@ -531,7 +531,7 @@
Crushable:
CrushClasses: wall
CrushSound: sandbag2.aud
BlocksBullets:
BlocksProjectiles:
LineBuild:
Range: 8
NodeTypes: wall

View File

@@ -120,7 +120,7 @@ ArtilleryShell:
Report: TNKFIRE2.AUD
Projectile: Bullet
Speed: 204
High: yes
Blockable: false
Angle: 56
Inaccuracy: 1c256
ContrailLength: 30

View File

@@ -6,7 +6,7 @@ Rockets:
ValidTargets: Ground, Air
Projectile: Missile
Arm: 0
High: yes
Blockable: false
Inaccuracy: 128
Image: DRAGON
ROT: 15
@@ -40,7 +40,7 @@ BikeRockets:
BurstDelay: 10
Projectile: Missile
Arm: 0
High: yes
Blockable: false
Inaccuracy: 128
Image: DRAGON
ROT: 10
@@ -74,7 +74,7 @@ OrcaAGMissiles:
ValidTargets: Ground
Projectile: Missile
Arm: 0
High: yes
Blockable: false
Inaccuracy: 128
Image: DRAGON
ROT: 20
@@ -107,7 +107,7 @@ OrcaAAMissiles:
ValidTargets: Air
Projectile: Missile
Arm: 0
High: yes
Blockable: false
Inaccuracy: 128
Image: DRAGON
ROT: 20
@@ -138,7 +138,7 @@ MammothMissiles:
BurstDelay: 15
Projectile: Missile
Arm: 0
High: yes
Blockable: false
Inaccuracy: 128
Image: DRAGON
ROT: 20
@@ -177,7 +177,7 @@ MammothMissiles:
ValidTargets: Ground
Projectile: Bullet
Arm: 5
High: yes
Blockable: false
Shadow: true
Inaccuracy: 853
Angle: 62
@@ -211,7 +211,7 @@ MammothMissiles:
ValidTargets: Ground, Air
Projectile: Missile
Arm: 0
High: yes
Blockable: false
Inaccuracy: 213
Image: DRAGON
ROT: 10
@@ -243,7 +243,7 @@ BoatMissile:
Report: ROCKET2.AUD
Projectile: Missile
Arm: 0
High: yes
Blockable: false
Inaccuracy: 213
Image: DRAGON
ROT: 10
@@ -278,7 +278,7 @@ TowerMissle:
ValidTargets: Ground
Projectile: Missile
Arm: 0
High: yes
Blockable: false
Inaccuracy: 128
Image: DRAGON
ROT: 20
@@ -309,7 +309,7 @@ SAMMissile:
ValidTargets: Air
Projectile: Missile
Arm: 0
High: yes
Blockable: false
Image: MISSILE
ROT: 20
Speed: 426
@@ -338,7 +338,7 @@ HonestJohn:
Report: ROCKET1.AUD
Projectile: Bullet
Arm: 10
High: yes
Blockable: false
Shadow: true
Inaccuracy: 213
Image: patriot
@@ -368,7 +368,7 @@ Patriot:
Report: ROCKET2.AUD
ValidTargets: Air
Projectile: Missile
High: yes
Blockable: false
Image: patriot
Trail: smokey
ContrailLength: 8

View File

@@ -74,7 +74,7 @@ Grenade:
Report: toss1.aud
Projectile: Bullet
Speed: 119
High: yes
Blockable: false
Angle: 62
Inaccuracy: 213
Image: BOMB

View File

@@ -38,7 +38,7 @@ HeliAGGun:
Report: gun5.aud
Projectile: Bullet
Speed: 1c682
High: True
Blockable: false
Warhead@1Dam: SpreadDamage
Spread: 256
Damage: 20
@@ -61,7 +61,7 @@ HeliAAGun:
Report: gun5.aud
Projectile: Bullet
Speed: 1c682
High: True
Blockable: false
Warhead@1Dam: SpreadDamage
Spread: 128
Damage: 20
@@ -183,7 +183,7 @@ APCGun.AA:
ValidTargets: Air
Projectile: Bullet
Speed: 1c682
High: true
Blockable: false
Warhead@1Dam: SpreadDamage
Spread: 128
Damage: 25

View File

@@ -486,7 +486,7 @@ wall:
Type: Concrete
Crushable:
CrushClasses: Concretewall
BlocksBullets:
BlocksProjectiles:
LineBuild:
Range: 8
NodeTypes: wall, turret

View File

@@ -104,7 +104,7 @@ Slung:
ValidTargets: Ground
Projectile: Bullet
Speed: 320
High: true
Blockable: false
Shadow: yes
Angle: 88
Inaccuracy: 384
@@ -209,7 +209,7 @@ TurretGun:
Report: TURRET1.WAV
Projectile: Bullet
Speed: 704
High: yes
Blockable: false
Shadow: no
Inaccuracy: 288
Image: 120mm
@@ -238,7 +238,7 @@ TowerMissile:
BurstDelay: 15
Projectile: Bullet
Arm: 0
High: yes
Blockable: false
Shadow: yes
Inaccuracy: 384
Image: MISSILE2
@@ -342,7 +342,7 @@ DevBullet:
Projectile: Bullet
Speed: 358
Arm: 5
High: yes
Blockable: false
Shadow: yes
Inaccuracy: 1c416
Angle: 110
@@ -373,7 +373,7 @@ NerveGasMissile:
Report: MISSLE1.WAV
Projectile: Bullet
Speed: 448
High: true
Blockable: false
Shadow: yes
Angle: 110
Inaccuracy: 1c96
@@ -403,7 +403,7 @@ NerveGasMissile:
Report: MORTAR1.WAV
Projectile: Bullet
Speed: 256
High: true
Blockable: false
Shadow: yes
Angle: 62
Inaccuracy: 1c256
@@ -451,7 +451,7 @@ ChainGun:
Report: 20MMGUN1.WAV
Projectile: Bullet
Speed: 1c256
High: true
Blockable: false
Warhead@1Dam: SpreadDamage
Spread: 96
Damage: 20
@@ -659,7 +659,7 @@ Grenade:
Report:
Projectile: Bullet
Speed: 204
High: true
Blockable: false
Angle: 62
Inaccuracy: 416
Image: BOMBS
@@ -689,7 +689,7 @@ Shrapnel:
Report:
Projectile: Bullet
Speed: 50, 125
High: true
Blockable: false
Angle: 91, 264
Inaccuracy: 416
Image: bombs

View File

@@ -462,7 +462,7 @@
DestroyedSounds: sandbag2.aud
Crushable:
CrushClasses: wall
BlocksBullets:
BlocksProjectiles:
LineBuild:
Range: 8
NodeTypes: wall

View File

@@ -143,7 +143,7 @@ TurretGun:
Report: TANK5.AUD
Projectile: Bullet
Speed: 204
High: true
Blockable: false
Angle: 62
Inaccuracy: 1c682
Image: 120MM
@@ -176,7 +176,7 @@ TurretGun:
Report: TURRET1.AUD
Projectile: Bullet
Speed: 204
High: true
Blockable: false
Angle: 62
Inaccuracy: 2c938
Image: 120MM

View File

@@ -9,7 +9,7 @@ Maverick:
Projectile: Missile
Speed: 256
Arm: 2
High: true
Blockable: false
ContrailLength: 10
Inaccuracy: 512
Image: DRAGON
@@ -45,7 +45,7 @@ Dragon:
Projectile: Missile
Speed: 213
Arm: 2
High: true
Blockable: false
Trail: smokey
ContrailLength: 10
Inaccuracy: 128
@@ -83,7 +83,7 @@ HellfireAG:
Projectile: Missile
Speed: 256
Arm: 2
High: true
Blockable: false
ContrailLength: 10
Inaccuracy: 128
Image: DRAGON
@@ -120,7 +120,7 @@ HellfireAA:
Projectile: Missile
Speed: 384
Arm: 2
High: true
Blockable: false
ContrailLength: 10
Inaccuracy: 128
Image: DRAGON
@@ -156,7 +156,7 @@ MammothTusk:
Projectile: Missile
Speed: 341
Arm: 2
High: true
Blockable: false
ContrailLength: 10
Inaccuracy: 128
Image: DRAGON
@@ -194,7 +194,7 @@ Nike:
ValidTargets: Air
Projectile: Missile
Arm: 3
High: true
Blockable: false
ContrailLength: 10
Image: MISSILE
ROT: 25
@@ -224,7 +224,7 @@ RedEye:
ValidTargets: Air
Projectile: Missile
Arm: 3
High: true
Blockable: false
ContrailLength: 10
Image: MISSILE
ROT: 20
@@ -253,7 +253,7 @@ SubMissile:
Report: MISSILE6.AUD
Projectile: Bullet
Speed: 102
High: true
Blockable: false
Angle: 165
Inaccuracy: 2c938
Image: MISSILE
@@ -288,7 +288,7 @@ Stinger:
ValidTargets: Air, Ground, Water
Projectile: Missile
Arm: 3
High: true
Blockable: false
ContrailLength: 10
Image: DRAGON
ROT: 20
@@ -368,7 +368,7 @@ SCUD:
Report: MISSILE1.AUD
Projectile: Bullet
Speed: 170
High: true
Blockable: false
Shadow: false
Trail: smokey
TrailDelay: 5
@@ -404,7 +404,7 @@ APTusk:
Projectile: Missile
Speed: 298
Arm: 2
High: true
Blockable: false
Trail: smokey
ContrailLength: 10
Inaccuracy: 128

View File

@@ -56,7 +56,7 @@ Napalm:
Projectile: Bullet
Image: BOMBLET
Speed: 85
High: yes
Blockable: false
Warhead@1Dam: SpreadDamage
Spread: 170
Damage: 100
@@ -83,7 +83,7 @@ Grenade:
Report: grenade1.aud
Projectile: Bullet
Speed: 136
High: true
Blockable: false
Angle: 62
Inaccuracy: 554
Image: BOMB
@@ -115,7 +115,7 @@ DepthCharge:
Speed: 85
Image: BOMB
Angle: 62
High: true
Blockable: false
Inaccuracy: 128
Warhead@1Dam: SpreadDamage
Spread: 128

View File

@@ -30,7 +30,7 @@ ZSU-23:
ValidTargets: Air
Projectile: Bullet
Speed: 3c340
High: true
Blockable: false
Warhead@1Dam: SpreadDamage
Spread: 213
Damage: 12
@@ -162,7 +162,7 @@ ChainGun:
Report: GUN13.AUD
Projectile: Bullet
Speed: 1c682
High: true
Blockable: false
Warhead@1Dam: SpreadDamage
Spread: 128
Damage: 30
@@ -187,7 +187,7 @@ ChainGun.Yak:
Report: GUN13.AUD
Projectile: Bullet
Speed: 1c682
High: true
Blockable: false
Warhead@1Dam: SpreadDamage
Spread: 128
Damage: 40
@@ -300,7 +300,7 @@ FLAK-23:
ValidTargets: Air, Ground, Water
Projectile: Bullet
Speed: 1c682
High: true
Blockable: false
Warhead@1Dam: SpreadDamage
Spread: 213
Damage: 20

View File

@@ -110,7 +110,7 @@
DestroyedSounds: crmble2.aud
Crushable:
CrushClasses: wall
BlocksBullets:
BlocksProjectiles:
LineBuild:
Range: 8
NodeTypes: wall

View File

@@ -55,7 +55,7 @@ Grenade:
Range: 4c512
Projectile: Bullet
Speed: 85
High: yes
Blockable: false
Shadow: true
Angle: 62
Inaccuracy: 554
@@ -91,7 +91,7 @@ Bazooka:
Projectile: Missile
Speed: 213
Arm: 3
High: true
Blockable: false
Shadow: true
Inaccuracy: 128
Image: DRAGON
@@ -134,7 +134,7 @@ MultiCluster:
Projectile: Missile
Speed: 170
Arm: 2
High: yes
Blockable: false
Shadow: true
Inaccuracy: 128
Image: DRAGON
@@ -249,7 +249,7 @@ CyCannon:
ValidTargets: Ground
Projectile: Bullet
Speed: 192
High: yes
Blockable: false
Shadow: true
Image: TORPEDO
Warhead@1Dam: SpreadDamage
@@ -406,7 +406,7 @@ HoverMissile:
Projectile: Missile
Speed: 213
Arm: 2
High: yes
Blockable: false
Shadow: true
Inaccuracy: 128
Image: DRAGON
@@ -480,7 +480,7 @@ MammothTusk:
Burst: 2
Projectile: Missile
Arm: 0
High: yes
Blockable: false
Shadow: true
Inaccuracy: 128
Image: DRAGON
@@ -640,7 +640,7 @@ BikeMissile:
ValidTargets: Ground
Projectile: Missile
Arm: 2
High: yes
Blockable: false
Shadow: true
Inaccuracy: 128
Image: DRAGON
@@ -745,7 +745,7 @@ Dragon:
Projectile: Missile
Speed: 213
Arm: 2
High: yes
Blockable: false
Shadow: true
Inaccuracy: 128
Image: DRAGON
@@ -818,7 +818,7 @@ Dragon:
Image: 120mm
Angle: 165
Shadow: true
High: yes
Blockable: false
Palette: ra
MinRange: 5c0
Warhead@1Dam: SpreadDamage
@@ -852,7 +852,7 @@ Hellfire:
Projectile: Missile
Speed: 256
Arm: 2
High: yes
Blockable: false
Shadow: true
Inaccuracy: 128
Image: DRAGON
@@ -924,7 +924,7 @@ Proton:
Projectile: Missile
Speed: 256
Arm: 2
High: yes
Blockable: false
Shadow: true
Inaccuracy: 128
Image: TORPEDO
@@ -1066,7 +1066,7 @@ RPGTower:
Report: GLNCH4.AUD
Projectile: Bullet
Speed: 384
High: yes
Blockable: false
Shadow: true
Angle: 62
Image: canister
@@ -1101,7 +1101,7 @@ SAMTower:
Projectile: Missile
Speed: 298
Arm: 2
High: yes
Blockable: false
Shadow: true
Inaccuracy: 128
Image: DRAGON
@@ -1149,7 +1149,7 @@ EMPulseCannon:
Report: PLSECAN2.AUD
Projectile: Bullet
Speed: 425
High: yes
Blockable: false
Shadow: true
Angle: 62
Image: pulsball