Skip to content

Commit

Permalink
Fixes some dex issues with food and natural weapons.
Browse files Browse the repository at this point in the history
  • Loading branch information
MistakeNot4892 committed Jul 16, 2024
1 parent 28e2947 commit 059dacc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
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
. = 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

/// 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

0 comments on commit 059dacc

Please sign in to comment.