Refactor reaction effects to use reagent effects (#5426)

* reaction effect refactor

* works now
This commit is contained in:
mirrorcult
2021-11-21 00:35:02 -07:00
committed by GitHub
parent 9b39838db7
commit 1ab7170adb
36 changed files with 83 additions and 82 deletions

View File

@@ -7,7 +7,7 @@ namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
{
public class PlantAdjustHealth : PlantAdjustAttribute
{
public override void Metabolize(ReagentEffectArgs args)
public override void Effect(ReagentEffectArgs args)
{
if (!CanMetabolize(args.SolutionEntity, out var plantHolderComp, args.EntityManager))
return;

View File

@@ -7,7 +7,7 @@ namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
{
public class PlantAdjustMutationLevel : PlantAdjustAttribute
{
public override void Metabolize(ReagentEffectArgs args)
public override void Effect(ReagentEffectArgs args)
{
if (!CanMetabolize(args.SolutionEntity, out var plantHolderComp, args.EntityManager))
return;

View File

@@ -8,7 +8,7 @@ namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
[UsedImplicitly]
public class PlantAdjustMutationMod : PlantAdjustAttribute
{
public override void Metabolize(ReagentEffectArgs args)
public override void Effect(ReagentEffectArgs args)
{
if (!CanMetabolize(args.SolutionEntity, out var plantHolderComp, args.EntityManager))
return;

View File

@@ -8,7 +8,7 @@ namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
[UsedImplicitly]
public class PlantAdjustNutrition : PlantAdjustAttribute
{
public override void Metabolize(ReagentEffectArgs args)
public override void Effect(ReagentEffectArgs args)
{
if (!CanMetabolize(args.SolutionEntity, out var plantHolderComp, args.EntityManager))
return;

View File

@@ -8,7 +8,7 @@ namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
[UsedImplicitly]
public class PlantAdjustPests : PlantAdjustAttribute
{
public override void Metabolize(ReagentEffectArgs args)
public override void Effect(ReagentEffectArgs args)
{
if (!CanMetabolize(args.SolutionEntity, out var plantHolderComp, args.EntityManager))
return;

View File

@@ -8,7 +8,7 @@ namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
[UsedImplicitly]
public class PlantAdjustToxins : PlantAdjustAttribute
{
public override void Metabolize(ReagentEffectArgs args)
public override void Effect(ReagentEffectArgs args)
{
if (!CanMetabolize(args.SolutionEntity, out var plantHolderComp, args.EntityManager))
return;

View File

@@ -8,7 +8,7 @@ namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
[UsedImplicitly]
public class PlantAdjustWater : PlantAdjustAttribute
{
public override void Metabolize(ReagentEffectArgs args)
public override void Effect(ReagentEffectArgs args)
{
if (!CanMetabolize(args.SolutionEntity, out var plantHolderComp, args.EntityManager))
return;

View File

@@ -8,7 +8,7 @@ namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
[UsedImplicitly]
public class PlantAdjustWeeds : PlantAdjustAttribute
{
public override void Metabolize(ReagentEffectArgs args)
public override void Effect(ReagentEffectArgs args)
{
if (!CanMetabolize(args.SolutionEntity, out var plantHolderComp, args.EntityManager))
return;

View File

@@ -8,7 +8,7 @@ namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
[UsedImplicitly]
public class PlantAffectGrowth : PlantAdjustAttribute
{
public override void Metabolize(ReagentEffectArgs args)
public override void Effect(ReagentEffectArgs args)
{
if (!CanMetabolize(args.SolutionEntity, out var plantHolderComp, args.EntityManager))
return;

View File

@@ -15,7 +15,7 @@ namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
[DataDefinition]
public class PlantClonexadone : ReagentEffect
{
public override void Metabolize(ReagentEffectArgs args)
public override void Effect(ReagentEffectArgs args)
{
if (!args.EntityManager.TryGetComponent(args.SolutionEntity, out PlantHolderComponent? plantHolderComp)
|| plantHolderComp.Seed == null || plantHolderComp.Dead)

View File

@@ -15,7 +15,7 @@ namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
[DataDefinition]
public class PlantDiethylamine : ReagentEffect
{
public override void Metabolize(ReagentEffectArgs args)
public override void Effect(ReagentEffectArgs args)
{
if (!args.EntityManager.TryGetComponent(args.SolutionEntity, out PlantHolderComponent? plantHolderComp)
|| plantHolderComp.Seed == null || plantHolderComp.Dead ||

View File

@@ -15,7 +15,7 @@ namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
[DataDefinition]
public class RobustHarvest : ReagentEffect
{
public override void Metabolize(ReagentEffectArgs args)
public override void Effect(ReagentEffectArgs args)
{
if (!args.EntityManager.TryGetComponent(args.SolutionEntity, out PlantHolderComponent? plantHolderComp)
|| plantHolderComp.Seed == null || plantHolderComp.Dead ||