2029163d33
About The Pull Request Converts every single usage of playsound's vary parameter to use the boolean define instead of 1 or 0. I'm tired of people copypasting the incorrect usage. Also changes a couple of places where a list was picked from instead of using get_sfx internal calls This was done via regex: (playsound\(.+,.+,.+, ?)1( ?\)| ?,.+\)) to match 1 (playsound\(.+,.+,.+, ?)0( ?\)| ?,.+\)) to match 0 full sed commands: /(playsound\(.+,.+,.+, ?)1( ?\)| ?,.+\))/\1TRUE\2/ 1 to TRUE /(playsound\(.+,.+,.+, ?)0( ?\)| ?,.+\))/\1FALSE\2/ 0 to FALSE I'm not very good with regex and these could probably be optimized, but they worked. Why It's Good For The Game Code usability
146 lines
4.3 KiB
Plaintext
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, FALSE)
|
|
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, FALSE)
|
|
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
|