Generalize ReagentUnit into FixedPoint2 and use it for damage calculations (#5151)

* Damage units

* sum ext method
This commit is contained in:
mirrorcult
2021-11-03 16:48:03 -07:00
committed by GitHub
parent 8165d8f38c
commit 3ab4a30a0f
100 changed files with 730 additions and 601 deletions

View File

@@ -2,6 +2,7 @@ using System.Collections.Generic;
using Content.Server.Chemistry.EntitySystems;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.FixedPoint;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
@@ -19,7 +20,7 @@ namespace Content.Server.Chemistry.ReagentEntityReactions
// ReSharper disable once CollectionNeverUpdated.Local
private readonly HashSet<string> _reagents = new();
protected override void React(IEntity entity, ReagentPrototype reagent, ReagentUnit volume, Solution? source)
protected override void React(IEntity entity, ReagentPrototype reagent, FixedPoint2 volume, Solution? source)
{
// TODO see if this is correct
if (!EntitySystem.Get<SolutionContainerSystem>()