Skip to content

Commit

Permalink
Big ol' bunch of changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yawet330 committed Apr 29, 2024
1 parent 3a636d1 commit 4082d55
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
1 change: 0 additions & 1 deletion monkestation/code/modules/nabbers/code/_nabbers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
uses_offsets = TRUE
mutanttongue = /obj/item/organ/internal/tongue/nabber
hair_alpha = 0
payday_modifier = 0.50 //Lore accurate.
coldmod = 0.3 //Very very resistant to cold
heatmod = 2.5 // IT BURNS
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_MAGIC | MIRROR_PRIDE | ERT_SPAWN | RACE_SWAP | SLIME_EXTRACT
Expand Down
36 changes: 35 additions & 1 deletion monkestation/code/modules/nabbers/code/abilites/toggle_arms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,34 @@
effectiveness = 85, \
)

/datum/action/cooldown/toggle_arms/proc/sharpen_limbs(mob/user)
for(var/obj/item/held in user.held_items) //Actually sharpen them here
if(istype(held, /obj/item/melee/nabber_blade))
held.force = 20
held.wound_bonus = 25
held.name = "lethally sharpened hunting-arm"
var/datum/component/butchering/held_component = held.GetComponent(/datum/component/butchering)
held_component.effectiveness = 95
held_component.speed = 1.5 SECONDS

/obj/item/melee/nabber_blade/pre_attack(atom/W, mob/living/user, params) //Handles whetstoning your limbs. TODO: Maybe add nabber-specific traitor item for this?
if (istype(W, /obj/item/sharpener))
user.visible_message(span_notice("[user] begins to sharpen their massive blade-arms."),
span_notice("You begin to sharpen your natural weaponry."))
if(do_after(user, 7, target = src))
user.visible_message(span_notice("[user] sharpens the large, sharp underside of their bladearms..."),
span_notice("You sharpen the large underside of your bladearm, ready to kill..."))
playsound(src, 'sound/items/unsheath.ogg', 100, TRUE)
var/obj/item/sharpener/poorstone = W
poorstone.uses-- //Make sure you cant sharpen both for a single whetstone!
poorstone.name = "thoroughly ruined whetstone"
poorstone.desc = "A whetstone, ruined seemingly by sharpening both sides of a massive, bladed limb." //Give a forensic hint as to what ruined it.
for(var/datum/action/cooldown/toggle_arms/arms in user.actions) //Should only ever be one instance. Make sure to handle it, though
arms.has_sharpened = TRUE
arms.sharpen_limbs(user)
return
return ..()

/obj/item/melee/nabber_blade/afterattack(atom/target, mob/user, proximity)
. = ..()
if(!proximity)
Expand All @@ -45,6 +73,11 @@
cooldown_time = 5 SECONDS

button_icon = 'monkestation/code/modules/nabbers/icons/actions.dmi'
var/has_sharpened = FALSE //Simplest way to avoid bugs.

/datum/action/cooldown/toggle_arms/Destroy()
has_sharpened = null
return ..()

/datum/action/cooldown/toggle_arms/New(Target, original)
. = ..()
Expand Down Expand Up @@ -105,7 +138,8 @@

nabber.put_in_active_hand(active_hand)
nabber.put_in_inactive_hand(inactive_hand)

if(has_sharpened) //Rather than just having these be items that can cause huge problems, ensure we delete them and just recreate with the force neccessary.
sharpen_limbs(nabber)
RegisterSignal(owner, COMSIG_CARBON_REMOVE_LIMB, PROC_REF(on_lose_hand))
button_icon_state = "arms_on"
nabber.update_action_buttons()
Expand Down

0 comments on commit 4082d55

Please sign in to comment.