Merge pull request #11487 from Hatterhat/crusher-adv

fixes and tweaks for proto-kinetic melees
This commit is contained in:
Aronai Sieyes
2021-08-26 12:27:06 -04:00
committed by Chompstation Bot
parent 145f8172f4
commit 8f51150367
2 changed files with 60 additions and 50 deletions

View File

@@ -2,34 +2,29 @@
name = "destabilized"
desc = "You've been struck by a destabilizing bolt. By all accounts, this is probably a bad thing."
stacks = MODIFIER_STACK_EXTEND
on_created_text = "You feel destabilized."
on_expired_text = "You feel stable again."
on_created_text = "<span class='warning'>You feel physically unstable.</span>"
on_expired_text = "<span class='notice'>You feel physically stable again.</span>"
var/mutable_appearance/marked_underlay
var/obj/item/weapon/kinetic_crusher/hammer_synced
/*
/datum/modifier/New(var/new_holder, var/new_origin)
holder = new_holder
if(new_origin)
origin = weakref(new_origin)
else // We assume the holder caused the modifier if not told otherwise.
origin = weakref(holder)
..()
/mob/living/proc/add_modifier(var/modifier_type, var/expire_at = null, var/mob/living/origin = null, var/suppress_failure = FALSE)
*/
/datum/modifier/crusher_mark/New(var/new_holder, var/new_origin)
. = ..()
if(isliving(new_origin))
var/mob/living/origin = new_origin
var/obj/item/weapon/kinetic_crusher/to_sync = locate(/obj/item/weapon/kinetic_crusher) in origin
if(to_sync)
hammer_synced = to_sync
var/obj/item/weapon/kinetic_crusher/to_sync
if(istype(origin.get_active_hand(), /obj/item/weapon/kinetic_crusher))
to_sync = origin.get_active_hand()
else if (istype(origin.get_inactive_hand(), /obj/item/weapon/kinetic_crusher))
to_sync = origin.get_inactive_hand()
if(to_sync) // did we find it?
hammer_synced = to_sync // go ahead
if(hammer_synced? hammer_synced.can_mark(holder) : TRUE)
marked_underlay = mutable_appearance('icons/effects/effects.dmi', "shield2")
marked_underlay.pixel_x = -holder.pixel_x
marked_underlay.pixel_y = -holder.pixel_y
holder.underlays += marked_underlay
else
Destroy()
/datum/modifier/crusher_mark/Destroy()
hammer_synced = null