Not exclusive whitelist diet. Vox regain access to old food. (#37497)
* 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>
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -27,14 +27,7 @@
|
||||
specialDigestible:
|
||||
tags:
|
||||
- Trash
|
||||
- Fruit
|
||||
- ReptilianFood
|
||||
- Meat
|
||||
- Pill
|
||||
- Crayon
|
||||
- Paper
|
||||
- VoxFood
|
||||
- Vegetable
|
||||
isSpecialDigestibleExclusive: false
|
||||
|
||||
- type: entity
|
||||
parent: OrganHumanLiver
|
||||
|
||||
@@ -20,9 +20,6 @@
|
||||
reagents:
|
||||
- ReagentId: Nutriment
|
||||
Quantity: 5
|
||||
- type: Tag
|
||||
tags:
|
||||
- VoxFood
|
||||
|
||||
- type: entity
|
||||
id: FoodBagel
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
- type: Tag
|
||||
tags:
|
||||
- Bread
|
||||
- VoxFood
|
||||
- type: SolutionContainerManager
|
||||
solutions:
|
||||
food:
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
- type: Tag
|
||||
tags:
|
||||
- Cake
|
||||
- VoxFood
|
||||
- type: SecretStash
|
||||
maxItemSize: "Normal"
|
||||
secretStashName: secret-stash-cake
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
- type: Tag
|
||||
tags:
|
||||
- Donut
|
||||
- VoxFood
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Food/Baked/donut.rsi
|
||||
- type: SolutionContainerManager
|
||||
|
||||
@@ -18,9 +18,6 @@
|
||||
Quantity: 5
|
||||
- type: Item
|
||||
size: Tiny
|
||||
- type: Tag
|
||||
tags:
|
||||
- VoxFood
|
||||
|
||||
# Muffins
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
- type: Tag
|
||||
tags:
|
||||
- Pie
|
||||
- VoxFood
|
||||
|
||||
- type: entity
|
||||
parent: FoodInjectableBase # Not sliceable
|
||||
|
||||
@@ -22,9 +22,6 @@
|
||||
reagents:
|
||||
- ReagentId: Nutriment
|
||||
Quantity: 20
|
||||
- type: Tag
|
||||
tags:
|
||||
- VoxFood
|
||||
|
||||
# Meals
|
||||
|
||||
|
||||
@@ -18,9 +18,6 @@
|
||||
reagents:
|
||||
- ReagentId: Nutriment
|
||||
Quantity: 20
|
||||
- type: Tag
|
||||
tags:
|
||||
- VoxFood
|
||||
|
||||
# Noodles
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
- type: Tag
|
||||
tags:
|
||||
- FoodSnack
|
||||
- VoxFood
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Food/snacks.rsi
|
||||
- type: SolutionContainerManager
|
||||
@@ -498,9 +497,6 @@
|
||||
Quantity: 10
|
||||
- ReagentId: Theobromine
|
||||
Quantity: 3
|
||||
- type: Tag
|
||||
tags:
|
||||
- VoxFood
|
||||
|
||||
# Trash
|
||||
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
- type: Tag
|
||||
tags:
|
||||
- Soup
|
||||
- VoxFood
|
||||
- type: Destructible
|
||||
thresholds:
|
||||
- trigger:
|
||||
|
||||
@@ -1364,9 +1364,6 @@
|
||||
- type: Tag
|
||||
id: VoiceTrigger
|
||||
|
||||
- type: Tag # Eating fix tag
|
||||
id: VoxFood
|
||||
|
||||
- type: Tag
|
||||
id: Wall
|
||||
|
||||
|
||||
Reference in New Issue
Block a user