Files
Bubberstation/code/datums/status_effects/neutral.dm
vuonojenmustaturska 0254559eca Replaces hear_intercept with signals, refactors MOVABLE_HEAR, touches up nanites and to_chat (#44391)
hear_intercept is removed in favor of having the things that care register for the COMSIG_MOVABLE_HEAR signal instead.

The signal has been changed to be like the speech one with an args list.

Nanite datums no longer register for the hearing signal just in case, only the voice sensor nanite program does.

Dead code has been removed from to_chat, the savefile/sound checks being just-in-case boilerplate checks made during the conversion to to_chat, the replacetexts sidestepping a byond bug that was fixed in 512.1420.
2019-06-10 10:43:12 +12:00

146 lines
4.3 KiB
Plaintext

//entirely neutral or internal status effects go here
/datum/status_effect/sigil_mark //allows the affected target to always trigger sigils while mindless
id = "sigil_mark"
duration = -1
alert_type = null
var/stat_allowed = DEAD //if owner's stat is below this, will remove itself
/datum/status_effect/sigil_mark/tick()
if(owner.stat < stat_allowed)
qdel(src)
/datum/status_effect/crusher_damage //tracks the damage dealt to this mob by kinetic crushers
id = "crusher_damage"
duration = -1
status_type = STATUS_EFFECT_UNIQUE
alert_type = null
var/total_damage = 0
/datum/status_effect/syphon_mark
id = "syphon_mark"
duration = 50
status_type = STATUS_EFFECT_MULTIPLE
alert_type = null
on_remove_on_mob_delete = TRUE
var/obj/item/borg/upgrade/modkit/bounty/reward_target
/datum/status_effect/syphon_mark/on_creation(mob/living/new_owner, obj/item/borg/upgrade/modkit/bounty/new_reward_target)
. = ..()
if(.)
reward_target = new_reward_target
/datum/status_effect/syphon_mark/on_apply()
if(owner.stat == DEAD)
return FALSE
return ..()
/datum/status_effect/syphon_mark/proc/get_kill()
if(!QDELETED(reward_target))
reward_target.get_kill(owner)
/datum/status_effect/syphon_mark/tick()
if(owner.stat == DEAD)
get_kill()
qdel(src)
/datum/status_effect/syphon_mark/on_remove()
get_kill()
. = ..()
/obj/screen/alert/status_effect/in_love
name = "In Love"
desc = "You feel so wonderfully in love!"
icon_state = "in_love"
/datum/status_effect/in_love
id = "in_love"
duration = -1
status_type = STATUS_EFFECT_UNIQUE
alert_type = /obj/screen/alert/status_effect/in_love
var/mob/living/date
/datum/status_effect/in_love/on_creation(mob/living/new_owner, mob/living/love_interest)
. = ..()
if(.)
date = love_interest
linked_alert.desc = "You're in love with [date.real_name]! How lovely."
/datum/status_effect/in_love/tick()
if(date)
new /obj/effect/temp_visual/love_heart/invisible(get_turf(date.loc), owner)
/datum/status_effect/throat_soothed
id = "throat_soothed"
duration = 60 SECONDS
status_type = STATUS_EFFECT_REFRESH
alert_type = null
/datum/status_effect/throat_soothed/on_apply()
. = ..()
ADD_TRAIT(owner, TRAIT_SOOTHED_THROAT, "[STATUS_EFFECT_TRAIT]_[id]")
/datum/status_effect/throat_soothed/on_remove()
. = ..()
REMOVE_TRAIT(owner, TRAIT_SOOTHED_THROAT, "[STATUS_EFFECT_TRAIT]_[id]")
/datum/status_effect/bounty
id = "bounty"
status_type = STATUS_EFFECT_UNIQUE
var/mob/living/rewarded
/datum/status_effect/bounty/on_creation(mob/living/new_owner, mob/living/caster)
. = ..()
if(.)
rewarded = caster
/datum/status_effect/bounty/on_apply()
to_chat(owner, "<span class='boldnotice'>You hear something behind you talking...</span> <span class='notice'>You have been marked for death by [rewarded]. If you die, they will be rewarded.</span>")
playsound(owner, 'sound/weapons/shotgunpump.ogg', 75, 0)
return ..()
/datum/status_effect/bounty/tick()
if(owner.stat == DEAD)
rewards()
qdel(src)
/datum/status_effect/bounty/proc/rewards()
if(rewarded && rewarded.mind && rewarded.stat != DEAD)
to_chat(owner, "<span class='boldnotice'>You hear something behind you talking...</span> <span class='notice'>Bounty claimed.</span>")
playsound(owner, 'sound/weapons/shotgunshot.ogg', 75, 0)
to_chat(rewarded, "<span class='greentext'>You feel a surge of mana flow into you!</span>")
for(var/obj/effect/proc_holder/spell/spell in rewarded.mind.spell_list)
spell.charge_counter = spell.charge_max
spell.recharging = FALSE
spell.update_icon()
rewarded.adjustBruteLoss(-25)
rewarded.adjustFireLoss(-25)
rewarded.adjustToxLoss(-25)
rewarded.adjustOxyLoss(-25)
rewarded.adjustCloneLoss(-25)
/datum/status_effect/bugged //Lets another mob hear everything you can
id = "bugged"
duration = -1
status_type = STATUS_EFFECT_MULTIPLE
alert_type = null
var/mob/living/listening_in
/datum/status_effect/bugged/on_apply(mob/living/new_owner, mob/living/tracker)
. = ..()
if (.)
RegisterSignal(new_owner, COMSIG_MOVABLE_HEAR, .proc/handle_hearing)
/datum/status_effect/bugged/on_remove()
. = ..()
UnregisterSignal(owner, COMSIG_MOVABLE_HEAR)
/datum/status_effect/bugged/proc/handle_hearing(datum/source, list/hearing_args)
listening_in.show_message(hearing_args[HEARING_MESSAGE])
/datum/status_effect/bugged/on_creation(mob/living/new_owner, mob/living/tracker)
. = ..()
if(.)
listening_in = tracker