Move projectile palette definition from weapon to projectile effects

This commit is contained in:
reaperrr
2015-03-10 22:33:17 +01:00
parent c61dc48548
commit fb710f15bb
6 changed files with 23 additions and 22 deletions

View File

@@ -46,8 +46,6 @@ namespace OpenRA.GameRules
public readonly bool Charges = false;
public readonly string Palette = "effect";
[Desc("What types of targets are affected.")]
public readonly string[] ValidTargets = { "Ground", "Water" };

View File

@@ -30,6 +30,7 @@ namespace OpenRA.Mods.Common.Effects
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("Arc in WAngles, two values indicate variable arc.")]
public readonly WAngle[] Angle = { WAngle.Zero };
@@ -158,7 +159,7 @@ namespace OpenRA.Mods.Common.Effects
yield return r;
}
var palette = wr.Palette(args.Weapon.Palette);
var palette = wr.Palette(info.Palette);
foreach (var r in anim.Render(pos, palette))
yield return r;
}

View File

@@ -19,6 +19,7 @@ namespace OpenRA.Mods.Common.Effects
public class GravityBombInfo : IProjectileInfo
{
public readonly string Image = null;
public readonly string Palette = "effect";
public readonly bool Shadow = false;
public readonly WRange Velocity = WRange.Zero;
public readonly WRange Acceleration = new WRange(15);
@@ -75,7 +76,7 @@ namespace OpenRA.Mods.Common.Effects
yield return r;
}
var palette = wr.Palette(args.Weapon.Palette);
var palette = wr.Palette(info.Palette);
foreach (var r in anim.Render(pos, palette))
yield return r;
}

View File

@@ -22,6 +22,9 @@ namespace OpenRA.Mods.Common.Effects
{
class MissileInfo : IProjectileInfo
{
public readonly string Image = null;
public readonly string Palette = "effect";
public readonly bool Shadow = false;
[Desc("Projectile speed in WRange / tick")]
public readonly WRange Speed = new WRange(8);
[Desc("Maximum vertical pitch when changing altitude.")]
@@ -30,13 +33,11 @@ namespace OpenRA.Mods.Common.Effects
public readonly int Arm = 0;
[Desc("Check for whether an actor with BlocksBullets: trait blocks fire")]
public readonly bool High = false;
public readonly bool Shadow = false;
public readonly string Trail = null;
[Desc("Maximum offset at the maximum range")]
public readonly WRange Inaccuracy = WRange.Zero;
[Desc("Probability of locking onto and following target.")]
public readonly int LockOnProbability = 100;
public readonly string Image = null;
[Desc("Rate of Turning")]
public readonly int ROT = 5;
[Desc("Explode when following the target longer than this.")]
@@ -211,7 +212,7 @@ namespace OpenRA.Mods.Common.Effects
yield return r;
}
var palette = wr.Palette(args.Weapon.Palette);
var palette = wr.Palette(info.Palette);
foreach (var r in anim.Render(pos, palette))
yield return r;
}

View File

@@ -325,7 +325,6 @@ TorpTube:
Range: 9c0
Report: TORPEDO1.AUD
ValidTargets: Water, Underwater, Bridge
Palette: shadow
Burst: 2
BurstDelay: 20
Projectile: Missile
@@ -336,6 +335,7 @@ TorpTube:
ROT: 1
RangeLimit: 160
BoundToTerrainType: Water
Palette: shadow
Warhead@1Dam: SpreadDamage
Spread: 426
Damage: 180

View File

