Refactor reaction effects to use reagent effects (#5426)
* reaction effect refactor * works now
This commit is contained in:
@@ -30,7 +30,7 @@ namespace Content.Shared.Chemistry.Reagent
|
||||
[DataField("probability")]
|
||||
public float Probability = 1.0f;
|
||||
|
||||
public abstract void Metabolize(ReagentEffectArgs args);
|
||||
public abstract void Effect(ReagentEffectArgs args);
|
||||
}
|
||||
|
||||
public static class ReagentEffectExt
|
||||
@@ -41,11 +41,6 @@ namespace Content.Shared.Chemistry.Reagent
|
||||
if (random == null)
|
||||
random = IoCManager.Resolve<IRobustRandom>();
|
||||
|
||||
|
||||
// Make sure we still have enough reagent to go...
|
||||
if (args.Source != null && !args.Source.ContainsReagent(args.Reagent.ID))
|
||||
return false;
|
||||
|
||||
if (effect.Probability < 1.0f && !random.Prob(effect.Probability))
|
||||
return false;
|
||||
|
||||
@@ -74,7 +69,7 @@ namespace Content.Shared.Chemistry.Reagent
|
||||
EntityUid? OrganEntity,
|
||||
Solution? Source,
|
||||
ReagentPrototype Reagent,
|
||||
FixedPoint2 Metabolizing,
|
||||
FixedPoint2 Quantity,
|
||||
IEntityManager EntityManager,
|
||||
ReactionMethod? Method
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user