-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Refactors eating and drinking #3733
Conversation
@VampyrBytes Travis is working fine, you didn't update metastation with the new paths. |
Ah right, thanks @tigercat2000 |
Check the awaystation maps that we use (listeningoutpost, moonoutpost19, undergroundoutpost45) as well. |
uhhh this means patches use food code |
Yeah, I know... I thought the same, then I looked at what they were doing, which was using the pill eating code anyway. Sounds wrong but works well |
Before I review this, what thing(s) are changed, exactly? (from a mechanics standpoint). |
There's only 2 new mechanics. The other new one is food items having a consume_sound var with the sound to play when it's consumed (if !null), rather than them being hard coded into the procs, which was done for the eating and drinking sounds, and has the side effect of allowing for a specific food to have a specific sound played if someone wanted that (explosion sound on drinking a syndicate bomb anyone? 😉) Where before there was stuff done in if(human) clauses, it's now done through overriding. All the other mechanics were taken from one or more of the existing methods and just made to work together. Other than that it was just cleaning up stuff.... breaking the big procs up so each proc is focussed on one thing, which can then be overridden, or use another one based on an if, changing colour macros into spans, using visible_message rather than for loops and removing relative paths Think that pretty much covers everything I did 😃 |
@Fox-McCloud |
if(toEat.reagents.total_volume) | ||
toEat.reagents.reaction(src, toEat.apply_type) | ||
spawn(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of this spawn?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Crazylemon64
That's a good question. It was in the originals, and I wasn't 100% about taking it out. I'll be glad if I can take it out though, as I had to put in spawns to counteract it when the items were finished, otherwise they got deleted before the reagents were transferred
Can't think of anything, at the moment. |
just waiting for: #2903 to be merged in. |
No worries, I don't want to cause @Aurorablade any more merge conflicts either. |
Merge conflicts |
Messed up resolving them (which turned out to be a good thing), so putting up a new PR |
eating refactor (#3733) + bugfixes
No more need for 4(!) lots of code dealing with eating and drinking, carbon mobs now have eat proc that handles it and takes a reagent_container/food object and the user
Pills are now a child of food.
Kitchen utensils now create a food item identical to the original with enough reagents taken from it for one mouthful.
The only gameplay changes are related to messages and add consistency (eg you now get the message related to how hungry you are when eating off kitchen utensils)
Fixed some relative pathing
If I've missed anywhere that deals with eating let me know and I'll factor it in