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

Makes critters able to be picked up and eaten #3619

Closed

Conversation

Superlagg
Copy link
Contributor

@Superlagg Superlagg commented Feb 6, 2021

[FEATURE]

About the PR

It's now possible to pick up critters and hold them like items!

It works by stuffing the mob/obj critter into an item shell that looks just like them, and passing most actions performed on the shell through to the critter. From inside this shell, the critter and the thing holding it can interact with each other. If this shell stops being inside of either a mob (such as in an inventory) or a storage item (a backpack), the shell is removed and the critter is released.

Critters are picked up by clicking on them with GRAB intent. Obj critters are picked up instantly if all the checks pass, and mob critters are picked up upon reaching a certain level of grab. Larger mobs need both hands to carry, obj mobs that are pickuppable can't be picked up if the mob is angry at you (or angry in general), and most dangerous or hard to catch critters require lizard arms to pick up.

Most critters don't like being held, and will try to struggle their way out of your hand or backpack, some more violently than others. Though, some critters don't mind being held, like bees, and others are less unhappy if stuffed in a bag, like birds.

For obj critters that don't like being held, they'll squirm around and drain your stamina until you fall over and drop them, and also attack you if they really don't like being held. If they're inside a container, they'll try to climb out and/or throw shit out of it. Once released, they'll be mad at their holder for a while, or at anyone nearby if they were particularly unhappy.

For mob critters, their struggle actions are tied to intent and done through resisting or trying to move. Help intent makes the critter wiggle around and spray flavor text. Disarm tries to escape without hurting their captor. Grab intent tries to mess with the captor and their things, but doesn't try to hurt them or escape. Harm intent tries to attack the captor, mess with their things, and escape.

If a mob critter is in a storage item, disarm and grab intent resisting will try to use a random thing in the container on another random thing (including itself), and harm intent will do the same thing, but mostly to whoever's nearby the bag. In either case, it'll also try to throw their stuff all over the floor, and try to escape, with a chance of causing everything in their bag to fall out with them..

Mob critters will struggle automatically if there isn't a client assigned to them, based on how much they dislike being held. If a mob has AI, it'll be disabled while they're being held.

You can also store critters on your back or belt. No real reason, just thought it seemed kinda cute.

You can also eat the critters. It does damage to them, either 40% of their max health, or 15ish damage, whichever's lower. This'll make the mob forever hate being held, constantly attacking whoever holds it.

Also adds IN_RANGE_TURF, which is just like IN_RANGE, but it checks from the args' turfs instead of the args themselves. This is because it didn't seem like IN_RANGE worked well for things that were inside of other things.

Also adds an assoc'd list on /mob/living to store minor things, like whether or not the mob's been bitten or if the mob is illegal to hold.

Why's this needed?

Kyle suggested replacing lizards eating organs with lizards eating rats. I think there's something like that in here.

Changelog

(u)Superlagg
(*)Certain critters can now be picked up, held, and stuffed into containers! You can pick up a critter by grabbing it, though be warned, most critters don't like being held, and some of them require reptilian reflexes to catch!
(*)Critters can also be eaten while held.

Critters are cased in a holer shell
and they dont like it
every other branch of mine
wait here
also has checks to see if u can pickup it
they dont like being bitten or hit
@keywordlabeler keywordlabeler bot added the C-Feature A new feature or enhancements to existing features label Feb 6, 2021
@ZeWaka
Copy link
Member

ZeWaka commented Feb 6, 2021

Not going to review this unless it's atomized.

@Flaborized
Copy link
Contributor

I feel like plain grabbing is better for anything but the really really small critters and mobs. Having say, a bee in your hand should be really visible I feel (like on your sprite) which is unreasonable for every single critter. It just in general sounds messy and unintuitive with the weird intent stuff, and I can imagine there being a lot of expected interactions that don't exist/create 'design debt'.

Would much rather lizards just eat rat corpses by clicking them or something. Sounds more intuitive + less janky to me

@ZeWaka
Copy link
Member

ZeWaka commented Feb 6, 2021

Would much rather lizards just eat rat corpses by clicking them or something. Sounds more intuitive + less janky to me

or clickdragging, yes

@UrsulaMejor
Copy link
Contributor

UrsulaMejor commented Feb 6, 2021

this pr is way, way, way too fucking much all at once. Too many changes at once, and most of the changes seem too broad in scope.

dial this back to letting you pick up and carry ghost critters, and letting them resist out, as a proof of concept. none of the rest of this stuff. then we can talk about expanding it to obj critters, and writing custom ai, and then lizard person interactions as separate components in several follow up prs

@Superlagg
Copy link
Contributor Author

this pr is way, way, way too fucking much all at once. Too many changes at once, and most of the changes seem too broad in scope.

dial this back to letting you pick up and carry ghost critters, and letting them resist out, as a proof of concept. none of the rest of this stuff. then we can talk about expanding it to obj critters, and writing custom ai, and then lizard person interactions as separate components in several follow up prs

k

@Superlagg Superlagg closed this Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Feature A new feature or enhancements to existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants