mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user