mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
fix eswords / cleaving saws not being sharpenable (#23779)
* fix eswords / cleaving saws not being sharpenable * need that * ok cut that out so it works again * extra bracket
This commit is contained in:
@@ -31,11 +31,9 @@
|
||||
if((signal_out & COMPONENT_BLOCK_SHARPEN_ALREADY) || (I.force > initial(I.force) && !(signal_out & COMPONENT_SHARPEN_APPLIED))) //No sharpening stuff twice
|
||||
to_chat(user, "<span class='warning'>[I] has already been refined before. It cannot be sharpened further!</span>")
|
||||
return
|
||||
if(!(signal_out & COMPONENT_SHARPEN_APPLIED)) //If the item has a relevant component and COMPONENT_BLOCK_SHARPEN_APPLIED is returned, the item only gets the throw force increase
|
||||
I.force = clamp(I.force + increment, 0, max)
|
||||
if(istype(I, /obj/item/melee/energy))
|
||||
var/obj/item/melee/energy/E = I
|
||||
if(E.force_on > initial(E.force_on) || (E.force > initial(E.force)))
|
||||
if(E.force_on > initial(E.force_on))
|
||||
to_chat(user, "<span class='warning'>[E] is much too powerful to sharpen further!</span>")
|
||||
return
|
||||
E.throwforce_on = clamp(E.throwforce_on + increment, 0, max)
|
||||
@@ -43,6 +41,9 @@
|
||||
E.force_on = clamp(E.force_on + increment, 0, max)
|
||||
E.force_off = clamp(E.force_off + increment, 0, max)
|
||||
|
||||
if(!(signal_out & COMPONENT_SHARPEN_APPLIED)) //If the item has a relevant component and COMPONENT_BLOCK_SHARPEN_APPLIED is returned, the item only gets the throw force increase
|
||||
I.force = clamp(I.force + increment, 0, max)
|
||||
|
||||
user.visible_message("<span class='notice'>[user] sharpens [I] with [src]!</span>", "<span class='notice'>You sharpen [I], making it much more deadly than before.</span>")
|
||||
if(!requires_sharpness)
|
||||
set_sharpness(TRUE)
|
||||
|
||||
Reference in New Issue
Block a user