]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Not exclusive whitelist diet. Vox regain access to old food. (#37497)
authorQerd <73325910+BigfootBravo@users.noreply.github.com>
Fri, 16 May 2025 19:05:49 +0000 (12:05 -0700)
committerGitHub <noreply@github.com>
Fri, 16 May 2025 19:05:49 +0000 (12:05 -0700)
* Creates a secondary digestible whitelist that is not exclusive. Additionally reworks the Vox stomach.

* Update FoodSystem.cs

Remnants of an old attempt. Cleaning it.

* Update vox.yml

Remnants of an old attempt. Cleaning up.

* Whitelist no longer, now the diet exclusion var is a bool.

* Clean-up

* Update Content.Server/Body/Components/StomachComponent.cs

Typo fixing

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
* Update Content.Server/Body/Components/StomachComponent.cs

Clarifications.

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
* Update Content.Server/Nutrition/EntitySystems/FoodSystem.cs

Typo fixing

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
* Update Resources/Prototypes/Body/Organs/vox.yml

Typo fixes

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
---------

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
14 files changed:
Content.Server/Body/Components/StomachComponent.cs
Content.Server/Nutrition/EntitySystems/FoodSystem.cs
Resources/Prototypes/Body/Organs/vox.yml
Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/bagel.yml
Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/bread.yml
Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/cake.yml
Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/donut.yml
Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/misc.yml
Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pie.yml
Resources/Prototypes/Entities/Objects/Consumable/Food/meals.yml
Resources/Prototypes/Entities/Objects/Consumable/Food/noodles.yml
Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml
Resources/Prototypes/Entities/Objects/Consumable/Food/soup.yml
Resources/Prototypes/tags.yml

index 06f03482e7e6769110bb6957e38b10668948f5a0..4821b78f4aff54a8c9aa85823bfa63592ba680b2 100644 (file)
@@ -47,6 +47,12 @@ namespace Content.Server.Body.Components
         [DataField]
         public EntityWhitelist? SpecialDigestible = null;
 
+        /// <summary>
+        /// Controls whitelist behavior. If true, this stomach can digest <i>only</i> food that passes the whitelist. If false, it can digest normal food <i>and</i> any food that passes the whitelist.
+        /// </summary>
+        [DataField]
+        public bool IsSpecialDigestibleExclusive = true;
+
         /// <summary>
         ///     Used to track how long each reagent has been in the stomach
         /// </summary>
index 8b7626e03104d442012f0746563fa57db101afbb..38c9cba72d9974e18d4bcf64f4787c9c06b5be8a 100644 (file)
@@ -442,8 +442,10 @@ public sealed class FoodSystem : EntitySystem
             // Check if the food is in the whitelist
             if (_whitelistSystem.IsWhitelistPass(ent.Comp1.SpecialDigestible, food))
                 return true;
-            // They can only eat whitelist food and the food isn't in the whitelist. It's not edible.
-            return false;
+
+            // If their diet is whitelist exclusive, then they cannot eat anything but what follows their whitelisted tags. Else, they can eat their tags AND human food.
+            if (ent.Comp1.IsSpecialDigestibleExclusive)
+                return false;
         }
 
         if (component.RequiresSpecialDigestion)
index 8b38bb8d0b6508869e184da86f7394f491039a25..3dbb65c928123bd7d3d105569fc98d67682be030 100644 (file)
     specialDigestible:
       tags:
       - Trash
-      - Fruit
-      - ReptilianFood
-      - Meat
-      - Pill
-      - Crayon
-      - Paper
-      - VoxFood
-      - Vegetable
+    isSpecialDigestibleExclusive: false
 
 - type: entity
   parent: OrganHumanLiver
index ef0d43be3f285e912c721a1a6186c77777176b81..114b3e01f22d10c394de042b78ccec230f982349 100644 (file)
@@ -20,9 +20,6 @@
         reagents:
         - ReagentId: Nutriment
           Quantity: 5
-  - type: Tag
-    tags:
-    - VoxFood
 
 - type: entity
   id: FoodBagel
index 1945da67f33e9ddcdaf0f3f564bb79533cd433ce..d817d53b18a683c51d06af720fd65320751070ed 100644 (file)
@@ -15,7 +15,6 @@
   - type: Tag
     tags:
     - Bread
-    - VoxFood
   - type: SolutionContainerManager
     solutions:
       food:
index 763e8d358052ea6c1fcd45bf055d3d7a697b1b2d..3b9ae17b6a3ad6a0619143655e1c4c27c48df543 100644 (file)
@@ -26,7 +26,6 @@
   - type: Tag
     tags:
     - Cake
-    - VoxFood
   - type: SecretStash
     maxItemSize: "Normal"
     secretStashName: secret-stash-cake
index 4cdca4799c648ddf0540b1f7f3af2dd12680d4ea..52ac7b2fe9872a8c67c44cd30591affda23728f5 100644 (file)
@@ -10,7 +10,6 @@
   - type: Tag
     tags:
     - Donut
-    - VoxFood
   - type: Sprite
     sprite: Objects/Consumable/Food/Baked/donut.rsi
   - type: SolutionContainerManager
index 7776906b752e2fc338c859a8b316354f7e3a22c1..c7a10d42120a110313427b3d3e073e04aaf9bdcd 100644 (file)
@@ -18,9 +18,6 @@
           Quantity: 5
   - type: Item
     size: Tiny
