Removed reflection hack and added nuke WeaponInfo to rules.ini
This commit is contained in:
@@ -79,11 +79,7 @@ namespace OpenRA.Effects
|
|||||||
void Explode(World world)
|
void Explode(World world)
|
||||||
{
|
{
|
||||||
world.AddFrameEndTask(w => w.Remove(this));
|
world.AddFrameEndTask(w => w.Remove(this));
|
||||||
var weapon = new WeaponInfo();
|
var weapon = Rules.WeaponInfo["Atomic"];
|
||||||
//Epic reflection hack that'll probably break on mono
|
|
||||||
typeof(WeaponInfo).GetField("Damage").SetValue(weapon, 1000);
|
|
||||||
typeof(WeaponInfo).GetField("Projectile").SetValue(weapon, "NukeDown");
|
|
||||||
typeof(WeaponInfo).GetField("Warhead").SetValue(weapon, "Nuke");
|
|
||||||
Combat.DoImpact(pos.ToInt2(), pos.ToInt2(), weapon, projectileDown, nukeWarhead, silo);
|
Combat.DoImpact(pos.ToInt2(), pos.ToInt2(), weapon, projectileDown, nukeWarhead, silo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -445,6 +445,12 @@ Speed=25
|
|||||||
Warhead=HE
|
Warhead=HE
|
||||||
Report=MISSILE1
|
Report=MISSILE1
|
||||||
|
|
||||||
|
;Nuke (special case for Nuclear missile)
|
||||||
|
[Atomic]
|
||||||
|
Damage=1000
|
||||||
|
Projectile=NukeDown
|
||||||
|
Warhead=Nuke
|
||||||
|
|
||||||
|
|
||||||
; ******* Projectile Statistics *******
|
; ******* Projectile Statistics *******
|
||||||
; Projectiles describe how and what image to use as the weapon flies
|
; Projectiles describe how and what image to use as the weapon flies
|
||||||
@@ -817,6 +823,7 @@ DogJaw
|
|||||||
Heal
|
Heal
|
||||||
SCUD
|
SCUD
|
||||||
UnitExplode
|
UnitExplode
|
||||||
|
Atomic
|
||||||
|
|
||||||
[TeslaZap]
|
[TeslaZap]
|
||||||
RenderAsTesla=true
|
RenderAsTesla=true
|
||||||
|
|||||||
Reference in New Issue
Block a user