[MIRROR] Fixes some heretic bugs (?) [MDB IGNORE] (#23386)

* Fixes some heretic bugs (?) (#77611)

## About The Pull Request

Items worn on a void cloak's suit storage are no longer visible on the
stripping menu.

Heretic influences protect the turf below them from leaving scannable fingerprints.

* Fixes some heretic bugs (?)

---------

Co-authored-by: carlarctg <53100513+carlarctg@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-08-28 23:32:05 +02:00
committed by GitHub
parent ee88c5bcd5
commit 513cbcf3d4
3 changed files with 40 additions and 7 deletions
+20 -2
View File
@@ -118,7 +118,7 @@
icon = 'icons/effects/eldritch.dmi'
icon_state = "pierced_illusion"
anchored = TRUE
interaction_flags_atom = INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND
interaction_flags_atom = INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND|INTERACT_ATOM_NO_FINGERPRINT_INTERACT
resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF
alpha = 0
@@ -197,7 +197,7 @@
name = "reality smash"
icon = 'icons/effects/eldritch.dmi'
anchored = TRUE
interaction_flags_atom = INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND
interaction_flags_atom = INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND|INTERACT_ATOM_NO_FINGERPRINT_INTERACT
resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF
invisibility = INVISIBILITY_OBSERVER
/// Whether we're currently being drained or not.
@@ -208,12 +208,28 @@
var/list/datum/mind/minds = list()
/// The image shown to heretics
var/image/heretic_image
/// We hold the turf we're on so we can remove and add the 'no prints' flag.
var/turf/on_turf
/obj/effect/heretic_influence/Initialize(mapload)
. = ..()
GLOB.reality_smash_track.smashes += src
heretic_image = image(icon, src, real_icon_state, OBJ_LAYER)
generate_name()
on_turf = get_turf(src)
if(!istype(on_turf))
return
on_turf.interaction_flags_atom |= INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND
RegisterSignal(on_turf, COMSIG_TURF_CHANGE, PROC_REF(replace_our_turf))
/obj/effect/heretic_influence/proc/replace_our_turf(datum/source, path, new_baseturfs, flags, post_change_callbacks)
SIGNAL_HANDLER
post_change_callbacks += CALLBACK(src, PROC_REF(replace_our_turf_two))
on_turf = null //hard del ref?
/obj/effect/heretic_influence/proc/replace_our_turf_two(turf/new_turf)
new_turf.interaction_flags_atom |= INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND
on_turf = new_turf
/obj/effect/heretic_influence/Destroy()
GLOB.reality_smash_track.smashes -= src
@@ -221,6 +237,8 @@
remove_mind(heretic)
heretic_image = null
on_turf?.interaction_flags_atom &= ~INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND
on_turf = null
return ..()
/obj/effect/heretic_influence/attack_hand_secondary(mob/user, list/modifiers)
@@ -92,13 +92,28 @@
/obj/item/clothing/suit/hooded/cultrobes/void/Initialize(mapload)
. = ..()
create_storage(storage_type = /datum/storage/pockets/void_cloak)
/obj/item/clothing/suit/hooded/cultrobes/void/Initialize(mapload)
. = ..()
make_visible()
/obj/item/clothing/suit/hooded/cultrobes/void/equipped(mob/user, slot)
. = ..()
if(slot & ITEM_SLOT_OCLOTHING)
RegisterSignal(user, COMSIG_MOB_EQUIPPED_ITEM, PROC_REF(hide_item))
RegisterSignal(user, COMSIG_MOB_UNEQUIPPED_ITEM, PROC_REF(show_item))
/obj/item/clothing/suit/hooded/cultrobes/void/dropped(mob/user)
. = ..()
UnregisterSignal(user, list(COMSIG_MOB_UNEQUIPPED_ITEM, COMSIG_MOB_EQUIPPED_ITEM))
/obj/item/clothing/suit/hooded/cultrobes/void/proc/hide_item(obj/item/item, slot)
SIGNAL_HANDLER
if(slot & ITEM_SLOT_SUITSTORE)
ADD_TRAIT(item, TRAIT_NO_STRIP, REF(src)) // i'd use examine hide but its a flag and yeah
/obj/item/clothing/suit/hooded/cultrobes/void/proc/show_item(obj/item/item, slot)
SIGNAL_HANDLER
REMOVE_TRAIT(item, TRAIT_NO_STRIP, REF(src))
/obj/item/clothing/suit/hooded/cultrobes/void/examine(mob/user)
. = ..()
if(!IS_HERETIC(user))