Skip to content

Commit

Permalink
Merge pull request Simple-Station#158 from cynical24/skibidi-dragon-fix
Browse files Browse the repository at this point in the history
Space Dragon Devour Fix
  • Loading branch information
FoxxoTrystan authored Aug 30, 2024
2 parents 4014d80 + 0192ae0 commit 2d39041
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Content.Server/Devour/DevourSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Content.Server.Body.Components;
using Content.Server.Body.Systems;
using Content.Shared.Chemistry.Components;
using Content.Shared.Devour;
Expand All @@ -15,6 +16,7 @@ public override void Initialize()
base.Initialize();

SubscribeLocalEvent<DevourerComponent, DevourDoAfterEvent>(OnDoAfter);
SubscribeLocalEvent<DevourerComponent, BeingGibbedEvent>(OnGibContents);
}

private void OnDoAfter(EntityUid uid, DevourerComponent component, DevourDoAfterEvent args)
Expand Down Expand Up @@ -45,5 +47,15 @@ private void OnDoAfter(EntityUid uid, DevourerComponent component, DevourDoAfter

_audioSystem.PlayPvs(component.SoundDevour, uid);
}

private void OnGibContents(EntityUid uid, DevourerComponent component, ref BeingGibbedEvent args)
{
if (!component.ShouldStoreDevoured)
return;

// For some reason we have two different systems that should handle gibbing,
// and for some another reason GibbingSystem, which should empty all containers, doesn't get involved in this process
ContainerSystem.EmptyContainer(component.Stomach);
}
}

0 comments on commit 2d39041

Please sign in to comment.