-  - type: Tag
-    tags:
-    - VoxFood
 
 # Muffins
 
index 8633d0f718a4577c9d54c76747ab2467e4849102..b86a4201e8b797c6a7963ce50641a0dbf02f9b05 100644 (file)
@@ -30,7 +30,6 @@
   - type: Tag
     tags:
     - Pie
-    - VoxFood
 
 - type: entity
   parent: FoodInjectableBase # Not sliceable
index 3576fdfc15638fab1f478d5b79bef6376d346745..a4cf014bff7246cf9195535b86c3804485905ec5 100644 (file)
@@ -22,9 +22,6 @@
         reagents:
         - ReagentId: Nutriment
           Quantity: 20
-  - type: Tag
-    tags:
-    - VoxFood
 
 # Meals
 
   description: BBQ ribs, slathered in a healthy coating of BBQ sauce. The least vegan thing to ever exist.
   components:
   - type: Food
-    trash: 
+    trash:
     - FoodKebabSkewer
   - type: FlavorProfile
     flavors:
   description: Buttery.
   components:
   - type: Food
-    trash: 
+    trash:
     - FoodPlate
   - type: FlavorProfile
     flavors:
index b11b38be1c7f6b8a95be5f172af2ca628567caee..4bff8252aa8a2c618425e0defcebba73c26cf25d 100644 (file)
         reagents:
         - ReagentId: Nutriment
           Quantity: 20
-  - type: Tag
-    tags:
-    - VoxFood
-    
+
 # Noodles
 
 - type: entity
index 72243b6d06cd13f4ff43e1be385e0650fc77f769..9147a79158c70d0baf8690b853510580cb0cffd4 100644 (file)
@@ -10,7 +10,6 @@
   - type: Tag
     tags:
       - FoodSnack
-      - VoxFood
   - type: Sprite
     sprite: Objects/Consumable/Food/snacks.rsi
   - type: SolutionContainerManager
@@ -42,7 +41,7 @@
     state: boritos
   - type: Item
   - type: Food
-    trash: 
+    trash:
     - FoodPacketBoritosTrash
 
 - type: entity
@@ -58,7 +57,7 @@
     state: cnds
   - type: Item
   - type: Food
-    trash: 
+    trash:
     - FoodPacketCnDsTrash
 
 - type: entity
@@ -75,7 +74,7 @@
     state: cheesiehonkers
   - type: Item
   - type: Food
-    trash: 
+    trash:
     - FoodPacketCheesieTrash
 
 - type: entity
@@ -93,7 +92,7 @@
     state: chips
   - type: Item
   - type: Food
-    trash: 
+    trash:
     - FoodPacketChipsTrash
 
 - type: entity
     state: pistachio
   - type: Item
   - type: Food
-    trash: 
+    trash:
     - FoodPacketPistachioTrash
   - type: Tag
     tags:
   - type: Item
     heldPrefix: popcorn
   - type: Food
-    trash: 
+    trash:
     - FoodPacketPopcornTrash
 
 - type: entity
     state: raisins
   - type: Item
   - type: Food
-    trash: 
+    trash:
     - FoodPacketRaisinsTrash
   - type: Tag
     tags:
     state: semki
   - type: Item
   - type: Food
-    trash: 
+    trash:
     - FoodPacketSemkiTrash
 
 - type: entity
     state: susjerky
   - type: Item
   - type: Food
-    trash: 
+    trash:
     - FoodPacketSusTrash
   - type: Tag
     tags:
     state: syndicakes
   - type: Item
   - type: Food
-    trash: 
+    trash:
     - FoodPacketSyndiTrash
 
 - type: entity
   - type: Sprite
     state: ramen
   - type: Food
-    trash: 
+    trash:
     - FoodPacketCupRamenTrash
 
 - type: entity
         - ReagentId: Soysauce
           Quantity: 2
   - type: Food
-    trash: 
+    trash:
     - FoodPacketChowMeinTrash
 
 - type: entity
         - ReagentId: Soysauce
           Quantity: 2
   - type: Food
-    trash: 
+    trash:
     - FoodPacketDanDanTrash
 
 - type: entity
     heldPrefix: packet
     size: Tiny
   - type: Food
-    trash: 
+    trash:
     - FoodCookieFortune
 
 - type: entity
           Quantity: 10
         - ReagentId: Theobromine
           Quantity: 3
-  - type: Tag
-    tags:
-    - VoxFood
 
 # Trash
 
index 2450f6ab4f2d931a763c3dec17027cdc91db5759..148bdf816154afca69dc2d8e092dd2c933c264ce 100644 (file)
@@ -8,7 +8,7 @@
   - type: Item
     storedRotation: -90
   - type: Food
-    trash: 
+    trash:
     - FoodBowlBig
     utensil: Spoon
   - type: SolutionContainerManager
@@ -42,7 +42,6 @@
   - type: Tag
     tags:
     - Soup
-    - VoxFood
   - type: Destructible
     thresholds:
     - trigger:
     flavors:
       - miso
   - type: Food
-    trash: 
+    trash:
     - FoodBowlFancy
   - type: Sprite
     layers:
index 0a9980962df697030b5eaaab73126178c17a6796..9f97fa8ed003af991d0a106a07d2180f6b76a603 100644 (file)
 - type: Tag
   id: VoiceTrigger
 
-- type: Tag # Eating fix tag
-  id: VoxFood
-
 - type: Tag
   id: Wall