Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[MERGED PR] Adds an action bar to eating, componentizes food stuff
#1
Thumbs Up 
PULL REQUEST DETAILS



[FEATURE]
About the PR

Adds an action bar to eating anything edible, starting at 1 second, and increasing significantly depending on if the thing eaten is an organ and/or you're feeding it to someone else.

The action bar isn't interrupted when you move or click on things if you're the one eating the thing.

Most of the fancy things food items did, like heal you when eaten, give status effects, and have visible chunks removed when bitten have been made into components, able to be applied to just about anything.

The organs now take multiple bites to finish eating, and biting it causes damage to them. They also start visibly missing pieces when bitten, thanks to the component.

Most edibility checks have been moved to the mob's can_eat() proc, which is called from the item's Eat() proc. Seems to work just fine.

Foods that do certain things when eaten, like shooting razor blades into your mouth, have been turned into a proc that gets run when COMSIG_ITEM_CONSUMED_PARTIAL is signaled. Similar thing for stuff that happens when it gets finishes eating, with COMSIG_ITEM_CONSUMED_ALL.

Organ points and heals are also done per-bite, but the points now have a 30% chance per expected point of being granted. So, hearts would have around a 60% chance of giving 2 points per bite.

Why's this needed?

Ancient request. Also I wanted to make it so that you'd only eat organs if you *really really meant to*.

Changelog


Code:
changelog
(u)Superlagg:
(*)Added an action bar to feeding other people things, and made organs take multiple bites to eat.
(+)Metachroitic factor now only has a 30% chance of being granted per point per bite.


PULL REQUEST DETAILS


Messages In This Thread
[MERGED PR] Adds an action bar to eating, componentizes food stuff - by github_bot - 01-21-2021, 02:47 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)