Files
Yogstation/code/datums/saymode.dm
Molti df51b30a0c Deletes all gamemodes in favor of storytellers (#22661)
* storytellers

* Update _base_event.dm

* Update _base_event.dm

* storytellers and midround events

* work

* antags

* last

* Update vote.dm

* fixes

* Update backrooms.dm

* so long gay dynamic

* Update vote.dm

* dynamic unit test

* cleanup

* delete minimum pop

* fix

* storyteller tweaks

* traitor awakening

* Update traitor.dm

* Update _basemap.dm

* Update ghost.dm

* oh god so much stuff

* Update _logging.dm

* buh bye events

* Update nuclearbomb.dm

* Update collections.ts

* Revert "Update collections.ts"

This reverts commit ff93cf170a.

* maybe

* fix

* fix

* Update game_mode.dm

* fixes

* fixes and more logging

* oh good gravy

* Update portal_storm.dm

* bring them back

* Update gamemode_subsystem.dm

* Update admin_verbs.dm

* Update force_event.dm

* damnit

* Update _base_event.dm

* fixes

* more

* it compiles :)

* more

* passes linter

* Update radiation_leak.dm

* Update dolphin_migration.dm

* Update brother.dm

* Update gamemode_subsystem.dm

* Update _base_event.dm

* Update _base_event.dm

* updates

* fixup

* add vampire remove prompt

* Update vampire.dm

* Update vampire.dm

* Update vampire.dm

* Update _base_event.dm

* Update gamemode_subsystem.dm

* Update gamemode_subsystem.dm

* Update dolphin_migration.dm

* fix migration

* title icon

* fixes

* formatting

* Update gamemode_subsystem.dm

* Update tzimisce.dm

* Update tzimisce.dm

* Update gamemode_subsystem.dm

* Update storytellers.dm

* tweak for our pop

* Update darkspawn.dm

* Update gamemode_subsystem.dm

* tweaks and fixes

* more and less roundstart

* Update ghost.dm

* lol lets just port the voting system

* Update scrubber_overflow.dm

* fix scrubber

* bye gamemode

* cleanup

* Update clown_operative.dm

* Update clown_operative.dm

* Update _base_event.dm

* probably fixed

* Update supermatter_surge.dm

* buh bye

* Update brain_trauma.dm

* more

* new pseudogamemode vote

* tweaks

* Update gamemode_subsystem.dm

* Update high_priority_bounty.dm

* Update gamemode_subsystem.dm

* Update storytellers.dm

* Update high_priority_bounty.dm

* tweaks

* Update high_priority_bounty.dm

* Update high_priority_bounty.dm

* fixes

* fixes

* tweak

* Update obsessed.dm

* so long pal

* Update battleroyale.dm

* deletions

* Update implant_dusting.dm

* bye

* uplinks fix

* Update uplink_items.dm

* Update uplink_items.dm

* delete more gamemodes

* more

* lol one ctrl f change

* hm what

* Update antagonists.dm

* Revert "Update antagonists.dm"

This reverts commit c3c2ee192e.

* Revert "hm what"

This reverts commit 43dbbcebcf.

* Revert "lol one ctrl f change"

This reverts commit 95e28f5221.

* cleanup

* more stuff

* more deletion

* this one gone too

* you and only you i shall save

* Update revolution.dm

* hold this please

* it's done

* bye admin stuff

* Update uplink.dm

* Update alert.dm

* should be fine

* fixes

* tweaks

* fixes

* fixes

* Update ticker.dm

* this is important

* Update heretic.dm

* Update clown_operative.dm

* rewrite

* fixes

* Update clockwork_cult.dm

* fixes

* Update uplink_items.dm

* reorganize

* Update objective.dm

* rewrite nightmare

* Update storytellers.dm

* tweak

* tweaks

* Update stray_cargo.dm

* Update stray_cargo.dm

* Update stray_cargo.dm

* delete unneeded tgui

* Update ticker.dm

* Update roundend.dm

* Update anomaly_grav.dm

* Update gamemode_subsystem.dm

* Update statpanel.dm

* Update statpanel.dm

* no additional delay

* clean up

* Update _base_event.dm

* Update _event.dm

* antag token and brothers

* no token picked

* Update _base_event.dm

---------

Co-authored-by: Byemoh <baiomurang@gmail.com>
2024-10-18 17:20:14 -05:00

141 lines
4.6 KiB
Plaintext

