Skip to content

Commit

Permalink
[Bounty] Frying pans and flyswatters can be sharpened now (#3594)
Browse files Browse the repository at this point in the history
* frying pans and flyswatters can be sharpened now

* made the code better
  • Loading branch information
SirNightKnight authored Oct 3, 2024
1 parent a339359 commit ff13129
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion code/game/objects/items/sharpener.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
var/prefix = "sharpened"
///If TRUE, the whetstone will only sharpen already sharp items
var/requires_sharpness = TRUE
//monkestation addition to check for certain exceptions of items that can be sharpened
var/exceptions = list(/obj/item/reagent_containers/cooking_container/pan, /obj/item/melee/flyswatter) //RIP Ben

/obj/item/sharpener/attackby(obj/item/I, mob/user, params)
if(uses == 0)
Expand All @@ -30,7 +32,7 @@
if(I.force >= max || I.throwforce >= max) //So the whetstone never reduces force or throw_force
to_chat(user, span_warning("[I] is much too powerful to sharpen further!"))
return
if(requires_sharpness && !I.get_sharpness())
if(requires_sharpness && !I.get_sharpness() && !(is_type_in_list(I, exceptions))) //monkestation edit for the last part
to_chat(user, span_warning("You can only sharpen items that are already sharp, such as knives!"))
return
if(is_type_in_list(I, list(/obj/item/melee/energy, /obj/item/dualsaber))) //You can't sharpen the photons in energy meelee weapons
Expand Down

0 comments on commit ff13129

Please sign in to comment.