mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
Fixes transforming items getting their force incorrectly modified when metalgenned multiple times (#95739)
## About The Pull Request Transforming weapons could change their sharpness which would break material force modification as materials modify the force differently based on item sharpness. Also the force was hard reset every time you switched it on or off, which would also break the math. I've rewritten the transforming component to preserve force and sharpness, and account for different sharpness of the item when switched on/off. Additionally, I've updated the two-handed component to use the new system to make it easier to work with/less prone to breaking. ## Why It's Good For The Game <img width="557" height="218" alt="image" src="https://github.com/user-attachments/assets/59cfb21a-e97e-4843-9c11-c87ed32384a9" /> ## Changelog 🆑 fix: Transforming items like eswords should no longer get absurd stats when metalgenned multiple times in a row /🆑
This commit is contained in:
@@ -53,7 +53,8 @@
|
||||
I.wound_bonus = I.wound_bonus + increment //wound_bonus has no cap
|
||||
user.visible_message(span_notice("[user] sharpens [I] with [src]!"), span_notice("You sharpen [I], making it much more deadly than before."))
|
||||
playsound(src, 'sound/items/unsheath.ogg', 25, TRUE)
|
||||
I.sharpness = SHARP_EDGED //When you whetstone something, it becomes an edged weapon, even if it was previously dull or pointy
|
||||
if(!(signal_out & COMPONENT_BLOCK_SHARPEN_SHARPNESS))
|
||||
I.sharpness = SHARP_EDGED //When you whetstone something, it becomes an edged weapon, even if it was previously dull or pointy
|
||||
I.throwforce = clamp(I.throwforce + increment, 0, max)
|
||||
I.name = "[prefix] [I.name]" //This adds a prefix and a space to the item's name regardless of what the prefix is
|
||||
desc = "[desc] At least, it used to."
|
||||
|
||||
Reference in New Issue
Block a user