Skip to content

Commit

Permalink
bloodstream now metabolizes chemicals except its blood reagent
Browse files Browse the repository at this point in the history
  • Loading branch information
nkokic committed Dec 6, 2024
1 parent cb4ed28 commit 79462e8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Content.Server/Body/Components/MetabolizerComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public sealed partial class MetabolizerComponent : Component
/// From which solution will this metabolizer attempt to metabolize chemicals
/// </summary>
[DataField("solution")]
public string SolutionName = BloodstreamComponent.DefaultChemicalsSolutionName;
public string SolutionName = BloodstreamComponent.DefaultBloodSolutionName;

/// <summary>
/// Does this component use a solution on it's parent entity (the body) or itself
Expand Down
7 changes: 7 additions & 0 deletions Content.Server/Body/Systems/MetabolizerSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,13 @@ private void TryMetabolize(Entity<MetabolizerComponent, OrganComponent?, Solutio
if (reagents >= ent.Comp1.MaxReagentsProcessable)
return;

// skips the blood reagent from metabolising
if (TryComp<BloodstreamComponent>(solutionEntityUid.Value, out var bloodstream))
{
// TODO: let blood reagent be metabolised if hypertension is present
if (reagent.Prototype == bloodstream.BloodReagent.Id)
continue;
}

// loop over all our groups and see which ones apply
if (ent.Comp1.MetabolismGroups is null)
Expand Down

0 comments on commit 79462e8

Please sign in to comment.