Skip to content

Commit

Permalink
Update stomach removal and lung removal smite to not use Component.Ow…
Browse files Browse the repository at this point in the history
…ner (space-wizards#29927)

* Update stomach removal and lung removal smite

* New function makes things simple

---------

Co-authored-by: plykiya <[email protected]>
  • Loading branch information
Plykiya and plykiya authored Jul 28, 2024
1 parent ab84eee commit 79fa810
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,9 @@ private void AddSmiteVerbs(GetVerbsEvent<Verb> args)
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Species/Human/organs.rsi"), "stomach"),
Act = () =>
{
foreach (var (component, _) in _bodySystem.GetBodyOrganComponents<StomachComponent>(args.Target, body))
foreach (var entity in _bodySystem.GetBodyOrganEntityComps<StomachComponent>((args.Target, body)))
{
QueueDel(component.Owner);
QueueDel(entity.Owner);
}

_popupSystem.PopupEntity(Loc.GetString("admin-smite-stomach-removal-self"), args.Target,
Expand All @@ -381,9 +381,9 @@ private void AddSmiteVerbs(GetVerbsEvent<Verb> args)
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Species/Human/organs.rsi"), "lung-r"),
Act = () =>
{
foreach (var (component, _) in _bodySystem.GetBodyOrganComponents<LungComponent>(args.Target, body))
foreach (var entity in _bodySystem.GetBodyOrganEntityComps<LungComponent>((args.Target, body)))
{
QueueDel(component.Owner);
QueueDel(entity.Owner);
}

_popupSystem.PopupEntity(Loc.GetString("admin-smite-lung-removal-self"), args.Target,
Expand Down

0 comments on commit 79fa810

Please sign in to comment.