mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
Merge pull request #15741 from PKPenguin321/patch-18
sharpening blocks hotfix
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
if(I.force >= max || I.throwforce >= max)//no esword sharpening
|
||||
user << "<span class='notice'>[I] is much too powerful to sharpen further.</span>"
|
||||
return
|
||||
if(requires_sharpness && I.sharpness != IS_SHARP)
|
||||
if(requires_sharpness && !I.sharpness)
|
||||
user << "<span class='notice'>You can only sharpen items that are already sharp, such as knives.</span>"
|
||||
return
|
||||
if(istype(I, /obj/item/weapon/twohanded))//some twohanded items should still be sharpenable, but handle force differently. therefore i need this stuff
|
||||
@@ -36,7 +36,8 @@
|
||||
user << "<span class='notice'>[I] has already been refined before. It cannot be sharpened further.</span>"
|
||||
return
|
||||
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>")
|
||||
I.sharpness = IS_SHARP//this is only kept here because of super sharpening blocks, it wont do anything with standard since objects should already be sharp
|
||||
if(!requires_sharpness)
|
||||
I.sharpness = IS_SHARP_ACCURATE
|
||||
I.force = Clamp(I.force + increment, 0, max)
|
||||
I.throwforce = Clamp(I.throwforce + increment, 0, max)
|
||||
I.name = "[prefix] [I.name]"
|
||||
@@ -50,4 +51,4 @@
|
||||
increment = 200
|
||||
max = 200
|
||||
prefix = "super-sharpened"
|
||||
requires_sharpness = 0
|
||||
requires_sharpness = 0
|
||||
|
||||
Reference in New Issue
Block a user