Skip to content

Commit

Permalink
Removes MSay (#3851)
Browse files Browse the repository at this point in the history
# About the pull request
Removes msay, gives all staff permission to use asay

<img width="284" alt="image"
src="https://github.com/cmss13-devs/cmss13/assets/41448081/8370b6bf-f1d0-442a-bafb-b7e565d580e0">

# Explain why it's good for the game
Overall, having both msay + asay feels just plain redundant
There's very few situations where you need to obscure something from all
mods that can't be done just the same via discord

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>


![image](https://github.com/cmss13-devs/cmss13/assets/41448081/c76392fa-6c13-4c7c-95c6-5b467aa11f27)

</details>


# Changelog
:cl:
admin: Removed msay. All staff now have access to asay
/:cl:

---------

Co-authored-by: John Doe <[email protected]>
  • Loading branch information
Zonespace27 and johndoe2013 authored Jul 14, 2023
1 parent 545a168 commit 18630c1
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 109 deletions.
1 change: 0 additions & 1 deletion code/__DEFINES/speech_channels.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
#define ME_CHANNEL "Me"
#define OOC_CHANNEL "OOC"
#define LOOC_CHANNEL "LOOC"
#define MOD_CHANNEL "MSAY"
#define ADMIN_CHANNEL "ASAY"
#define MENTOR_CHANNEL "Mentor"
7 changes: 0 additions & 7 deletions code/datums/keybinding/communication.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@
full_name = "IC Comms (;)"
keybind_signal = COMSIG_KG_CLIENT_RADIO_DOWN

/datum/keybinding/client/communication/mod_say
hotkey_keys = list("Unbound")
classic_keys = list("Unbound")
name = MOD_CHANNEL
full_name = "Mod Say"
keybind_signal = COMSIG_KB_ADMIN_ASAY_DOWN

/datum/keybinding/client/communication/asay
hotkey_keys = list("F3")
classic_keys = list("F5")
Expand Down
16 changes: 0 additions & 16 deletions code/datums/redis/callbacks/msay.dm

This file was deleted.

4 changes: 2 additions & 2 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ var/list/admin_verbs_default = list(
/client/proc/invismin,
/client/proc/set_explosive_antigrief,
/client/proc/check_explosive_antigrief,
/client/proc/cmd_mod_say,
/client/proc/dsay,
/client/proc/chem_panel, /*chem panel, allows viewing, editing and creation of reagent and chemical_reaction datums*/
/client/proc/player_panel_new, /*shows an interface for all players, with links to various panels*/
Expand Down Expand Up @@ -68,6 +67,8 @@ var/list/admin_verbs_default = list(
/datum/admins/proc/alertall,
/datum/admins/proc/imaginary_friend,
/client/proc/toggle_ares_ping,
/client/proc/cmd_admin_say, /*staff-only ooc chat*/
/client/proc/cmd_mod_say, /* alternate way of typing asay, no different than cmd_admin_say */
)

var/list/admin_verbs_admin = list(
Expand All @@ -80,7 +81,6 @@ var/list/admin_verbs_admin = list(
/client/proc/toggleprayers, /*toggles prayers on/off*/
/client/proc/toggle_hear_radio, /*toggles whether we hear the radio*/
/client/proc/event_panel,
/client/proc/cmd_admin_say, /*admin-only ooc chat*/
/client/proc/free_slot, /*frees slot for chosen job*/
/client/proc/modify_slot,
/client/proc/cmd_admin_rejuvenate,
Expand Down
84 changes: 31 additions & 53 deletions code/modules/admin/tabs/admin_tab.dm
Original file line number Diff line number Diff line change
Expand Up @@ -218,30 +218,52 @@

message_admins("[key_name(usr)] used Toggle Wake In View.")

/client/proc/cmd_mod_say(msg as text)
set name = "Msay" // This exists for ease of admins who were used to using msay instead of asay
set category = "Admin"
set hidden = TRUE

cmd_admin_say(msg)

/client/proc/cmd_admin_say(msg as text)
set name = "Asay" //Gave this shit a shorter name so you only have to time out "asay" rather than "admin say" to use it --NeoFite
set category = "Admin"
set hidden = TRUE

if(!check_rights(R_ADMIN))
if(!check_rights(R_ADMIN|R_MOD))
return

msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
if(!msg)

if (!msg)
return

log_adminpm("ADMIN : [key_name(src)] : [msg]")
REDIS_PUBLISH("byond.asay", "author" = src.key, "message" = strip_html(msg), "host" = ishost(src), "rank" = admin_holder.rank)
REDIS_PUBLISH("byond.asay", "author" = src.key, "message" = strip_html(msg), "admin" = CLIENT_HAS_RIGHTS(src, R_ADMIN), "rank" = admin_holder.rank)

if(findtext(msg, "@") || findtext(msg, "#"))
var/list/link_results = check_asay_links(msg)
if(length(link_results))
msg = link_results[ASAY_LINK_NEW_MESSAGE_INDEX]
link_results[ASAY_LINK_NEW_MESSAGE_INDEX] = null
var/list/pinged_admin_clients = link_results[ASAY_LINK_PINGED_ADMINS_INDEX]
for(var/iter_ckey in pinged_admin_clients)
var/client/iter_admin_client = pinged_admin_clients[iter_ckey]
if(!iter_admin_client?.admin_holder)
continue
window_flash(iter_admin_client)
SEND_SOUND(iter_admin_client.mob, sound('sound/misc/asay_ping.ogg'))

log_adminpm("ADMIN: [key_name(src)] : [msg]")

var/color = "adminsay"
if(ishost(usr))
color = "headminsay"

if(check_rights(R_ADMIN,0))
msg = "<span class='[color]'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, 1)]</EM> [ADMIN_JMP_USER(mob)]: <span class='message'>[msg]</span></span>"
for(var/client/C in GLOB.admins)
if(R_ADMIN & C.admin_holder.rights)
to_chat(C, msg)
var/channel = "ADMIN:"
channel = "[admin_holder.rank]:"
for(var/client/client as anything in GLOB.admins)
if((R_ADMIN|R_MOD) & client.admin_holder.rights)
to_chat(client, "<span class='[color]'><span class='prefix'>[channel]</span> <EM>[key_name(src,1)]</EM> [ADMIN_JMP_USER(mob)]: <span class='message'>[msg]</span></span>")

/datum/admins/proc/alertall()
set name = "Alert All"
Expand Down Expand Up @@ -328,50 +350,6 @@
var/msg = input(src, null, "asay \"text\"") as text|null
cmd_admin_say(msg)

/client/proc/cmd_mod_say(msg as text)
set name = "Msay"
set category = "Admin"
set hidden = TRUE

if(!check_rights(R_ADMIN|R_MOD))
return

msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)

if (!msg)
return

REDIS_PUBLISH("byond.msay", "author" = src.key, "message" = strip_html(msg), "admin" = CLIENT_HAS_RIGHTS(src, R_ADMIN), "rank" = admin_holder.rank)

if(findtext(msg, "@") || findtext(msg, "#"))
var/list/link_results = check_asay_links(msg)
if(length(link_results))
msg = link_results[ASAY_LINK_NEW_MESSAGE_INDEX]
link_results[ASAY_LINK_NEW_MESSAGE_INDEX] = null
var/list/pinged_admin_clients = link_results[ASAY_LINK_PINGED_ADMINS_INDEX]
for(var/iter_ckey in pinged_admin_clients)
var/client/iter_admin_client = pinged_admin_clients[iter_ckey]
if(!iter_admin_client?.admin_holder)
continue
window_flash(iter_admin_client)
SEND_SOUND(iter_admin_client.mob, sound('sound/misc/asay_ping.ogg'))

log_adminpm("MOD: [key_name(src)] : [msg]")

var/color = "mod"
if (check_rights(R_ADMIN,0))
color = "adminmod"

var/channel = "MOD:"
channel = "[admin_holder.rank]:"
for(var/client/C in GLOB.admins)
if((R_ADMIN|R_MOD) & C.admin_holder.rights)
to_chat(C, "<span class='[color]'><span class='prefix'>[channel]</span> <EM>[key_name(src,1)]</EM> [ADMIN_JMP_USER(mob)]: <span class='message'>[msg]</span></span>")

/client/proc/get_mod_say()
var/msg = input(src, null, "msay \"text\"") as text|null
cmd_mod_say(msg)

/client/proc/cmd_mentor_say(msg as text)
set name = "MentorSay"
set category = "OOC"
Expand Down
11 changes: 1 addition & 10 deletions code/modules/client/client_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -713,17 +713,8 @@ GLOBAL_LIST_INIT(whitelisted_client_procs, list(
winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=[looc]")
else
winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=looc")
if(MOD_CHANNEL)
if(admin_holder?.check_for_rights(R_MOD))
if(prefs.tgui_say)
var/msay = tgui_say_create_open_command(MOD_CHANNEL)
winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=[msay]")
else
winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=msay")
else
winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=")
if(ADMIN_CHANNEL)
if(admin_holder?.check_for_rights(R_ADMIN))
if(admin_holder?.check_for_rights(R_MOD))
if(prefs.tgui_say)
var/asay = tgui_say_create_open_command(ADMIN_CHANNEL)
winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=[asay]")
Expand Down
2 changes: 1 addition & 1 deletion code/modules/tgui/tgui-say/modal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
if(!payload?["channel"])
CRASH("No channel provided to an open TGUI-Say")
window_open = TRUE
if(payload["channel"] != OOC_CHANNEL && payload["channel"] != LOOC_CHANNEL && payload["channel"] != MOD_CHANNEL && payload["channel"] != ADMIN_CHANNEL && payload["channel"] != MENTOR_CHANNEL)
if(payload["channel"] != OOC_CHANNEL && payload["channel"] != LOOC_CHANNEL && payload["channel"] != ADMIN_CHANNEL && payload["channel"] != MENTOR_CHANNEL)
start_thinking()
return TRUE

Expand Down
5 changes: 1 addition & 4 deletions code/modules/tgui/tgui-say/speech.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@
if(LOOC_CHANNEL)
client.looc(entry)
return TRUE
if(MOD_CHANNEL)
client.cmd_mod_say(entry)
return TRUE
if(ADMIN_CHANNEL)
client.cmd_admin_say(entry)
return TRUE
Expand Down Expand Up @@ -94,7 +91,7 @@
return TRUE
if(type == "force")
var/target_channel = payload["channel"]
if(target_channel == ME_CHANNEL || target_channel == OOC_CHANNEL || target_channel == LOOC_CHANNEL || target_channel == MOD_CHANNEL)
if(target_channel == ME_CHANNEL || target_channel == OOC_CHANNEL || target_channel == LOOC_CHANNEL || target_channel == ADMIN_CHANNEL)
target_channel = SAY_CHANNEL // No ooc leaks
delegate_speech(alter_entry(payload), target_channel)
return TRUE
Expand Down
1 change: 0 additions & 1 deletion colonialmarines.dme
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,6 @@
#include "code\datums\redis\redis_message.dm"
#include "code\datums\redis\callbacks\_redis_callback.dm"
#include "code\datums\redis\callbacks\asay.dm"
#include "code\datums\redis\callbacks\msay.dm"
#include "code\datums\stamina\_stamina.dm"
#include "code\datums\stamina\none.dm"
#include "code\datums\statistics\cause_data.dm"
Expand Down
10 changes: 2 additions & 8 deletions tgui/packages/tgui-panel/chat/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,8 @@ export const MESSAGE_TYPES = [
type: MESSAGE_TYPE_ADMINCHAT,
name: 'Admin Chat',
description: 'ASAY messages',
selector: '.admin_channel, .adminsay, .headminsay',
admin: true,
},
{
type: MESSAGE_TYPE_MODCHAT,
name: 'Mod Chat',
description: 'MSAY messages',
selector: '.mod_channel, .mod, .adminmod, .staffsay',
selector:
'.admin_channel, .adminsay, .headminsay, .mod_channel, .mod, .adminmod, .staffsay',
admin: true,
},
{
Expand Down
5 changes: 1 addition & 4 deletions tgui/packages/tgui-say/helpers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,10 @@ export const getAvailableChannels = (
return availableChannels;
}

if (roles.includes('Mod')) {
availableChannels.push('MSAY');
}
if (roles.includes('Mentor')) {
availableChannels.push('Mentor');
}
if (roles.includes('Admin')) {
if (roles.includes('Mod')) {
availableChannels.push('ASAY');
}

Expand Down
2 changes: 0 additions & 2 deletions tgui/packages/tgui-say/styles/colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ $comms: #b4b4b4;
$me: #5975da;
$ooc: #1c52f5;
$looc: #e362b4;
$msay: #74471b;
$mentor: #b5850d;
$asay: #9611d4;

Expand Down Expand Up @@ -49,7 +48,6 @@ $_channel_map: (
'ooc': $ooc,
'looc': $looc,
'whisper': $say,
'msay': $msay,
'mentor': $mentor,
'asay': $asay,
'department': $comms,
Expand Down

0 comments on commit 18630c1

Please sign in to comment.