diff --git a/Content.Shared/Body/Components/StomachComponent.cs b/Content.Shared/Body/Components/StomachComponent.cs
index 66f4674d9af..6a0fa7bf1df 100644
--- a/Content.Shared/Body/Components/StomachComponent.cs
+++ b/Content.Shared/Body/Components/StomachComponent.cs
@@ -25,4 +25,12 @@ public sealed partial class StomachComponent : Component
///
[DataField]
public bool IsSpecialDigestibleExclusive = true;
+
+ // ADT-Tweak start
+ ///
+ /// Items matching this whitelist are never digestible by this stomach, overriding everything else.
+ ///
+ [DataField]
+ public EntityWhitelist? SpecialDigestibleBlacklist = null;
+ // ADT-Tweak end
}
diff --git a/Content.Shared/Nutrition/EntitySystems/IngestionSystem.cs b/Content.Shared/Nutrition/EntitySystems/IngestionSystem.cs
index 7733aa2cb7a..981d3d5db19 100644
--- a/Content.Shared/Nutrition/EntitySystems/IngestionSystem.cs
+++ b/Content.Shared/Nutrition/EntitySystems/IngestionSystem.cs
@@ -198,6 +198,10 @@ public bool IsDigestibleBy(EntityUid food, List> stomac
{
foreach (var ent in stomachs)
{
+ // ADT-Tweak-Start: чёрный список желудка важнее белого
+ if (_whitelistSystem.IsWhitelistPass(ent.Comp.SpecialDigestibleBlacklist, food))
+ continue;
+ // ADT-Tweak-End
// We need one stomach that can digest our special food.
if (_whitelistSystem.IsWhitelistPass(ent.Comp.SpecialDigestible, food))
return true;
@@ -207,6 +211,10 @@ public bool IsDigestibleBy(EntityUid food, List> stomac
{
foreach (var ent in stomachs)
{
+ // ADT-Tweak-Start: чёрный список желудка важнее белого
+ if (_whitelistSystem.IsWhitelistPass(ent.Comp.SpecialDigestibleBlacklist, food))
+ continue;
+ // ADT-Tweak-End
// We need one stomach that can digest normal food.
if (ent.Comp.SpecialDigestible == null
|| !ent.Comp.IsSpecialDigestibleExclusive
@@ -236,6 +244,11 @@ public bool IsDigestibleBy(EntityUid food, Entity stomach)
if (ev.Universal)
return true;
+ // ADT-Tweak-Start: чёрный список желудка важнее белого
+ if (_whitelistSystem.IsWhitelistPass(stomach.Comp.SpecialDigestibleBlacklist, food))
+ return false;
+ // ADT-Tweak-End
+
if (ev.SpecialDigestion)
return _whitelistSystem.IsWhitelistPass(stomach.Comp.SpecialDigestible, food);
diff --git a/Resources/Prototypes/Body/Species/moth.yml b/Resources/Prototypes/Body/Species/moth.yml
index c2849c4e00f..1807f623d57 100644
--- a/Resources/Prototypes/Body/Species/moth.yml
+++ b/Resources/Prototypes/Body/Species/moth.yml
@@ -348,11 +348,16 @@
- ClothMade
- Paper
- Pill
- # ADT-Tweak start: моли могут есть фрукты, овощи, и вайтлистнутую еду
+ # ADT-Tweak start: моли едят любую еду, кроме мяса и снеков
- Fruit
- Vegetable
- ADTMothFriendlyFood
- # ADT-Tweak end
+ isSpecialDigestibleExclusive: false
+ specialDigestibleBlacklist:
+ tags:
+ - Meat
+ - FoodSnack
+ # ADT-Tweak end
- type: entity
parent: [OrganBaseLiver, OrganMothInternal, OrganAnimalMetabolizer] # ADT-tweak removed OrganSpriteHumanInternal