mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user