/datum/saymode
var/key
var/mode
var/bypass_mute = FALSE
//Return FALSE if you have handled the message. Otherwise, return TRUE and saycode will continue doing saycode things.
//user = whoever said the message
//message = the message
//language = the language.
/datum/saymode/proc/handle_message(mob/living/user, message, datum/language/language)
return TRUE
/datum/saymode/changeling
key = MODE_KEY_CHANGELING
mode = MODE_CHANGELING
/datum/saymode/changeling/handle_message(mob/living/user, message, datum/language/language)
if(ismob(user.pulledby) && IS_CHANGELING(user.pulledby) && user.pulledby.grab_state >= GRAB_NECK)
to_chat(user, span_warning("Our abilities are being dampened! We cannot speak through the hivemind!"))
return FALSE
switch(user.lingcheck())
if(LINGHIVE_LINK)
var/msg = span_changeling("<b>[user.mind]:</b> [message]")
for(var/_M in GLOB.player_list)
var/mob/M = _M
if(M in GLOB.dead_mob_list)
var/link = FOLLOW_LINK(M, user)
to_chat(M, "[link] [msg]")
else
switch(M.lingcheck())
if (LINGHIVE_LING)
var/mob/living/L = M
if (!HAS_TRAIT(L, CHANGELING_HIVEMIND_MUTE))
to_chat(M, msg)
if(LINGHIVE_LINK)
to_chat(M, msg)
if(LINGHIVE_OUTSIDER)
if(prob(40))
to_chat(M, span_changeling("We can faintly sense an outsider trying to communicate through the hivemind..."))
if(LINGHIVE_LING)
if (HAS_TRAIT(user, CHANGELING_HIVEMIND_MUTE))
to_chat(user, span_warning("The poison in the air hinders our ability to interact with the hivemind."))
return FALSE
var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling)
var/msg = span_changeling("<b>[changeling.changelingID]:</b> [message]")
user.log_talk(message, LOG_SAY, tag="changeling [changeling.changelingID]")
for(var/_M in GLOB.player_list)
var/mob/M = _M
if(M in GLOB.dead_mob_list)
var/link = FOLLOW_LINK(M, user)
to_chat(M, "[link] [msg]")
else
switch(M.lingcheck())
if(LINGHIVE_LINK)
to_chat(M, msg)
if(LINGHIVE_LING)
var/mob/living/L = M
if (!HAS_TRAIT(L, CHANGELING_HIVEMIND_MUTE))
to_chat(M, msg)
if(LINGHIVE_OUTSIDER)
if(prob(40))
to_chat(M, span_changeling("We can faintly sense another of our kind trying to communicate through the hivemind..."))
if(LINGHIVE_OUTSIDER)
to_chat(user, span_changeling("Our senses have not evolved enough to be able to communicate this way..."))
return FALSE
/datum/saymode/xeno
key = "a"
mode = MODE_ALIEN
/datum/saymode/xeno/handle_message(mob/living/user, message, datum/language/language)
if(user.hivecheck())
user.alien_talk(message)
return FALSE
/datum/saymode/vocalcords
key = MODE_KEY_VOCALCORDS
mode = MODE_VOCALCORDS
/datum/saymode/vocalcords/handle_message(mob/living/user, message, datum/language/language)
return TRUE //Yogs -- This is handled in a refactored, special-snowflake way someplace else,
// because most of vocalcord code is to resolve commands, which must evade accent code
/datum/saymode/binary //everything that uses .b (silicons, drones, blobbernauts/spores, swarmers)
key = MODE_KEY_BINARY
mode = MODE_BINARY
/datum/saymode/binary/handle_message(mob/living/user, message, datum/language/language)
if(isswarmer(user))
var/mob/living/simple_animal/hostile/swarmer/S = user
S.swarmer_chat(message)
return FALSE
if(isblobmonster(user))
var/mob/living/simple_animal/hostile/blob/B = user
B.blob_chat(message)
return FALSE
if(isdrone(user))
var/mob/living/simple_animal/drone/D = user
D.drone_chat(message)
return FALSE
if(user.binarycheck())
user.robot_talk(message)
return FALSE
return FALSE
/datum/saymode/holopad
key = MODE_KEY_HOLOPAD
mode = MODE_HOLOPAD
/datum/saymode/holopad/handle_message(mob/living/user, message, datum/language/language)
if(isAI(user))
var/mob/living/silicon/ai/AI = user
AI.holopad_talk(message, language)
return FALSE
return TRUE
/datum/saymode/darkspawn //yogs: darkspawn
key = MODE_KEY_DARKSPAWN
mode = MODE_DARKSPAWN
bypass_mute = TRUE //it's mentally talking, not physically
/datum/saymode/darkspawn/handle_message(mob/living/user, message, datum/language/language)
var/datum/mind = user.mind
if(!mind)
return TRUE
if(is_team_darkspawn(user))
user.log_talk(message, LOG_SAY, tag="darkspawn")
var/msg = span_velvet("<b>\[Mindlink\] [user.real_name]:</b> \"[message]\"")
for(var/mob/M in GLOB.player_list)
if(M in GLOB.dead_mob_list)
var/link = FOLLOW_LINK(M, user)
to_chat(M, "[link] [msg]")
else if(is_team_darkspawn(M))
to_chat(M, msg)
return FALSE //yogs end