Move projectile palette definition from weapon to projectile effects
This commit is contained in:
@@ -46,8 +46,6 @@ namespace OpenRA.GameRules
|
|||||||
|
|
||||||
public readonly bool Charges = false;
|
public readonly bool Charges = false;
|
||||||
|
|
||||||
public readonly string Palette = "effect";
|
|
||||||
|
|
||||||
[Desc("What types of targets are affected.")]
|
[Desc("What types of targets are affected.")]
|
||||||
public readonly string[] ValidTargets = { "Ground", "Water" };
|
public readonly string[] ValidTargets = { "Ground", "Water" };
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ namespace OpenRA.Mods.Common.Effects
|
|||||||
public readonly string Image = null;
|
public readonly string Image = null;
|
||||||
[Desc("Check for whether an actor with BlocksBullets: trait blocks fire")]
|
[Desc("Check for whether an actor with BlocksBullets: trait blocks fire")]
|
||||||
public readonly bool High = false;
|
public readonly bool High = false;
|
||||||
|
public readonly string Palette = "effect";
|
||||||
public readonly bool Shadow = false;
|
public readonly bool Shadow = false;
|
||||||
[Desc("Arc in WAngles, two values indicate variable arc.")]
|
[Desc("Arc in WAngles, two values indicate variable arc.")]
|
||||||
public readonly WAngle[] Angle = { WAngle.Zero };
|
public readonly WAngle[] Angle = { WAngle.Zero };
|
||||||
@@ -158,7 +159,7 @@ namespace OpenRA.Mods.Common.Effects
|
|||||||
yield return r;
|
yield return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
var palette = wr.Palette(args.Weapon.Palette);
|
var palette = wr.Palette(info.Palette);
|
||||||
foreach (var r in anim.Render(pos, palette))
|
foreach (var r in anim.Render(pos, palette))
|
||||||
yield return r;
|
yield return r;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ namespace OpenRA.Mods.Common.Effects
|
|||||||
public class GravityBombInfo : IProjectileInfo
|
public class GravityBombInfo : IProjectileInfo
|
||||||
{
|
{
|
||||||
public readonly string Image = null;
|
public readonly string Image = null;
|
||||||
|
public readonly string Palette = "effect";
|
||||||
public readonly bool Shadow = false;
|
public readonly bool Shadow = false;
|
||||||
public readonly WRange Velocity = WRange.Zero;
|
public readonly WRange Velocity = WRange.Zero;
|
||||||
public readonly WRange Acceleration = new WRange(15);
|
public readonly WRange Acceleration = new WRange(15);
|
||||||
@@ -75,7 +76,7 @@ namespace OpenRA.Mods.Common.Effects
|
|||||||
yield return r;
|
yield return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
var palette = wr.Palette(args.Weapon.Palette);
|
var palette = wr.Palette(info.Palette);
|
||||||
foreach (var r in anim.Render(pos, palette))
|
foreach (var r in anim.Render(pos, palette))
|
||||||
yield return r;
|
yield return r;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ namespace OpenRA.Mods.Common.Effects
|
|||||||
{
|
{
|
||||||
class MissileInfo : IProjectileInfo
|
class MissileInfo : IProjectileInfo
|
||||||
{
|
{
|
||||||
|
public readonly string Image = null;
|
||||||
|
public readonly string Palette = "effect";
|
||||||
|
public readonly bool Shadow = false;
|
||||||
[Desc("Projectile speed in WRange / tick")]
|
[Desc("Projectile speed in WRange / tick")]
|
||||||
public readonly WRange Speed = new WRange(8);
|
public readonly WRange Speed = new WRange(8);
|
||||||
[Desc("Maximum vertical pitch when changing altitude.")]
|
[Desc("Maximum vertical pitch when changing altitude.")]
|
||||||
@@ -30,13 +33,11 @@ namespace OpenRA.Mods.Common.Effects
|
|||||||
public readonly int Arm = 0;
|
public readonly int Arm = 0;
|
||||||
[Desc("Check for whether an actor with BlocksBullets: trait blocks fire")]
|
[Desc("Check for whether an actor with BlocksBullets: trait blocks fire")]
|
||||||
public readonly bool High = false;
|
public readonly bool High = false;
|
||||||
public readonly bool Shadow = false;
|
|
||||||
public readonly string Trail = null;
|
public readonly string Trail = null;
|
||||||
[Desc("Maximum offset at the maximum range")]
|
[Desc("Maximum offset at the maximum range")]
|
||||||
public readonly WRange Inaccuracy = WRange.Zero;
|
public readonly WRange Inaccuracy = WRange.Zero;
|
||||||
[Desc("Probability of locking onto and following target.")]
|
[Desc("Probability of locking onto and following target.")]
|
||||||
public readonly int LockOnProbability = 100;
|
public readonly int LockOnProbability = 100;
|
||||||
public readonly string Image = null;
|
|
||||||
[Desc("Rate of Turning")]
|
[Desc("Rate of Turning")]
|
||||||
public readonly int ROT = 5;
|
public readonly int ROT = 5;
|
||||||
[Desc("Explode when following the target longer than this.")]
|
[Desc("Explode when following the target longer than this.")]
|
||||||
@@ -211,7 +212,7 @@ namespace OpenRA.Mods.Common.Effects
|
|||||||
yield return r;
|
yield return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
var palette = wr.Palette(args.Weapon.Palette);
|
var palette = wr.Palette(info.Palette);
|
||||||
foreach (var r in anim.Render(pos, palette))
|
foreach (var r in anim.Render(pos, palette))
|
||||||
yield return r;
|
yield return r;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -325,7 +325,6 @@ TorpTube:
|
|||||||
Range: 9c0
|
Range: 9c0
|
||||||
Report: TORPEDO1.AUD
|
Report: TORPEDO1.AUD
|
||||||
ValidTargets: Water, Underwater, Bridge
|
ValidTargets: Water, Underwater, Bridge
|
||||||
Palette: shadow
|
|
||||||
Burst: 2
|
Burst: 2
|
||||||
BurstDelay: 20
|
BurstDelay: 20
|
||||||
Projectile: Missile
|
Projectile: Missile
|
||||||
@@ -336,6 +335,7 @@ TorpTube:
|
|||||||
ROT: 1
|
ROT: 1
|
||||||
RangeLimit: 160
|
RangeLimit: 160
|
||||||
BoundToTerrainType: Water
|
BoundToTerrainType: Water
|
||||||
|
Palette: shadow
|
||||||
Warhead@1Dam: SpreadDamage
|
Warhead@1Dam: SpreadDamage
|
||||||
Spread: 426
|
Spread: 426
|
||||||
Damage: 180
|
Damage: 180
|
||||||
|
|||||||
@@ -88,7 +88,6 @@ Bazooka:
|
|||||||
MinRange: 0c512
|
MinRange: 0c512
|
||||||
Report: RKETINF1.AUD
|
Report: RKETINF1.AUD
|
||||||
ValidTargets: Ground, Air
|
ValidTargets: Ground, Air
|
||||||
Palette: ra
|
|
||||||
Projectile: Missile
|
Projectile: Missile
|
||||||
Speed: 213
|
Speed: 213
|
||||||
Arm: 3
|
Arm: 3
|
||||||
@@ -100,6 +99,7 @@ Bazooka:
|
|||||||
RangeLimit: 50
|
RangeLimit: 50
|
||||||
CloseEnough: 256
|
CloseEnough: 256
|
||||||
LockOnProbability: 80
|
LockOnProbability: 80
|
||||||
|
Palette: ra
|
||||||
Warhead@1Dam: SpreadDamage
|
Warhead@1Dam: SpreadDamage
|
||||||
Spread: 128
|
Spread: 128
|
||||||
Damage: 35
|
Damage: 35
|
||||||
@@ -131,7 +131,6 @@ MultiCluster:
|
|||||||
Range: 6c0
|
Range: 6c0
|
||||||
Report: MISL1.AUD
|
Report: MISL1.AUD
|
||||||
ValidTargets: Ground
|
ValidTargets: Ground
|
||||||
Palette: ra
|
|
||||||
Projectile: Missile
|
Projectile: Missile
|
||||||
Speed: 170
|
Speed: 170
|
||||||
Arm: 2
|
Arm: 2
|
||||||
@@ -141,6 +140,7 @@ MultiCluster:
|
|||||||
Image: DRAGON
|
Image: DRAGON
|
||||||
ROT: 8
|
ROT: 8
|
||||||
RangeLimit: 35
|
RangeLimit: 35
|
||||||
|
Palette: ra
|
||||||
Warhead@1Dam: SpreadDamage
|
Warhead@1Dam: SpreadDamage
|
||||||
Spread: 128
|
Spread: 128
|
||||||
Damage: 65
|
Damage: 65
|
||||||
@@ -352,13 +352,13 @@ FiendShard:
|
|||||||
Burst: 3
|
Burst: 3
|
||||||
Range: 5c0
|
Range: 5c0
|
||||||
Report: FIEND2.AUD
|
Report: FIEND2.AUD
|
||||||
Palette: greentiberium
|
|
||||||
Projectile: Bullet
|
Projectile: Bullet
|
||||||
Speed: 213
|
Speed: 213
|
||||||
Image: CRYSTAL4
|
Image: CRYSTAL4
|
||||||
Inaccuracy: 512
|
Inaccuracy: 512
|
||||||
Shadow: true
|
Shadow: true
|
||||||
Angle: 88
|
Angle: 88
|
||||||
|
Palette: greentiberium
|
||||||
Warhead@1Dam: SpreadDamage
|
Warhead@1Dam: SpreadDamage
|
||||||
Damage: 35
|
Damage: 35
|
||||||
DeathType: 1
|
DeathType: 1
|
||||||
@@ -403,7 +403,6 @@ HoverMissile:
|
|||||||
Range: 8c0
|
Range: 8c0
|
||||||
Report: HOVRMIS1.AUD
|
Report: HOVRMIS1.AUD
|
||||||
ValidTargets: Ground, Air
|
ValidTargets: Ground, Air
|
||||||
Palette: ra
|
|
||||||
Projectile: Missile
|
Projectile: Missile
|
||||||
Speed: 213
|
Speed: 213
|
||||||
Arm: 2
|
Arm: 2
|
||||||
@@ -413,6 +412,7 @@ HoverMissile:
|
|||||||
Image: DRAGON
|
Image: DRAGON
|
||||||
ROT: 8
|
ROT: 8
|
||||||
RangeLimit: 35
|
RangeLimit: 35
|
||||||
|
Palette: ra
|
||||||
Warhead@1Dam: SpreadDamage
|
Warhead@1Dam: SpreadDamage
|
||||||
Spread: 128
|
Spread: 128
|
||||||
Damage: 30
|
Damage: 30
|
||||||
@@ -445,12 +445,12 @@ HoverMissile:
|
|||||||
Report: 120MMF.AUD
|
Report: 120MMF.AUD
|
||||||
Burst: 2
|
Burst: 2
|
||||||
BurstDelay: 5
|
BurstDelay: 5
|
||||||
Palette: ra
|
|
||||||
Projectile: Bullet
|
Projectile: Bullet
|
||||||
Speed: 682
|
Speed: 682
|
||||||
Image: 120mm
|
Image: 120mm
|
||||||
Shadow: true
|
Shadow: true
|
||||||
Angle: 62
|
Angle: 62
|
||||||
|
Palette: ra
|
||||||
Warhead@1Dam: SpreadDamage
|
Warhead@1Dam: SpreadDamage
|
||||||
Spread: 128
|
Spread: 128
|
||||||
Damage: 50
|
Damage: 50
|
||||||
@@ -478,7 +478,6 @@ MammothTusk:
|
|||||||
Report: MISL1.AUD
|
Report: MISL1.AUD
|
||||||
ValidTargets: Air
|
ValidTargets: Air
|
||||||
Burst: 2
|
Burst: 2
|
||||||
Palette: ra
|
|
||||||
Projectile: Missile
|
Projectile: Missile
|
||||||
Arm: 0
|
Arm: 0
|
||||||
High: yes
|
High: yes
|
||||||
@@ -488,6 +487,7 @@ MammothTusk:
|
|||||||
ROT: 10
|
ROT: 10
|
||||||
Speed: 170
|
Speed: 170
|
||||||
RangeLimit: 35
|
RangeLimit: 35
|
||||||
|
Palette: ra
|
||||||
Warhead@1Dam: SpreadDamage
|
Warhead@1Dam: SpreadDamage
|
||||||
Spread: 171
|
Spread: 171
|
||||||
Damage: 40
|
Damage: 40
|
||||||
@@ -638,7 +638,6 @@ BikeMissile:
|
|||||||
Range: 5c0
|
Range: 5c0
|
||||||
Report: MISL1.AUD
|
Report: MISL1.AUD
|
||||||
ValidTargets: Ground
|
ValidTargets: Ground
|
||||||
Palette: ra
|
|
||||||
Projectile: Missile
|
Projectile: Missile
|
||||||
Arm: 2
|
Arm: 2
|
||||||
High: yes
|
High: yes
|
||||||
@@ -648,6 +647,7 @@ BikeMissile:
|
|||||||
ROT: 8
|
ROT: 8
|
||||||
Speed: 213
|
Speed: 213
|
||||||
RangeLimit: 35
|
RangeLimit: 35
|
||||||
|
Palette: ra
|
||||||
Warhead@1Dam: SpreadDamage
|
Warhead@1Dam: SpreadDamage
|
||||||
Spread: 256
|
Spread: 256
|
||||||
Damage: 40
|
Damage: 40
|
||||||
@@ -742,7 +742,6 @@ Dragon:
|
|||||||
Burst: 2
|
Burst: 2
|
||||||
Report: MISL1.AUD
|
Report: MISL1.AUD
|
||||||
ValidTargets: Ground, Air
|
ValidTargets: Ground, Air
|
||||||
Palette: ra
|
|
||||||
Projectile: Missile
|
Projectile: Missile
|
||||||
Speed: 213
|
Speed: 213
|
||||||
Arm: 2
|
Arm: 2
|
||||||
@@ -752,6 +751,7 @@ Dragon:
|
|||||||
Image: DRAGON
|
Image: DRAGON
|
||||||
ROT: 8
|
ROT: 8
|
||||||
RangeLimit: 35
|
RangeLimit: 35
|
||||||
|
Palette: ra
|
||||||
Warhead@1Dam: SpreadDamage
|
Warhead@1Dam: SpreadDamage
|
||||||
Spread: 128
|
Spread: 128
|
||||||
Damage: 30
|
Damage: 30
|
||||||
@@ -782,12 +782,12 @@ Dragon:
|
|||||||
ReloadDelay: 50
|
ReloadDelay: 50
|
||||||
Range: 6c768
|
Range: 6c768
|
||||||
Report: 120MMF.AUD
|
Report: 120MMF.AUD
|
||||||
Palette: ra
|
|
||||||
Projectile: Bullet
|
Projectile: Bullet
|
||||||
Speed: 682
|
Speed: 682
|
||||||
Image: 120mm
|
Image: 120mm
|
||||||
Shadow: true
|
Shadow: true
|
||||||
Angle: 62
|
Angle: 62
|
||||||
|
Palette: ra
|
||||||
Warhead@1Dam: SpreadDamage
|
Warhead@1Dam: SpreadDamage
|
||||||
Spread: 128
|
Spread: 128
|
||||||
Damage: 36
|
Damage: 36
|
||||||
@@ -813,13 +813,13 @@ Dragon:
|
|||||||
ReloadDelay: 110
|
ReloadDelay: 110
|
||||||
Range: 18c0
|
Range: 18c0
|
||||||
Report: 120MMF.AUD
|
Report: 120MMF.AUD
|
||||||
Palette: ra
|
|
||||||
Projectile: Bullet
|
Projectile: Bullet
|
||||||
Speed: 170
|
Speed: 170
|
||||||
Image: 120mm
|
Image: 120mm
|
||||||
Angle: 165
|
Angle: 165
|
||||||
Shadow: true
|
Shadow: true
|
||||||
High: yes
|
High: yes
|
||||||
|
Palette: ra
|
||||||
MinRange: 5c0
|
MinRange: 5c0
|
||||||
Warhead@1Dam: SpreadDamage
|
Warhead@1Dam: SpreadDamage
|
||||||
Spread: 298
|
Spread: 298
|
||||||
@@ -849,7 +849,6 @@ Hellfire:
|
|||||||
Report: ORCAMIS1.AUD
|
Report: ORCAMIS1.AUD
|
||||||
Burst: 2
|
Burst: 2
|
||||||
ValidTargets: Ground, Air
|
ValidTargets: Ground, Air
|
||||||
Palette: ra
|
|
||||||
Projectile: Missile
|
Projectile: Missile
|
||||||
Speed: 256
|
Speed: 256
|
||||||
Arm: 2
|
Arm: 2
|
||||||
@@ -859,6 +858,7 @@ Hellfire:
|
|||||||
Image: DRAGON
|
Image: DRAGON
|
||||||
ROT: 8
|
ROT: 8
|
||||||
RangeLimit: 35
|
RangeLimit: 35
|
||||||
|
Palette: ra
|
||||||
Warhead@1Dam: SpreadDamage
|
Warhead@1Dam: SpreadDamage
|
||||||
Spread: 85
|
Spread: 85
|
||||||
Damage: 30
|
Damage: 30
|
||||||
@@ -888,11 +888,11 @@ Hellfire:
|
|||||||
Bomb:
|
Bomb:
|
||||||
ReloadDelay: 10
|
ReloadDelay: 10
|
||||||
Range: 5c0
|
Range: 5c0
|
||||||
Palette: player
|
|
||||||
Projectile: Bullet
|
Projectile: Bullet
|
||||||
Speed: 170
|
Speed: 170
|
||||||
Image: canister
|
Image: canister
|
||||||
Shadow: true
|
Shadow: true
|
||||||
|
Palette: player
|
||||||
Warhead@1Dam: SpreadDamage
|
Warhead@1Dam: SpreadDamage
|
||||||
Spread: 298
|
Spread: 298
|
||||||
Damage: 160
|
Damage: 160
|
||||||
@@ -1064,13 +1064,13 @@ RPGTower:
|
|||||||
ReloadDelay: 80
|
ReloadDelay: 80
|
||||||
Range: 8c0
|
Range: 8c0
|
||||||
Report: GLNCH4.AUD
|
Report: GLNCH4.AUD
|
||||||
Palette: player
|
|
||||||
Projectile: Bullet
|
Projectile: Bullet
|
||||||
Speed: 384
|
Speed: 384
|
||||||
High: yes
|
High: yes
|
||||||
Shadow: true
|
Shadow: true
|
||||||
Angle: 62
|
Angle: 62
|
||||||
Image: canister
|
Image: canister
|
||||||
|
Palette: player
|
||||||
Warhead@1Dam: SpreadDamage
|
Warhead@1Dam: SpreadDamage
|
||||||
Spread: 128
|
Spread: 128
|
||||||
Damage: 110
|
Damage: 110
|
||||||
@@ -1098,7 +1098,6 @@ SAMTower:
|
|||||||
Range: 15c0
|
Range: 15c0
|
||||||
Report: SAMSHOT1.AUD
|
Report: SAMSHOT1.AUD
|
||||||
ValidTargets: Air
|
ValidTargets: Air
|
||||||
Palette: ra
|
|
||||||
Projectile: Missile
|
Projectile: Missile
|
||||||
Speed: 298
|
Speed: 298
|
||||||
Arm: 2
|
Arm: 2
|
||||||
@@ -1108,6 +1107,7 @@ SAMTower:
|
|||||||
Image: DRAGON
|
Image: DRAGON
|
||||||
ROT: 5
|
ROT: 5
|
||||||
RangeLimit: 60
|
RangeLimit: 60
|
||||||
|
Palette: ra
|
||||||
Warhead@1Dam: SpreadDamage
|
Warhead@1Dam: SpreadDamage
|
||||||
Spread: 128
|
Spread: 128
|
||||||
Damage: 33
|
Damage: 33
|
||||||
|
|||||||
Reference in New Issue
Block a user