[MIRROR] Heretic runes are easier to click through and have a windup for clearing them [MDB IGNORE] (#21852)

* Heretic runes are easier to click through and have a windup for clearing them (#75868)

Heretic runes no longer have every single transparent pixel set to 1
alpha, to make it easier to click on objects.

Clearing heretic runes with mansus grasp takes 0.4 seconds of standing
still, to prevent you from accidentally clearing it in combat.

Added code for effect remover element to use a windup if set.

* Heretic runes are easier to click through and have a windup for clearing them

---------

Co-authored-by: carlarctg <53100513+carlarctg@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-06-14 21:40:17 -07:00
committed by GitHub
co-authored by carlarctg
parent df7455f2a4
commit 5807f593f4
3 changed files with 9 additions and 1 deletions
+7
View File
@@ -14,6 +14,8 @@
var/datum/callback/on_clear_callback
/// A typecache of all effects we can clear with our item.
var/list/obj/effect/effects_we_clear
/// If above 0, how long it takes while standing still to remove the effect.
var/time_to_remove = 0 SECONDS
/datum/component/effect_remover/Initialize(
success_forcesay,
@@ -21,6 +23,7 @@
tip_text,
on_clear_callback,
effects_we_clear,
time_to_remove,
)
. = ..()
@@ -36,6 +39,7 @@
src.tip_text = tip_text
src.on_clear_callback = on_clear_callback
src.effects_we_clear = typecacheof(effects_we_clear)
src.time_to_remove = time_to_remove
/datum/component/effect_remover/Destroy(force, silent)
QDEL_NULL(on_clear_callback)
@@ -69,6 +73,9 @@
* Actually removes the effect, invoking our on_clear_callback before it's deleted.
*/
/datum/component/effect_remover/proc/do_remove_effect(obj/effect/target, mob/living/user)
if(time_to_remove && !do_after(user, time_to_remove, target))
return
var/obj/item/item_parent = parent
if(success_forcesay)
user.say(success_forcesay, forced = item_parent.name)
@@ -69,7 +69,8 @@
success_feedback = "You remove %THEEFFECT.", \
tip_text = "Clear rune", \
on_clear_callback = CALLBACK(src, PROC_REF(after_clear_rune)), \
effects_we_clear = list(/obj/effect/heretic_rune))
effects_we_clear = list(/obj/effect/heretic_rune), \
time_to_remove = 0.4 SECONDS)
/*
* Callback for effect_remover component.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB