Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New trait: Picky eater #15012

Merged
merged 5 commits into from Jul 25, 2023
Merged

Conversation

Bartimeus973
Copy link
Contributor

@Bartimeus973 Bartimeus973 commented Jul 19, 2023

About the PR

This traits assigns 5 random foods to any human who picks it when they first spawn in. This food list remains the same between clonings.
Picky eaters can only eat the food they like. Trying to eat a food they do not like will fail.
Picky eaters can still be forcefed food they do not like, but they will let you know they hate it, will incur minor side effects and will not get the heal from the food.
With motives enabled (I.E. RP) picky eaters can eat anything if they are under 30% hunger. They still suffer from the disagreeable side effects.
The list of liked foods can be found in the notes.

The trait neither gives nor takes any trait points. On classic, the downsides can be too easily ignored for this trait to warrant a bonus.

This PR reuses a fair bit of code from the chef objectives.

Why's this needed?

Picky eaters will increase the amount of exchanges with the chef and will encourage people to request specific and unique foods. It can also create fun situations where someone is just so incredibly taste-sensitive that they will only eat wild items. A security officer that only eats sugar cubes! An assistant with refined tastes who only eats the best ratatouille! A doctor that subsists entirely on jaffa cakes and bacon!

Changelog

(u)Bartimeus973
(*)Added a new trait: Picky eater! Picky eaters can only eat specific, randomly selected foods!

[FEATURE] [RP] [TRAITS]

@keywordlabeler keywordlabeler bot added A-RP Deals with RP server specific mechanics A-Traits Deals with traits in some way C-Feature A new feature or enhancements to existing features labels Jul 19, 2023
@boring-cyborg boring-cyborg bot added the C-Sprites Automatically applied on any .dmi or icons folder change label Jul 19, 2023
@github-actions github-actions bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 19, 2023
Comment on lines 399 to 445
var/list/blacklist = list(
/obj/item/reagent_containers/food/snacks/burger/humanburger,
/obj/item/reagent_containers/food/snacks/donut/custom/robust,
/obj/item/reagent_containers/food/snacks/ingredient/meat/humanmeat,
/obj/item/reagent_containers/food/snacks/ingredient/meat/mysterymeat/nugget/flock,
/obj/item/reagent_containers/food/snacks/ingredient/pepperoni,
/obj/item/reagent_containers/food/snacks/meatball,
/obj/item/reagent_containers/food/snacks/mushroom,
/obj/item/reagent_containers/food/snacks/pickle/trash,
/obj/item/reagent_containers/food/snacks/pizza/xmas,
/obj/item/reagent_containers/food/snacks/plant/glowfruit/spawnable,
/obj/item/reagent_containers/food/snacks/soup/custom,
/obj/item/reagent_containers/food/snacks/condiment/syndisauce,
/obj/item/reagent_containers/food/snacks/donkpocket_w,
/obj/item/reagent_containers/food/snacks/surstromming,
/obj/item/reagent_containers/food/snacks/hotdog/syndicate,
/obj/item/reagent_containers/food/snacks/dippable/tortilla_chip_spawner,
/obj/item/reagent_containers/food/snacks/pancake/classic,
/obj/item/reagent_containers/food/snacks/wonton_spawner,
/obj/item/reagent_containers/food/snacks/agar_block,
/obj/item/reagent_containers/food/snacks/sushi_roll/custom,
#ifndef UNDERWATER_MAP
/obj/item/reagent_containers/food/snacks/healgoo,
/obj/item/reagent_containers/food/snacks/greengoo,
#endif
/obj/item/reagent_containers/food/snacks/snowball,
/obj/item/reagent_containers/food/snacks/burger/vr,
/obj/item/reagent_containers/food/snacks/slimjim,
/obj/item/reagent_containers/food/snacks/bite,
/obj/item/reagent_containers/food/snacks/pickle_holder,
/obj/item/reagent_containers/food/snacks/snack_cake,
/obj/item/reagent_containers/food/snacks/ingredient/tortilla,
/obj/item/reagent_containers/food/snacks/ingredient/pizza1,
/obj/item/reagent_containers/food/snacks/ingredient/pizza2,
/obj/item/reagent_containers/food/snacks/ingredient/pizza3,
/obj/item/reagent_containers/food/snacks/ingredient/pizzam,
/obj/item/reagent_containers/food/snacks/ingredient/pizzab,
/obj/item/reagent_containers/food/snacks/ingredient/pizzap,
/obj/item/reagent_containers/food/snacks/ingredient/pasta,
/obj/item/reagent_containers/food/snacks/ingredient/pasta/sheet,
/obj/item/reagent_containers/food/snacks/ingredient/wheat_noodles,
/obj/item/reagent_containers/food/snacks/ingredient/chips,
/obj/item/reagent_containers/food/snacks/ingredient/spaghetti,
/obj/item/reagent_containers/food/snacks/ice_cream/random,
/obj/item/reagent_containers/food/snacks/ice_cream/goodrandom
)
var/list/ingredients = concrete_typesof(/obj/item/reagent_containers/food/snacks) - blacklist - concrete_typesof(/obj/item/reagent_containers/food/snacks/ingredient/egg/critter)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need to be duplicated code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved it up to a global var and also changed crew objectives to use this global var.

@Bartimeus973
Copy link
Contributor Author

I took the liberty of changing pie slice names since all pie slices were named "slice of pie". Now they are named for example "slice of lemon pie" so you know which pie you like.

@Chatauscours
Copy link
Contributor

Would it maybe be possible to force donuts on secoffs if they pick this trait? And force apples on doctors. For the joke.

@Bartimeus973
Copy link
Contributor Author

I thought about making secoffs always want donuts, but i think having it completely random will make people go out of their comfort zone and will keep things interesting. If you pick the trait, you should think before buying robust donuts. Could always get someone to forcefeed it to you too.

Copy link
Member

@frawhst frawhst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this

code/datums/crew_objective.dm Outdated Show resolved Hide resolved
code/datums/crew_objective.dm Outdated Show resolved Hide resolved
code/modules/food_and_drink/pies.dm Outdated Show resolved Hide resolved
code/modules/chemistry/tools/food_and_drink.dm Outdated Show resolved Hide resolved
code/modules/chemistry/tools/food_and_drink.dm Outdated Show resolved Hide resolved
code/modules/chemistry/tools/food_and_drink.dm Outdated Show resolved Hide resolved
code/modules/chemistry/tools/food_and_drink.dm Outdated Show resolved Hide resolved
code/datums/gameticker.dm Outdated Show resolved Hide resolved
code/mob/new_player.dm Outdated Show resolved Hide resolved
code/mob/new_player.dm Outdated Show resolved Hide resolved
@Bartimeus973
Copy link
Contributor Author

As a little sidenote, this PR should fix the issue of chef objectives sometimes failing to generate a list of food items. Ingredients should now always be reasonably achievable.

Copy link
Member

@frawhst frawhst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@TobleroneSwordfish TobleroneSwordfish merged commit 23bd1df into goonstation:master Jul 25, 2023
21 checks passed
github-actions bot pushed a commit that referenced this pull request Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-RP Deals with RP server specific mechanics A-Traits Deals with traits in some way C-Feature A new feature or enhancements to existing features C-Sprites Automatically applied on any .dmi or icons folder change size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants