Skip to content

Commit

Permalink
Merge branch 'Fansana:master' into Plushie-Crate-Back
Browse files Browse the repository at this point in the history
  • Loading branch information
ShatteredSwords committed Aug 30, 2024
2 parents b0f0079 + ef6331b commit c8098c0
Show file tree
Hide file tree
Showing 2 changed files with 18 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);
}
}

6 changes: 6 additions & 0 deletions Resources/Changelog/Floof.yml
Original file line number Diff line number Diff line change
Expand Up @@ -735,3 +735,9 @@ Entries:
message: Added two new physical traits - weakness and lightweight
id: 100
time: '2024-08-29T14:51:40.0000000+00:00'
- author: cynical24
changes:
- type: Fix
message: space dragons will now drop bodies upon being butchered :3
id: 101
time: '2024-08-30T05:07:01.0000000+00:00'

0 comments on commit c8098c0

Please sign in to comment.