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

Fixes some dex issues with food and natural weapons. #4196

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions code/_onclick/item_attack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ avoid code duplication. This includes items that may sometimes act as a standard
/mob/living/attackby(obj/item/used_item, mob/user)
if(!ismob(user))
return TRUE
if(can_operate(src, user) != OPERATE_DENY && used_item.do_surgery(src,user)) //Surgery
return TRUE
if(try_butcher_in_place(user, used_item))
return TRUE
if(user.a_intent != I_HURT)
if(can_operate(src, user) != OPERATE_DENY && used_item.do_surgery(src,user)) //Surgery
return TRUE
if(try_butcher_in_place(user, used_item))
return TRUE
var/oldhealth = current_health
. = used_item.use_on_mob(src, user)
if(used_item.force && istype(ai) && current_health < oldhealth)
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/other_mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@
if(.)
return

a_intent = I_HURT
var/attacking_with = get_natural_weapon()
if(a_intent == I_HELP || !attacking_with)
return A.attack_animal(src)

a_intent = I_HURT
Copy link
Member

Choose a reason for hiding this comment

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

already exists on line 77

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Line 77 is actually in error. Resolved now anyway.

. = A.attackby(attacking_with, src)
if(!.)
reset_offsets(anim_time = 2)
Expand Down
1 change: 1 addition & 0 deletions code/modules/reagents/reagent_containers/food.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
center_of_mass = @'{"x":16,"y":16}'
w_class = ITEM_SIZE_SMALL
abstract_type = /obj/item/chems/food
needs_attack_dexterity = DEXTERITY_NONE
Copy link
Member

Choose a reason for hiding this comment

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

I don't like this. We confirmed drakes can eat foods fine by using it in-hand, which I thought was the intended way for them to do it? This only affects clicking themselves (and other things) with food, and will undoubtedly have other side effects.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is fixing them not being able to eat food inhand.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Either that or Greenjoe misreported the issue.

Copy link
Member

Choose a reason for hiding this comment

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

it was misreported, we confirmed it on discord. using it inhand worked, clicking yourself is what didn't and that's intended afaik

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Per Discord I think I was misunderstood re: intentionality. I don't think it's good UX to arbitrarily have one method work and the other not for something as fundamental as eating. With respect to side effects, I can't think of anything offhand other than drakes feeding food to people, which is a bit whatever.

Copy link
Member

Choose a reason for hiding this comment

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

in that case yeah, this is fine


/// Indicates the food should give a stress effect on eating.
// This is set to 1 if the food is created by a recipe, -1 if the food is raw.
Expand Down
Loading