Reactive 3.0 (#5443)

* probably scrapping this

* reimpl old behavior

* misc fixes and initial yaml

* works basically first try
This commit is contained in:
mirrorcult
2021-11-22 02:17:35 -07:00
committed by GitHub
parent 8b47d0f43f
commit e40c9bc427
17 changed files with 152 additions and 71 deletions

View File

@@ -37,7 +37,7 @@ namespace Content.Server.Chemistry.Components
internals.AreInternalsWorking())
return;
var chemistry = EntitySystem.Get<ChemistrySystem>();
var chemistry = EntitySystem.Get<ReactiveSystem>();
var cloneSolution = solution.Clone();
var transferAmount = FixedPoint2.Min(cloneSolution.TotalVolume * solutionFraction, bloodstream.EmptyVolume);
var transferSolution = cloneSolution.SplitSolution(transferAmount);

View File

@@ -126,7 +126,7 @@ namespace Content.Server.Chemistry.Components
if (!EntitySystem.Get<SolutionContainerSystem>().TryGetSolution(Owner.Uid, SolutionName, out var solution))
return;
var chemistry = EntitySystem.Get<ChemistrySystem>();
var chemistry = EntitySystem.Get<ReactiveSystem>();
var mapGrid = MapManager.GetGrid(Owner.Transform.GridID);
var tile = mapGrid.GetTileRef(Owner.Transform.Coordinates.ToVector2i(Owner.EntityManager, MapManager));

View File

@@ -17,7 +17,7 @@ namespace Content.Server.Nutrition.EntitySystems
{
public partial class SmokingSystem : EntitySystem
{
[Dependency] private readonly ChemistrySystem _chemistrySystem = default!;
[Dependency] private readonly ReactiveSystem _reactiveSystem = default!;
[Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!;
private const float UpdateTimer = 3f;
@@ -98,7 +98,7 @@ namespace Content.Server.Nutrition.EntitySystems
!containerManager.Owner.TryGetComponent(out BloodstreamComponent? bloodstream))
continue;
_chemistrySystem.ReactionEntity(containerManager.Owner.Uid, ReactionMethod.Ingestion, inhaledSolution);
_reactiveSystem.ReactionEntity(containerManager.Owner.Uid, ReactionMethod.Ingestion, inhaledSolution);
bloodstream.TryTransferSolution(inhaledSolution);
}