From e3de3cc0d2bc176bdc48942d3e86013ff6e41367 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Tue, 15 Jun 2010 10:43:19 +1200 Subject: [PATCH] Make c17 invulnerable --- OpenRA.Mods.RA/Invulnerable.cs | 36 ++++++++++++++++++++++++++++ OpenRA.Mods.RA/IronCurtainable.cs | 7 ++---- OpenRA.Mods.RA/OpenRA.Mods.RA.csproj | 1 + mods/cnc/vehicles.yaml | 1 + 4 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 OpenRA.Mods.RA/Invulnerable.cs diff --git a/OpenRA.Mods.RA/Invulnerable.cs b/OpenRA.Mods.RA/Invulnerable.cs new file mode 100644 index 0000000000..385d3cd606 --- /dev/null +++ b/OpenRA.Mods.RA/Invulnerable.cs @@ -0,0 +1,36 @@ +#region Copyright & License Information +/* + * Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford. + * This file is part of OpenRA. + * + * OpenRA is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * OpenRA is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with OpenRA. If not, see . + */ +#endregion + +using OpenRA.GameRules; +using OpenRA.Mods.RA.Effects; +using OpenRA.Traits; + +namespace OpenRA.Mods.RA +{ + class InvulnerableInfo : TraitInfo {} + + class Invulnerable : IDamageModifier + { + public float GetDamageModifier( WarheadInfo warhead ) + { + return 0.0f; + } + } +} diff --git a/OpenRA.Mods.RA/IronCurtainable.cs b/OpenRA.Mods.RA/IronCurtainable.cs index 81d48c0f17..705b08b7ef 100644 --- a/OpenRA.Mods.RA/IronCurtainable.cs +++ b/OpenRA.Mods.RA/IronCurtainable.cs @@ -1,4 +1,4 @@ -#region Copyright & License Information +#region Copyright & License Information /* * Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford. * This file is part of OpenRA. @@ -24,10 +24,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.RA { - class IronCurtainableInfo : ITraitInfo - { - public object Create(Actor self) { return new IronCurtainable(); } - } + class IronCurtainableInfo : TraitInfo {} class IronCurtainable : IDamageModifier, ITick { diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index 7eef6fc686..0fbb26ae27 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -178,6 +178,7 @@ + diff --git a/mods/cnc/vehicles.yaml b/mods/cnc/vehicles.yaml index 634ac0812a..33c921e75e 100644 --- a/mods/cnc/vehicles.yaml +++ b/mods/cnc/vehicles.yaml @@ -493,6 +493,7 @@ C17: WithShadow: Cargo: Passengers: 10 + Invulnerable: -Selectable: -GainsExperience: