Fixes Nullwave Vibrato triggering a chaplain's own antimagic. Also genericizes musical sect code slightly. (#67266)

Goes through and genericizes sect music effects slightly. As it stood pretty much all of them were copy+pastes of one another, with some minor changes, so making them one unified thing is cleaner.
This commit is contained in:
MrMelbert
2022-05-29 19:33:50 -07:00
committed by GitHub
parent ec70777b25
commit e17f2c6d68
2 changed files with 52 additions and 64 deletions
+14 -5
View File
@@ -85,10 +85,15 @@
SIGNAL_HANDLER
STOP_PROCESSING(SSobj, src)
if(viable_for_final_effect)
if(!finished)
to_chat(parent, span_warning("The song was interrupted, you cannot activate the finishing ability!"))
if(finished && linked_songtuner_rite && linked_song)
for(var/mob/living/carbon/human/listener in linked_song.hearing_mobs)
if(listener == parent || listener.can_block_magic(MAGIC_RESISTANCE_HOLY, charge_cost = 1))
continue
linked_songtuner_rite.finish_effect(listener, parent)
else
linked_songtuner_rite.finish_effect(parent, linked_song)
to_chat(parent, span_warning("The song was interrupted, you cannot activate the finishing ability!"))
linked_song.parent?.remove_filter("smooth_tunes_outline")
UnregisterSignal(linked_song.parent, list(
COMSIG_INSTRUMENT_TEMPO_CHANGE,
@@ -99,8 +104,12 @@
qdel(src)
/datum/component/smooth_tunes/process(delta_time = SSOBJ_DT)
if(linked_songtuner_rite)
linked_songtuner_rite.song_effect(parent, linked_song)
if(linked_songtuner_rite && linked_song)
for(var/mob/living/carbon/human/listener in linked_song.hearing_mobs)
if(listener == parent || listener.can_block_magic(MAGIC_RESISTANCE_HOLY, charge_cost = 0))
continue
linked_songtuner_rite.song_effect(listener, parent)
else
stop_singing()