Skip to content

Commit

Permalink
hguh
Browse files Browse the repository at this point in the history
  • Loading branch information
SleepyScarecrow committed Aug 9, 2024
1 parent f9792ed commit de1642a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions Content.Server/Chat/SuicideSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public bool Suicide(EntityUid victim)
return false;

DefaultSuicideHandler(victim, suicideEvent);
DefaultSuicideHandler(victim, Event);

ApplyDeath(victim, suicideEvent.Kind!.Value);
_adminLogger.Add(LogType.Mind, $"{EntityManager.ToPrettyString(victim):player} suicided{(environmentSuicide ? " (environment)" : "")}");
Expand Down Expand Up @@ -141,4 +140,4 @@ private void ApplyDeath(EntityUid target, SuicideKind kind)
_damageableSystem.TryChangeDamage(target, new(damagePrototype, lethalAmountOfDamage), true, origin: target);
}
}
}
}
6 changes: 3 additions & 3 deletions Content.Server/Kitchen/EntitySystems/KettleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ private void SubtractContents(KettleComponent component, DrinkRecipePrototype re
}
}

foreach (var recipeLeaf in recipe.Leaves)
foreach (var recipeSolid in recipe.Solids)
{
for (var i = 0; i < recipeLeaf.Value; i++)
for (var i = 0; i < recipeSolid.Value; i++)
{
foreach (var item in component.Storage.ContainedEntities)
{
Expand All @@ -146,7 +146,7 @@ private void SubtractContents(KettleComponent component, DrinkRecipePrototype re
continue;
}

if (metaData.EntityPrototype.ID == recipeLeaf.Key)
if (metaData.EntityPrototype.ID == recipeSolid.Key)
{
_container.Remove(item, component.Storage);
EntityManager.DeleteEntity(item);
Expand Down
6 changes: 3 additions & 3 deletions Content.Shared/Kitchen/KettleRecipePrototype.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public sealed partial class DrinkRecipePrototype : IPrototype
[DataField("reagents")]
public Dictionary<string, FixedPoint2> Reagents { get; private set; } = new();

[DataField("leaves")]
public IReadOnlyDictionary<string, FixedPoint2> Leaves => Leaves;
[DataField("solids")]
public IReadOnlyDictionary<string, FixedPoint2> Solids => Solids;

[DataField("products")]
public Dictionary<string, FixedPoint2> Products { get; private set; } = new();
Expand All @@ -48,7 +48,7 @@ public FixedPoint2 IngredientCount()
{
FixedPoint2 n = 0;
n += Reagents.Count; // number of distinct reagents
foreach (FixedPoint2 i in Leaves.Values) // sum the number of solid ingredients
foreach (FixedPoint2 i in Solids.Values) // sum the number of solid ingredients
{
n += i;
}
Expand Down

0 comments on commit de1642a

Please sign in to comment.