Custom Warheads refactor
Changes included: Warhead code split out of weapon code and refactored. Warhead functionality now split into several classes, each handling one effect/impact. Additional custom warheads can now be defined and called via yaml. Custom warheads inherit the abstract class Warhead, which provides target check functions. Custom warheads have to define their own impact functions, and can also define their own replacement for check functions.
This commit is contained in:
@@ -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); }
|
||||
|
||||
Reference in New Issue
Block a user