Merge pull request #6030 from UberWaffe/CustomWarheads

Custom Warheads refactor
This commit is contained in:
Taryn Hill
2014-08-03 10:35:36 -05:00
59 changed files with 2275 additions and 1233 deletions

View File

@@ -98,7 +98,7 @@ namespace OpenRA.Traits
nd.AppliedDamage(repairer, self, ai);
}
public void InflictDamage(Actor self, Actor attacker, int damage, WarheadInfo warhead, bool ignoreModifiers)
public void InflictDamage(Actor self, Actor attacker, int damage, DamageWarhead warhead, bool ignoreModifiers)
{
if (IsDead) return; /* overkill! don't count extra hits as more kills! */
@@ -177,7 +177,7 @@ namespace OpenRA.Traits
return (health == null) ? DamageState.Undamaged : health.DamageState;
}
public static void InflictDamage(this Actor self, Actor attacker, int damage, WarheadInfo warhead)
public static void InflictDamage(this Actor self, Actor attacker, int damage, DamageWarhead warhead)
{
if (self.Destroyed) return;
var health = self.TraitOrDefault<Health>();

View File

@@ -27,7 +27,7 @@ namespace OpenRA.Traits
public class AttackInfo
{
public Actor Attacker;
public WarheadInfo Warhead;
public DamageWarhead Warhead;
public int Damage;
public DamageState DamageState;
public DamageState PreviousDamageState;
@@ -149,7 +149,7 @@ namespace OpenRA.Traits
}
public interface IRenderModifier { IEnumerable<IRenderable> ModifyRender(Actor self, WorldRenderer wr, IEnumerable<IRenderable> r); }
public interface IDamageModifier { float GetDamageModifier(Actor attacker, WarheadInfo warhead); }
public interface IDamageModifier { float GetDamageModifier(Actor attacker, DamageWarhead warhead); }
public interface ISpeedModifier { decimal GetSpeedModifier(); }
public interface IFirepowerModifier { float GetFirepowerModifier(); }
public interface ILoadsPalettes { void LoadPalettes(WorldRenderer wr); }