@@ -88,7 +88,6 @@ Bazooka:
MinRange: 0c512
Report: RKETINF1.AUD
ValidTargets: Ground, Air
Palette: ra
Projectile: Missile
Speed: 213
Arm: 3
@@ -100,6 +99,7 @@ Bazooka:
RangeLimit: 50
CloseEnough: 256
LockOnProbability: 80
Palette: ra
Warhead@1Dam: SpreadDamage
Spread: 128
Damage: 35
@@ -131,7 +131,6 @@ MultiCluster:
Range: 6c0
Report: MISL1.AUD
ValidTargets: Ground
Palette: ra
Projectile: Missile
Speed: 170
Arm: 2
@@ -141,6 +140,7 @@ MultiCluster:
Image: DRAGON
ROT: 8
RangeLimit: 35
Palette: ra
Warhead@1Dam: SpreadDamage
Spread: 128
Damage: 65
@@ -352,13 +352,13 @@ FiendShard:
Burst: 3
Range: 5c0
Report: FIEND2.AUD
Palette: greentiberium
Projectile: Bullet
Speed: 213
Image: CRYSTAL4
Inaccuracy: 512
Shadow: true
Angle: 88
Palette: greentiberium
Warhead@1Dam: SpreadDamage
Damage: 35
DeathType: 1
@@ -403,7 +403,6 @@ HoverMissile:
Range: 8c0
Report: HOVRMIS1.AUD
ValidTargets: Ground, Air
Palette: ra
Projectile: Missile
Speed: 213
Arm: 2
@@ -413,6 +412,7 @@ HoverMissile:
Image: DRAGON
ROT: 8
RangeLimit: 35
Palette: ra
Warhead@1Dam: SpreadDamage
Spread: 128
Damage: 30
@@ -445,12 +445,12 @@ HoverMissile:
Report: 120MMF.AUD
Burst: 2
BurstDelay: 5
Palette: ra
Projectile: Bullet
Speed: 682
Image: 120mm
Shadow: true
Angle: 62
Palette: ra
Warhead@1Dam: SpreadDamage
Spread: 128
Damage: 50
@@ -478,7 +478,6 @@ MammothTusk:
Report: MISL1.AUD
ValidTargets: Air
Burst: 2
Palette: ra
Projectile: Missile
Arm: 0
High: yes
@@ -488,6 +487,7 @@ MammothTusk:
ROT: 10
Speed: 170
RangeLimit: 35
Palette: ra
Warhead@1Dam: SpreadDamage
Spread: 171
Damage: 40
@@ -638,7 +638,6 @@ BikeMissile:
Range: 5c0
Report: MISL1.AUD
ValidTargets: Ground
Palette: ra
Projectile: Missile
Arm: 2
High: yes
@@ -648,6 +647,7 @@ BikeMissile:
ROT: 8
Speed: 213
RangeLimit: 35
Palette: ra
Warhead@1Dam: SpreadDamage
Spread: 256
Damage: 40
@@ -742,7 +742,6 @@ Dragon:
Burst: 2
Report: MISL1.AUD
ValidTargets: Ground, Air
Palette: ra
Projectile: Missile
Speed: 213
Arm: 2
@@ -752,6 +751,7 @@ Dragon:
Image: DRAGON
ROT: 8
RangeLimit: 35
Palette: ra
Warhead@1Dam: SpreadDamage
Spread: 128
Damage: 30
@@ -782,12 +782,12 @@ Dragon:
ReloadDelay: 50
Range: 6c768
Report: 120MMF.AUD
Palette: ra
Projectile: Bullet
Speed: 682
Image: 120mm
Shadow: true
Angle: 62
Palette: ra
Warhead@1Dam: SpreadDamage
Spread: 128
Damage: 36
@@ -813,13 +813,13 @@ Dragon:
ReloadDelay: 110
Range: 18c0
Report: 120MMF.AUD
Palette: ra
Projectile: Bullet
Speed: 170
Image: 120mm
Angle: 165
Shadow: true
High: yes
Palette: ra
MinRange: 5c0
Warhead@1Dam: SpreadDamage
Spread: 298
@@ -849,7 +849,6 @@ Hellfire:
Report: ORCAMIS1.AUD
Burst: 2
ValidTargets: Ground, Air
Palette: ra
Projectile: Missile
Speed: 256
Arm: 2
@@ -859,6 +858,7 @@ Hellfire:
Image: DRAGON
ROT: 8
RangeLimit: 35
Palette: ra
Warhead@1Dam: SpreadDamage
Spread: 85
Damage: 30
@@ -888,11 +888,11 @@ Hellfire:
Bomb:
ReloadDelay: 10
Range: 5c0
Palette: player
Projectile: Bullet
Speed: 170
Image: canister
Shadow: true
Palette: player
Warhead@1Dam: SpreadDamage
Spread: 298
Damage: 160
@@ -1064,13 +1064,13 @@ RPGTower:
ReloadDelay: 80
Range: 8c0
Report: GLNCH4.AUD
Palette: player
Projectile: Bullet
Speed: 384
High: yes
Shadow: true
Angle: 62
Image: canister
Palette: player
Warhead@1Dam: SpreadDamage
Spread: 128
Damage: 110
@@ -1098,7 +1098,6 @@ SAMTower:
Range: 15c0
Report: SAMSHOT1.AUD
ValidTargets: Air
Palette: ra
Projectile: Missile
Speed: 298
Arm: 2
@@ -1108,6 +1107,7 @@ SAMTower:
Image: DRAGON
ROT: 5
RangeLimit: 60
Palette: ra
Warhead@1Dam: SpreadDamage
Spread: 128
Damage: 33