Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-sync

This commit is contained in:
xPokee
2025-10-03 07:05:54 -04:00
517 changed files with 24339 additions and 21253 deletions
+1 -1
View File
@@ -179,7 +179,7 @@
/// Called before being fully removed (before on_remove)
/// Returning FALSE will cancel removal
/datum/status_effect/proc/before_remove()
/datum/status_effect/proc/before_remove(...)
return TRUE
/// Called when a status effect of status_type STATUS_EFFECT_REFRESH
+2 -6
View File
@@ -299,16 +299,12 @@
)
//Makes the user passive, it's in their oath not to harm!
owner.add_traits(list(TRAIT_PACIFISM, TRAIT_HIPPOCRATIC_OATH), HIPPOCRATIC_OATH_TRAIT)
var/datum/atom_hud/med_hud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
med_hud.show_to(owner)
owner.add_traits(list(TRAIT_PACIFISM, TRAIT_HIPPOCRATIC_OATH, TRAIT_MEDICAL_HUD), HIPPOCRATIC_OATH_TRAIT)
return ..()
/datum/status_effect/hippocratic_oath/on_remove()
QDEL_NULL(aura_healing)
owner.remove_traits(list(TRAIT_PACIFISM, TRAIT_HIPPOCRATIC_OATH), HIPPOCRATIC_OATH_TRAIT)
var/datum/atom_hud/med_hud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
med_hud.hide_from(owner)
owner.remove_traits(list(TRAIT_PACIFISM, TRAIT_HIPPOCRATIC_OATH, TRAIT_MEDICAL_HUD), HIPPOCRATIC_OATH_TRAIT)
/datum/status_effect/hippocratic_oath/get_examine_text()
return span_notice("[owner.p_They()] seem[owner.p_s()] to have an aura of healing and helpfulness about [owner.p_them()].")
@@ -449,7 +449,7 @@
for(var/datum/wound/bleeding_thing as anything in throat.wounds)
var/datum/wound_pregen_data/pregen_data = GLOB.all_wound_pregen_data[bleeding_thing.type]
if(pregen_data.wounding_types_valid(list(WOUND_SLASH)) && bleeding_thing.severity > WOUND_SEVERITY_MODERATE && bleeding_thing.blood_flow > 0)
if(pregen_data.wounding_types_valid(WOUND_SLASH) && bleeding_thing.severity > WOUND_SEVERITY_MODERATE && bleeding_thing.blood_flow > 0)
still_bleeding = TRUE
break
if(!still_bleeding)
@@ -110,6 +110,7 @@
. = ..()
owner.sound_environment_override = SOUND_ENVIRONMENT_PSYCHOTIC
owner.add_mood_event(id, /datum/mood_event/drunk, drunk_value)
owner.clear_mood_event("[id]_after")
RegisterSignal(owner, COMSIG_MOB_FIRED_GUN, PROC_REF(drunk_gun_fired))
/datum/status_effect/inebriated/drunk/on_remove()
@@ -124,6 +125,8 @@
/// Clears any side effects we set due to being drunk.
/datum/status_effect/inebriated/drunk/proc/clear_effects()
owner.clear_mood_event(id)
if(!QDELING(owner) && HAS_PERSONALITY(owner, /datum/personality/bibulous))
owner.add_mood_event("[id]_after", /datum/mood_event/drunk_after)
if(owner.sound_environment_override == SOUND_ENVIRONMENT_PSYCHOTIC)
owner.sound_environment_override = SOUND_ENVIRONMENT_NONE
@@ -88,7 +88,6 @@
icon_state = "paralysis"
/datum/mood_event/spacer
category = "spacer"
/datum/mood_event/spacer/in_space
description = "Space is long and dark and empty, but it's my home."
+50
View File
@@ -801,3 +801,53 @@
id = "divine_spotlight"
#undef BEAM_ALPHA
/datum/status_effect/moodlet_in_area
id = "moodlet_in_area"
duration = STATUS_EFFECT_PERMANENT
tick_interval = STATUS_EFFECT_NO_TICK
status_type = STATUS_EFFECT_MULTIPLE
alert_type = null
/// Moodlet to apply while in the area
VAR_PRIVATE/moodlet_type
/// Typecache of areas that will trigger the moodlet while in them
VAR_PRIVATE/list/allowed_areas
/// Optional callback to run when checking if the moodlet should be applied. Should return TRUE to apply, FALSE to not.
VAR_PRIVATE/datum/callback/special_check
/datum/status_effect/moodlet_in_area/on_creation(mob/living/new_owner, moodlet_type, list/allowed_areas, datum/callback/special_check)
src.moodlet_type = moodlet_type
src.allowed_areas = typecacheof(allowed_areas)
src.special_check = special_check
return ..()
/datum/status_effect/moodlet_in_area/before_remove(moodlet_type, ...)
return moodlet_type == src.moodlet_type
/datum/status_effect/moodlet_in_area/on_apply()
if(!length(allowed_areas))
return FALSE
for(var/datum/status_effect/moodlet_in_area/other_effect in owner.status_effects)
if(other_effect.moodlet_type == moodlet_type)
return FALSE
owner.become_area_sensitive("[id]_[moodlet_type]")
RegisterSignal(owner, COMSIG_ENTER_AREA, PROC_REF(check_area))
return TRUE
/datum/status_effect/moodlet_in_area/on_remove()
UnregisterSignal(owner, COMSIG_ENTER_AREA)
owner.lose_area_sensitivity("[id]_[moodlet_type]")
owner.clear_mood_event("[id]_[moodlet_type]")
/datum/status_effect/moodlet_in_area/proc/check_area(datum/source, area/new_area)
SIGNAL_HANDLER
if(special_check && !special_check.Invoke(owner, new_area))
return
if(is_type_in_typecache(new_area, allowed_areas))
owner.add_mood_event("[id]_[moodlet_type]", moodlet_type)
else
owner.clear_mood_event("[id]_[moodlet_type]")