Files
Bubberstation/code/datums/elements/glass_pacifist.dm
T
Penelope HazeandGitHub d0a7f955f8 Fix various issues with names in string interpolation (#89246)
## About The Pull Request
Commit messages should be descriptive of all changes.
The "incorrect `\The` macro capitalization" was intentional when it was
added, but as far as I know TG says "the supermatter" rather than "The
Supermatter," so it's incorrect now.
This is completely untested. I don't even know how you'd go about
testing this, it's just a fuckton of strings.
Someday I want to extract them and run NLP on it to catch grammar
problems...

## Why It's Good For The Game
Basic grammar pass for name strings. Should make `\the` work better and
avoid cases like `the John Smith`.
2025-01-29 17:46:03 +01:00

19 lines
564 B
Plaintext

/// Prevents the living from attacking windows
/datum/element/glass_pacifist
/datum/element/glass_pacifist/Attach(datum/target)
. = ..()
if(!isliving(target))
return ELEMENT_INCOMPATIBLE
RegisterSignal(target, COMSIG_LIVING_ATTACK_ATOM, PROC_REF(check_if_glass))
/datum/element/glass_pacifist/proc/check_if_glass(mob/living/owner, atom/hit)
SIGNAL_HANDLER
if(istype(hit, /obj/structure/window))
owner.visible_message(span_notice("\The [owner] nuzzles \the [hit]!"))
new /obj/effect/temp_visual/heart(hit.loc)
return COMPONENT_CANCEL_ATTACK_CHAIN