From e3d6e73b51493806ecffb1b5400950f6f5481e0f Mon Sep 17 00:00:00 2001 From: Yaroslav Nurkov <78199449+AnywayFarus@users.noreply.github.com> Date: Thu, 19 Dec 2024 20:37:54 +0300 Subject: [PATCH] =?UTF-8?q?=D0=90=D0=BF=D0=B3=D1=80=D0=B5=D0=B9=D0=B4=20?= =?UTF-8?q?=D0=B8=D0=B2=D0=B5=D0=BD=D1=82=D0=BE=D0=B4=D0=B5=D0=BB=D0=BE?= =?UTF-8?q?=D0=B2=20(#4973)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * base * todos * forgeted * is_eventmaker fix * client in client method * another fix with eventmaker check * refactor * hehe * dme * Apply suggestions from code review * add verbs to eventers --------- Co-authored-by: Iajret Co-authored-by: Iajret <8430839+Iajret@users.noreply.github.com> --- SQL/optimisations_2017-02-19.sql | 2 +- SQL/tgstation_schema.sql | 2 +- SQL/tgstation_schema_prefixed.sql | 2 +- code/__DEFINES/speech_channels.dm | 1 + .../_globalvars/lists/hidden_verbs.dm | 15 +++++ .../~ff_defines/_globalvars/logging.dm | 1 + code/__DEFINES/~ff_defines/span.dm | 1 + code/__HELPERS/hearted.dm | 2 +- code/controllers/subsystem/admin_verbs.dm | 1 - code/controllers/subsystem/stickyban.dm | 2 +- code/datums/brain_damage/imaginary_friend.dm | 7 +- code/modules/admin/admin.dm | 11 +++- code/modules/admin/known_alts.dm | 4 +- code/modules/admin/sql_ban_system.dm | 8 +-- code/modules/admin/sql_message_system.dm | 65 ++++++++++++++----- code/modules/admin/stickyban.dm | 18 ++--- code/modules/admin/topic.dm | 7 ++ code/modules/admin/verbs/admingame.dm | 39 +++++------ code/modules/admin/verbs/adminsay.dm | 9 ++- code/modules/admin/verbs/maprotation.dm | 2 +- code/modules/admin/verbs/secrets.dm | 4 ++ code/modules/admin/verbs/server.dm | 6 +- code/modules/admin/view_variables/topic.dm | 2 +- code/modules/client/client_procs.dm | 28 ++++---- .../modules/mob/dead/observer/observer_say.dm | 7 +- code/modules/mob/living/living_say.dm | 7 +- code/modules/tgui_input/say_modal/modal.dm | 2 +- code/modules/tgui_input/say_modal/speech.dm | 5 ++ config/nova/config_nova.txt | 1 + config/nova/eventmakers.txt | 0 .../logging/categories/log_category_game.dm | 5 ++ .../code/subsystem/player_ranks.dm | 1 - tff_modular/modules/eventers/eventmaker.dm | 34 ++++++++++ .../modules/eventers/eventmaker_verbs.dm | 13 ++++ .../modules/eventers/random_stuff_ban.dm | 14 ++++ tgstation.dme | 6 ++ tgui/packages/tgui-panel/chat/constants.ts | 9 +++ .../tgui-panel/styles/tgchat/chat-dark.scss | 8 +++ .../tgui-panel/styles/tgchat/chat-light.scss | 8 +++ tgui/packages/tgui-say/ChannelIterator.ts | 8 ++- tgui/packages/tgui-say/constants/index.tsx | 1 + tgui/packages/tgui-say/styles/colors.scss | 2 + tgui/packages/tgui/interfaces/Secrets.jsx | 32 ++++----- 43 files changed, 302 insertions(+), 100 deletions(-) create mode 100644 code/__DEFINES/~ff_defines/_globalvars/lists/hidden_verbs.dm create mode 100644 code/__DEFINES/~ff_defines/_globalvars/logging.dm create mode 100644 code/__DEFINES/~ff_defines/span.dm create mode 100644 config/nova/eventmakers.txt create mode 100644 tff_modular/modules/eventers/eventmaker.dm create mode 100644 tff_modular/modules/eventers/eventmaker_verbs.dm create mode 100644 tff_modular/modules/eventers/random_stuff_ban.dm diff --git a/SQL/optimisations_2017-02-19.sql b/SQL/optimisations_2017-02-19.sql index 1bb19cc6677..a98386186f2 100644 --- a/SQL/optimisations_2017-02-19.sql +++ b/SQL/optimisations_2017-02-19.sql @@ -124,7 +124,7 @@ ALTER TABLE `library` , CHANGE COLUMN `deleted` `deleted` TINYINT(1) UNSIGNED NULL DEFAULT NULL; ALTER TABLE `messages` - CHANGE COLUMN `type` `type` ENUM('memo', 'message', 'message sent', 'note', 'watchlist entry') NOT NULL + CHANGE COLUMN `type` `type` ENUM('memo', 'message', 'message sent', 'note', 'watchlist entry', 'eventmaker note') NOT NULL , CHANGE COLUMN `text` `text` VARCHAR(2048) NOT NULL , CHANGE COLUMN `secret` `secret` TINYINT(1) UNSIGNED NOT NULL; diff --git a/SQL/tgstation_schema.sql b/SQL/tgstation_schema.sql index 01d04af965f..877ce168b11 100644 --- a/SQL/tgstation_schema.sql +++ b/SQL/tgstation_schema.sql @@ -307,7 +307,7 @@ DROP TABLE IF EXISTS `messages`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `messages` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `type` enum('memo','message','message sent','note','watchlist entry') NOT NULL, + `type` enum('memo','message','message sent','note','watchlist entry', 'eventmaker note') NOT NULL, `targetckey` varchar(32) NOT NULL, `adminckey` varchar(32) NOT NULL, `text` varchar(2048) NOT NULL, diff --git a/SQL/tgstation_schema_prefixed.sql b/SQL/tgstation_schema_prefixed.sql index 99a4191172c..7c918b144db 100644 --- a/SQL/tgstation_schema_prefixed.sql +++ b/SQL/tgstation_schema_prefixed.sql @@ -305,7 +305,7 @@ DROP TABLE IF EXISTS `SS13_messages`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `SS13_messages` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `type` enum('memo','message','message sent','note','watchlist entry') NOT NULL, + `type` enum('memo','message','message sent','note','watchlist entry', 'eventmaker note') NOT NULL, `targetckey` varchar(32) NOT NULL, `adminckey` varchar(32) NOT NULL, `text` varchar(2048) NOT NULL, diff --git a/code/__DEFINES/speech_channels.dm b/code/__DEFINES/speech_channels.dm index 9f1526ebd56..4e628dad0d5 100644 --- a/code/__DEFINES/speech_channels.dm +++ b/code/__DEFINES/speech_channels.dm @@ -4,3 +4,4 @@ #define ME_CHANNEL "Me" #define OOC_CHANNEL "OOC" #define ADMIN_CHANNEL "Admin" +#define EVENT_CHANNEL "Event" // TFF ADDITION - Eventmaker diff --git a/code/__DEFINES/~ff_defines/_globalvars/lists/hidden_verbs.dm b/code/__DEFINES/~ff_defines/_globalvars/lists/hidden_verbs.dm new file mode 100644 index 00000000000..9e4b6fa181d --- /dev/null +++ b/code/__DEFINES/~ff_defines/_globalvars/lists/hidden_verbs.dm @@ -0,0 +1,15 @@ +GLOBAL_LIST_INIT(eventmakers_blacklist_verbs, list( + //Admin + "Add PB Bypass" = TRUE, "ASay" = TRUE, "Cross-server Help Request" = TRUE, + "Get Current Logs" = TRUE, "Get Server Logs" = TRUE, "Known Alts Panel" = TRUE, + "loudAsay" = TRUE, "Paintings manager" = TRUE, "Player Playtime" = TRUE, "Player Ticket History" = TRUE, + "Reload Admins" = TRUE, "Revoke PB Bypass" = TRUE, "Trophy Manager" = TRUE, "View Round Logs" = TRUE, + "Load Away Mission" = TRUE, "Mass Zombie Cure" = TRUE, "Mass Zombie Infection" = TRUE, + "Polymorph All" = TRUE, "Title Screen: Change" = TRUE, "Title Screen: Set HTML" = TRUE, "Title Screen: Set Notice" = TRUE, + "Show Lag Switches" = TRUE, + //Server + "Reestablish DB Connection" = TRUE, "Reset Player OOC Color" = TRUE, "Set Player OOC Color" = TRUE, + "Toggle Antag OOC" = TRUE, "Toggle CDN" = TRUE, "Toggle OOC" = TRUE, "Toggle Security OOC" = TRUE, + //Debug + "Debug Stat Panel" = TRUE, "Migrate Player Ranks" = TRUE, "Open LUA Editor" = TRUE, "Re-establish Connection To TTS" = TRUE, "Reload Configuration" = TRUE, "Run Empty Query" = TRUE, "View Runtime" = TRUE +)) diff --git a/code/__DEFINES/~ff_defines/_globalvars/logging.dm b/code/__DEFINES/~ff_defines/_globalvars/logging.dm new file mode 100644 index 00000000000..3dddcc20c13 --- /dev/null +++ b/code/__DEFINES/~ff_defines/_globalvars/logging.dm @@ -0,0 +1 @@ +#define LOG_CATEGORY_GAME_EVENTMAKER "game-eventmaker" diff --git a/code/__DEFINES/~ff_defines/span.dm b/code/__DEFINES/~ff_defines/span.dm new file mode 100644 index 00000000000..170453b8d49 --- /dev/null +++ b/code/__DEFINES/~ff_defines/span.dm @@ -0,0 +1 @@ +#define span_eventmaker(str) ("" + str + "") diff --git a/code/__HELPERS/hearted.dm b/code/__HELPERS/hearted.dm index d8f7832cbc0..5594a0f63f8 100644 --- a/code/__HELPERS/hearted.dm +++ b/code/__HELPERS/hearted.dm @@ -33,7 +33,7 @@ continue hearted_mob.client.adjust_heart() message += "[hearted_ckey][i == hearts.len ? "" : ", "]" - message_admins(message.Join()) + message_admins(message.Join(), TRUE) /// Ask someone if they'd like to award a commendation for the round, 3 tries to get the name they want before we give up /mob/proc/query_heart(attempt=1) diff --git a/code/controllers/subsystem/admin_verbs.dm b/code/controllers/subsystem/admin_verbs.dm index 9496b95d998..f977c17dd6e 100644 --- a/code/controllers/subsystem/admin_verbs.dm +++ b/code/controllers/subsystem/admin_verbs.dm @@ -109,7 +109,6 @@ SUBSYSTEM_DEF(admin_verbs) if(!admin.holder.check_for_rights(verb_singleton.permissions)) to_chat(admin, span_adminnotice("You lack the permissions to do this.")) return - var/old_usr = usr usr = admin.mob // THE MACRO ENSURES THIS EXISTS. IF IT EVER DOESNT EXIST SOMEONE DIDNT USE THE DAMN MACRO! diff --git a/code/controllers/subsystem/stickyban.dm b/code/controllers/subsystem/stickyban.dm index 757df6a2266..aecf0ca7c13 100644 --- a/code/controllers/subsystem/stickyban.dm +++ b/code/controllers/subsystem/stickyban.dm @@ -46,7 +46,7 @@ SUBSYSTEM_DEF(stickyban) //get_stickyban_from_ckey returned null, aka something broke. Notify admins about it if (!ban) - message_admins("Failed to apply stickyban for [bannedkey]. Check the DB for corrupt stickyban entries.") + message_admins("Failed to apply stickyban for [bannedkey]. Check the DB for corrupt stickyban entries.", TRUE) log_admin_private ("Failed to apply stickyban for [bannedkey]. Check the DB for corrupt stickyban entries.") continue diff --git a/code/datums/brain_damage/imaginary_friend.dm b/code/datums/brain_damage/imaginary_friend.dm index 6945648a734..750362f5880 100644 --- a/code/datums/brain_damage/imaginary_friend.dm +++ b/code/datums/brain_damage/imaginary_friend.dm @@ -227,7 +227,12 @@ message = capitalize(message) if(message_mods[RADIO_EXTENSION] == MODE_ADMIN) - SSadmin_verbs.dynamic_invoke_verb(client, /datum/admin_verb/cmd_admin_say, message) + // TFF ADDITION START - Eventmaker + if(client.is_eventmaker()) + SSadmin_verbs.dynamic_invoke_verb(client, /datum/admin_verb/cmd_eventmaker_say, message) + else + // TFF ADDITION END + SSadmin_verbs.dynamic_invoke_verb(client, /datum/admin_verb/cmd_admin_say, message) return if(message_mods[RADIO_EXTENSION] == MODE_DEADMIN) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 5f40de037f4..963e85f1450 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1,7 +1,14 @@ //////////////////////////////// -/proc/message_admins(msg) +/proc/message_admins(msg, not_to_eventmaker) // TFF EDIT. ORIGINAL /proc/message_admins(msg) msg = "ADMIN LOG: [msg]" - to_chat(GLOB.admins, +// TFF CHANGE START - EVENTMAKERS + var/list/addressee = GLOB.admins.Copy() + if(not_to_eventmaker) + for(var/client/admin in GLOB.admins) + if(admin.is_eventmaker()) + addressee -= admin +// TFF CHANGE END + to_chat(addressee, // TFF EDIT. ORIGINAL GLOB.admins, type = MESSAGE_TYPE_ADMINLOG, html = msg, confidential = TRUE) diff --git a/code/modules/admin/known_alts.dm b/code/modules/admin/known_alts.dm index 4105c7f4edc..268e72f727b 100644 --- a/code/modules/admin/known_alts.dm +++ b/code/modules/admin/known_alts.dm @@ -65,7 +65,7 @@ GLOBAL_DATUM_INIT(known_alts, /datum/known_alts, new) if (query_add_known_alt.warn_execute()) var/message = "[key_name(usr)] has added a new known alt connection between [ckey1] and [ckey2]." - message_admins(message) + message_admins(message, TRUE) log_admin_private(message) cached_known_alts = null @@ -115,7 +115,7 @@ GLOBAL_DATUM_INIT(known_alts, /datum/known_alts, new) if (query_delete_known_alt.warn_execute()) var/message = "[key_name(usr)] has deleted the known alt connection between [result[1]] and [result[2]]." - message_admins(message) + message_admins(message, TRUE) log_admin_private(message) cached_known_alts = null diff --git a/code/modules/admin/sql_ban_system.dm b/code/modules/admin/sql_ban_system.dm index 270907cb1ab..ef446f7c817 100644 --- a/code/modules/admin/sql_ban_system.dm +++ b/code/modules/admin/sql_ban_system.dm @@ -685,7 +685,7 @@ var/target = ban_target_string(player_key, player_ip, player_cid) var/msg = "has created a [global_ban ? "global" : "local"] [isnull(duration) ? "permanent" : "temporary [time_message]"] [applies_to_admins ? "admin " : ""][is_server_ban ? "server ban" : "role ban from [roles_to_ban.len] roles"] for [target]." // NOVA EDIT CHANGE - MULTISERVER log_admin_private("[kn] [msg][is_server_ban ? "" : " Roles: [roles_to_ban.Join(", ")]"] Reason: [reason]") - message_admins("[kna] [msg][is_server_ban ? "" : " Roles: [roles_to_ban.Join("\n")]"]\nReason: [reason]") + message_admins("[kna] [msg][is_server_ban ? "" : " Roles: [roles_to_ban.Join("\n")]"]\nReason: [reason]", TRUE) if(applies_to_admins) send2adminchat("BAN ALERT","[kn] [msg]") if(player_ckey) @@ -885,7 +885,7 @@ return qdel(query_unban) log_admin_private("[kn] has unbanned [target] from [role].") - message_admins("[kna] has unbanned [target] from [role].") + message_admins("[kna] has unbanned [target] from [role].", TRUE) var/client/C = GLOB.directory[player_key] if(C) build_ban_cache(C) @@ -930,7 +930,7 @@ return qdel(query_reban) log_admin_private("[kn] has rebanned [target] from [role].") - message_admins("[kna] has rebanned [target] from [role].") + message_admins("[kna] has rebanned [target] from [role].", TRUE) var/banned_player_message = span_boldannounce("[usr.client.key] has re-activated a removed ban from [role] for your key.") var/banned_other_message = span_boldannounce("[usr.client.key] has re-activated a removed ban from [role] for your IP or CID.") @@ -1041,7 +1041,7 @@ var/kn = key_name(usr) var/kna = key_name_admin(usr) log_admin_private("[kn] has edited the [changes_keys_text] of a ban for [old_key ? "[old_key]" : "[old_ip]-[old_cid]"].") //if a ban doesn't have a key it must have an ip and/or a cid to have reached this point normally - message_admins("[kna] has edited the [changes_keys_text] of a ban for [old_key ? "[old_key]" : "[old_ip]-[old_cid]"].") + message_admins("[kna] has edited the [changes_keys_text] of a ban for [old_key ? "[old_key]" : "[old_ip]-[old_cid]"].", TRUE) if(changes["Applies to admins"]) send2adminchat("BAN ALERT","[kn] has edited a ban for [old_key ? "[old_key]" : "[old_ip]-[old_cid]"] to [applies_to_admins ? "" : "not"]affect admins") diff --git a/code/modules/admin/sql_message_system.dm b/code/modules/admin/sql_message_system.dm index c44853646e3..52bebfd72d7 100644 --- a/code/modules/admin/sql_message_system.dm +++ b/code/modules/admin/sql_message_system.dm @@ -5,7 +5,7 @@ if(!type) return var/target_ckey = ckey(target_key) - if(!target_key && (type == "note" || type == "message" || type == "watchlist entry")) + if(!target_key && (type == "note" || type == "message" || type == "watchlist entry" || type == "eventmaker note")) // TFF EDIT - Eventmaker var/new_key = input(usr,"Who would you like to create a [type] for?","Enter a key or ckey",null) as null|text if(!new_key) return @@ -102,7 +102,7 @@ qdel(query_create_message) if(logged) log_admin_private(pm) - message_admins("[header]:
[text]") + message_admins("[header]:
[text]", TRUE) admin_ticket_log(target_ckey, "[header]
[text]") if(browse) browse_messages("[type]") @@ -146,7 +146,7 @@ var/m1 = "[user_key_name] has deleted a [type][(type == "note" || type == "message" || type == "watchlist entry") ? " for" : " made by"] [target_key]: [text]" var/m2 = "[user_name_admin] has deleted a [type][(type == "note" || type == "message" || type == "watchlist entry") ? " for" : " made by"] [target_key]:
[text]" log_admin_private(m1) - message_admins(m2) + message_admins(m2, TRUE) if(browse) browse_messages("[type]") else @@ -195,7 +195,7 @@ return qdel(query_edit_message) log_admin_private("[kn] has edited a [type] [(type == "note" || type == "message" || type == "watchlist entry") ? " for [target_key]" : ""] made by [admin_key] from [old_text] to [new_text]") - message_admins("[kna] has edited a [type] [(type == "note" || type == "message" || type == "watchlist entry") ? " for [target_key]" : ""] made by [admin_key] from
[old_text]
to
[new_text]") + message_admins("[kna] has edited a [type] [(type == "note" || type == "message" || type == "watchlist entry") ? " for [target_key]" : ""] made by [admin_key] from
[old_text]
to
[new_text]", TRUE) if(browse) browse_messages("[type]") else @@ -266,7 +266,7 @@ return qdel(query_edit_message_expiry) log_admin_private("[kn] has edited the expiration time of a [type] [(type == "note" || type == "message" || type == "watchlist entry") ? " for [target_key]" : ""] made by [admin_key] from [(old_expiry ? old_expiry : "no expiration date")] to [new_expiry]") - message_admins("[kna] has edited the expiration time of a [type] [(type == "note" || type == "message" || type == "watchlist entry") ? " for [target_key]" : ""] made by [admin_key] from [(old_expiry ? old_expiry : "no expiration date")] to [new_expiry]") + message_admins("[kna] has edited the expiration time of a [type] [(type == "note" || type == "message" || type == "watchlist entry") ? " for [target_key]" : ""] made by [admin_key] from [(old_expiry ? old_expiry : "no expiration date")] to [new_expiry]", TRUE) if(browse) browse_messages("[type]") else @@ -320,7 +320,7 @@ return qdel(query_edit_note_severity) log_admin_private("[kn] has edited the severity of a [type] for [target_key] made by [admin_key] from [old_severity] to [new_severity]") - message_admins("[kna] has edited the severity time of a [type] for [target_key] made by [admin_key] from [old_severity] to [new_severity]") + message_admins("[kna] has edited the severity time of a [type] for [target_key] made by [admin_key] from [old_severity] to [new_severity]", TRUE) browse_messages(target_ckey = ckey(target_key), agegate = TRUE) qdel(query_find_edit_note_severity) @@ -364,7 +364,7 @@ return qdel(query_message_secret) log_admin_private("[kn] has toggled [target_key]'s [type] made by [admin_key] to [secret ? "not secret" : "secret"]") - message_admins("[kna] has toggled [target_key]'s [type] made by [admin_key] to [secret ? "not secret" : "secret"]") + message_admins("[kna] has toggled [target_key]'s [type] made by [admin_key] to [secret ? "not secret" : "secret"]", TRUE) browse_messages(target_ckey = ckey(target_key), agegate = TRUE) qdel(query_find_message_secret) @@ -381,7 +381,8 @@ var/list/navbar = list("All#") for(var/letter in GLOB.alphabet) navbar += "[letter]" - navbar += "MemosWatchlist" + if(!usr?.client.is_eventmaker()) // TFF ADDITION - Eventmaker + navbar += "MemosWatchlist" navbar += "
\ \ [HrefTokenFormField()]\ @@ -438,6 +439,10 @@ var/playtime = query_get_type_messages.item[11] var/round_id = query_get_type_messages.item[12] // NOVA EDIT CHANGE END - MULTISERVER output += "" + // TFF ADDITION START - Eventmaker + if(type != "eventmaker note" && usr?.client.is_eventmaker()) + continue + // TFF ADDITION END if(type == "watchlist entry") output += "[t_key] | " output += "[timestamp] | [server] | Round [round_id] | [admin_key]" @@ -482,6 +487,10 @@ var/list/messagedata = list() var/list/watchdata = list() var/list/notedata = list() + // TFF ADDITION START - Eventmaker + var/list/rating = 5 // Изначальный рейтинг пользователя, далее его.. понижают нотесы с тяжестью. + var/list/eventnotedata = list() // Храним в себе нотесы ивентеров + // TFF ADDITION END var/skipped = 0 while(query_get_messages.NextRow()) if(QDELETED(usr)) @@ -519,6 +528,15 @@ alphatext = "filter: alpha(opacity=[alpha]); opacity: [alpha/100];" var/list/data = list("

") if(severity) + // TFF ADDITION START - Eventmaker + switch(severity) + if("high") + rating -= 0.4 + if("medium") + rating -= 0.2 + if("minor") + rating -= 0.1 + // TFF ADDITION END data += " " data += "[timestamp] | [server] | Round [round_id] | [admin_key][secret ? " | - Secret" : ""] | [get_exp_format(text2num(playtime))] Living Playtime" if(expire_timestamp) @@ -553,6 +571,10 @@ watchdata += data if("note") notedata += data + // TFF ADDITION START - Eventmaker + if("eventmaker note") + eventnotedata += data + // TFF ADDITION END qdel(query_get_messages) if(!target_key) var/datum/db_query/query_get_message_key = SSdbcore.NewQuery({" @@ -565,21 +587,24 @@ target_key = query_get_message_key.item[1] qdel(query_get_message_key) output += "

[target_key]

" + output += "

Player Rating: [rating > -1 ? rating : 0]

" // TFF ADDITION - Eventmaker if(!linkless) - output += "Add note" - output += " Add message" - output += " Add to watchlist" + if(!usr?.client.is_eventmaker()) // TFF ADDITION - Eventmaker + output += "Add note" + output += " Add message" + output += " Add to watchlist" + output += " Add event note" // TFF ADDITION - Eventmaker output += " Refresh page
" else output += " Refresh page" output += ruler - if(messagedata) + if(messagedata && !usr?.client.is_eventmaker())// TFF ADDITION - Eventmaker output += "

Messages

" output += messagedata - if(watchdata) + if(watchdata && !usr?.client.is_eventmaker())// TFF ADDITION - Eventmaker output += "

Watchlist

" output += watchdata - if(notedata) + if(notedata && !usr?.client.is_eventmaker())// TFF ADDITION - Eventmaker output += "

Notes

" output += notedata if(!linkless) @@ -590,9 +615,15 @@ output += "
Show All
" else output += "
Hide Old
" + // TFF ADDITION START - Eventmaker + if(eventnotedata) + output += "

Event Notes

" + output += eventnotedata + // TFF ADDITION END if(index) var/search - output += "
Add messageAdd watchlist entryAdd note
" + if(!usr?.client.is_eventmaker()) // TFF ADDITION - Eventmaker + output += "
Add messageAdd watchlist entryAdd note
" output += ruler switch(index) if(1) @@ -624,7 +655,7 @@ index_key = index_ckey output += "[index_key]
" qdel(query_list_messages) - else if(!type && !target_ckey && !index) + else if(!type && !target_ckey && !index && !usr?.client.is_eventmaker()) // TFF EDIT - Eventmaker output += "
Add messageAdd watchlist entryAdd note
" output += ruler var/datum/browser/browser = new(usr, "Note panel", "Manage player notes", 1000, 500) @@ -717,7 +748,7 @@ /proc/scream_about_watchlists(client/read_from) for(var/datum/admin_message/message in get_message_output("watchlist entry", read_from.ckey)) - message_admins("Notice: [key_name_admin(read_from.ckey)] has been on the watchlist since [message.timestamp] and has just connected - Reason: [message.text]") + message_admins("Notice: [key_name_admin(read_from.ckey)] has been on the watchlist since [message.timestamp] and has just connected - Reason: [message.text]", TRUE) send2tgs_adminless_only("Watchlist", "[key_name(read_from.ckey)] is on the watchlist and has just connected - Reason: [message.text]") #define NOTESFILE "data/player_notes.sav" diff --git a/code/modules/admin/stickyban.dm b/code/modules/admin/stickyban.dm index fede9724ab1..af6a477e2af 100644 --- a/code/modules/admin/stickyban.dm +++ b/code/modules/admin/stickyban.dm @@ -50,7 +50,7 @@ SSstickyban.cache[ckey] = ban log_admin_private("[key_name(usr)] has stickybanned [ckey].\nReason: [ban["message"]]") - message_admins(span_adminnotice("[key_name_admin(usr)] has stickybanned [ckey].\nReason: [ban["message"]]")) + message_admins(span_adminnotice("[key_name_admin(usr)] has stickybanned [ckey].\nReason: [ban["message"]]"), TRUE) if ("remove") if (!data["ckey"]) @@ -79,7 +79,7 @@ log_admin_private("[key_name(usr)] removed [ckey]'s stickyban") - message_admins(span_adminnotice("[key_name_admin(usr)] removed [ckey]'s stickyban")) + message_admins(span_adminnotice("[key_name_admin(usr)] removed [ckey]'s stickyban"), TRUE) if ("remove_alt") if (!data["ckey"]) @@ -127,7 +127,7 @@ qdel(query_remove_stickyban_alt) log_admin_private("[key_name(usr)] has disassociated [alt] from [ckey]'s sticky ban") - message_admins(span_adminnotice("[key_name_admin(usr)] has disassociated [alt] from [ckey]'s sticky ban")) + message_admins(span_adminnotice("[key_name_admin(usr)] has disassociated [alt] from [ckey]'s sticky ban"), TRUE) if ("edit") if (!data["ckey"]) @@ -161,7 +161,7 @@ qdel(query_edit_stickyban) log_admin_private("[key_name(usr)] has edited [ckey]'s sticky ban reason from [oldreason] to [reason]") - message_admins(span_adminnotice("[key_name_admin(usr)] has edited [ckey]'s sticky ban reason from [oldreason] to [reason]")) + message_admins(span_adminnotice("[key_name_admin(usr)] has edited [ckey]'s sticky ban reason from [oldreason] to [reason]"), TRUE) if ("exempt") if (!data["ckey"]) @@ -211,7 +211,7 @@ qdel(query_exempt_stickyban_alt) log_admin_private("[key_name(usr)] has exempted [alt] from [ckey]'s sticky ban") - message_admins(span_adminnotice("[key_name_admin(usr)] has exempted [alt] from [ckey]'s sticky ban")) + message_admins(span_adminnotice("[key_name_admin(usr)] has exempted [alt] from [ckey]'s sticky ban"), TRUE) if ("unexempt") if (!data["ckey"]) @@ -261,7 +261,7 @@ qdel(query_unexempt_stickyban_alt) log_admin_private("[key_name(usr)] has unexempted [alt] from [ckey]'s sticky ban") - message_admins(span_adminnotice("[key_name_admin(usr)] has unexempted [alt] from [ckey]'s sticky ban")) + message_admins(span_adminnotice("[key_name_admin(usr)] has unexempted [alt] from [ckey]'s sticky ban"), TRUE) if ("timeout") if (!data["ckey"]) @@ -288,7 +288,7 @@ cachedban["timeout"] = TRUE log_admin_private("[key_name(usr)] has put [ckey]'s sticky ban on timeout.") - message_admins(span_adminnotice("[key_name_admin(usr)] has put [ckey]'s sticky ban on timeout.")) + message_admins(span_adminnotice("[key_name_admin(usr)] has put [ckey]'s sticky ban on timeout."), TRUE) if ("untimeout") if (!data["ckey"]) @@ -316,7 +316,7 @@ world.SetConfig("ban",ckey,list2stickyban(ban)) log_admin_private("[key_name(usr)] has taken [ckey]'s sticky ban off of timeout.") - message_admins(span_adminnotice("[key_name_admin(usr)] has taken [ckey]'s sticky ban off of timeout.")) + message_admins(span_adminnotice("[key_name_admin(usr)] has taken [ckey]'s sticky ban off of timeout."), TRUE) if ("revert") @@ -335,7 +335,7 @@ world.SetConfig("ban",ckey,null) log_admin_private("[key_name(usr)] has reverted [ckey]'s sticky ban to its state at round start.") - message_admins(span_adminnotice("[key_name_admin(usr)] has reverted [ckey]'s sticky ban to its state at round start.")) + message_admins(span_adminnotice("[key_name_admin(usr)] has reverted [ckey]'s sticky ban to its state at round start."), TRUE) //revert is mostly used when shit goes rouge, so we have to set it to null // and wait a byond tick before assigning it to ensure byond clears its shit. sleep(world.tick_lag) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 4cca6441d9c..fa8e9fead62 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -282,6 +282,13 @@ return var/target_key = href_list["addwatch"] create_message("watchlist entry", target_key, secret = 1) + // TFF ADDITION START - Eventmaker + else if(href_list["addeventnote"]) + if(!check_rights(R_ADMIN)) + return + var/target_key = href_list["addeventnote"] + create_message("eventmaker note", target_key, secret = 1) + // TFF ADDITION END else if(href_list["addmemo"]) if(!check_rights(R_ADMIN)) diff --git a/code/modules/admin/verbs/admingame.dm b/code/modules/admin/verbs/admingame.dm index 76d814e8ee0..97957ec1adc 100644 --- a/code/modules/admin/verbs/admingame.dm +++ b/code/modules/admin/verbs/admingame.dm @@ -24,7 +24,7 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_ADMIN, "Show Player Panel", mo if(player.ckey) body += "
\[Find Updated Panel\]" - if(player.client) + if(player.client && !user.is_eventmaker()) // TFF EDIT - Eventmaker body += "
\[First Seen: [player.client.player_join_date]\]\[Byond account registered on: [player.client.account_join_date]\]" // NOVA EDIT ADDITION START - Player Ranks var/list/player_ranks = list() @@ -84,30 +84,31 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_ADMIN, "Show Player Panel", mo else body += "None?!" body += "

" - - body += "Kick | " - if(player.client) - body += "Ban | " - else - body += "Ban | " + if(!user.is_eventmaker()) // TFF ADDITION - Eventmaker + body += "Kick | " + if(player.client) + body += "Ban | " + else + body += "Ban | " body += "Notes | Messages | Watchlist | " if(player.client) body += "| Prison | " body += "\ Send back to Lobby | " var/muted = player.client.prefs.muted - body += "
Mute: " - body += "\[IC | " - body += "OOC | " - body += "PRAY | " - body += "ADMINHELP | " - //Nova Edit Addition Begin - LOOC muting again. - body += "DEADCHAT | " - body += "LOOC\]" - //Nova Edit Addition End - LOOC muting again. - body += "WEBREQ | " - body += "DEADCHAT\]" - body += "(toggle all)" + if(!user.is_eventmaker()) // TFF ADDITION - Eventmaker + body += "
Mute: " + body += "\[IC | " + body += "OOC | " + body += "PRAY | " + body += "ADMINHELP | " + //Nova Edit Addition Begin - LOOC muting again. + body += "DEADCHAT | " + body += "LOOC\]" + //Nova Edit Addition End - LOOC muting again. + body += "WEBREQ | " + body += "DEADCHAT\]" + body += "(toggle all)" body += "

" body += "Jump to | " diff --git a/code/modules/admin/verbs/adminsay.dm b/code/modules/admin/verbs/adminsay.dm index b988104dd23..60a6fd0f6bc 100644 --- a/code/modules/admin/verbs/adminsay.dm +++ b/code/modules/admin/verbs/adminsay.dm @@ -1,6 +1,6 @@ ADMIN_VERB(cmd_admin_say, R_NONE, "ASay", "Send a message to other admins", ADMIN_CATEGORY_MAIN, message as text) message = emoji_parse(copytext_char(sanitize(message), 1, MAX_MESSAGE_LEN)) - if(!message) + if(!message || user.is_eventmaker()) // TFF EDIT - Eventmaker return if(findtext(message, "@") || findtext(message, "#")) @@ -22,7 +22,12 @@ ADMIN_VERB(cmd_admin_say, R_NONE, "ASay", "Send a message to other admins", ADMI var/asay_color = user.prefs.read_preference(/datum/preference/color/asay_color) var/custom_asay_color = (CONFIG_GET(flag/allow_admin_asaycolor) && asay_color) ? "" : "" message = "[span_adminsay("[span_prefix("ADMIN:")] [key_name_admin(user)] [ADMIN_FLW(user.mob)]: [custom_asay_color][message]")][custom_asay_color ? "":null]" - to_chat(GLOB.admins, + var/addressee = GLOB.admins.Copy() + for(var/client/admin in addressee) + if(admin.is_eventmaker()) + addressee -= admin + + to_chat(addressee, type = MESSAGE_TYPE_ADMINCHAT, html = message, confidential = TRUE) diff --git a/code/modules/admin/verbs/maprotation.dm b/code/modules/admin/verbs/maprotation.dm index 38d7535758f..e251c034176 100644 --- a/code/modules/admin/verbs/maprotation.dm +++ b/code/modules/admin/verbs/maprotation.dm @@ -1,4 +1,4 @@ -ADMIN_VERB(admin_change_map, R_SERVER, "Change Map", "Set the next map.", ADMIN_CATEGORY_SERVER) +ADMIN_VERB(admin_change_map, R_DEBUG, "Change Map", "Set the next map.", ADMIN_CATEGORY_SERVER) // TFF EDIT. ORIGINAL - ADMIN_VERB(admin_change_map, R_SERVER, "Change Map", "Set the next map.", ADMIN_CATEGORY_SERVER) var/list/maprotatechoices = list() for (var/map in config.maplist) var/datum/map_config/virtual_map = config.maplist[map] diff --git a/code/modules/admin/verbs/secrets.dm b/code/modules/admin/verbs/secrets.dm index 368f6f4d6f4..c9779652fd1 100644 --- a/code/modules/admin/verbs/secrets.dm +++ b/code/modules/admin/verbs/secrets.dm @@ -9,6 +9,7 @@ ADMIN_VERB(secrets, R_NONE, "Secrets", "Abuse harder than you ever have before w var/client/holder //client of whoever is using this datum var/is_debugger = FALSE var/is_funmin = FALSE + var/is_eventmaker_admin = FALSE // TFF EDIT - Eventmaker /datum/secrets_menu/New(user)//user can either be a client or a mob due to byondcode(tm) if (istype(user, /client)) @@ -20,6 +21,8 @@ ADMIN_VERB(secrets, R_NONE, "Secrets", "Abuse harder than you ever have before w is_debugger = check_rights(R_DEBUG) is_funmin = check_rights(R_FUN) + is_eventmaker_admin = holder.is_eventmaker() // TFF EDIT - Eventmaker + world.log << is_eventmaker_admin // TFF EDIT - Eventmaker /datum/secrets_menu/ui_state(mob/user) return GLOB.admin_state @@ -37,6 +40,7 @@ ADMIN_VERB(secrets, R_NONE, "Secrets", "Abuse harder than you ever have before w var/list/data = list() data["is_debugger"] = is_debugger data["is_funmin"] = is_funmin + data["is_eventmaker"] = is_eventmaker_admin // TFF EDIT - Eventmaker return data #define THUNDERDOME_TEMPLATE_FILE "admin_thunderdome.dmm" diff --git a/code/modules/admin/verbs/server.dm b/code/modules/admin/verbs/server.dm index b5891686119..04cdffd5dea 100644 --- a/code/modules/admin/verbs/server.dm +++ b/code/modules/admin/verbs/server.dm @@ -66,7 +66,7 @@ ADMIN_VERB(restart, R_SERVER, "Reboot World", "Restarts the world immediately.", #undef HARDEST_RESTART #undef TGS_RESTART -ADMIN_VERB(end_round, R_SERVER, "End Round", "Forcibly ends the round and allows the server to restart normally.", ADMIN_CATEGORY_SERVER) +ADMIN_VERB(end_round, R_DEBUG, "End Round", "Forcibly ends the round and allows the server to restart normally.", ADMIN_CATEGORY_SERVER) // TFF CHANGE. OROGINAL - ADMIN_VERB(end_round, R_DEBUG, "End Round", "Forcibly ends the round and allows the server to restart normally.", ADMIN_CATEGORY_SERVER) var/confirm = tgui_alert(user, "End the round and restart the game world?", "End Round", list("Yes", "Cancel")) if(confirm != "Yes") return @@ -88,7 +88,7 @@ ADMIN_VERB(toggle_ooc_dead, R_ADMIN, "Toggle Dead OOC", "Toggle the OOC channel ADMIN_VERB(toggle_vote_dead, R_ADMIN, "Toggle Dead Vote", "Toggle the vote for dead players on or off.", ADMIN_CATEGORY_SERVER) SSvote.toggle_dead_voting(user) -ADMIN_VERB(start_now, R_SERVER, "Start Now", "Start the round RIGHT NOW.", ADMIN_CATEGORY_SERVER) +ADMIN_VERB(start_now, R_DEBUG, "Start Now", "Start the round RIGHT NOW.", ADMIN_CATEGORY_SERVER) // TFF CHANGE. ORGINAL - ADMIN_VERB(start_now, R_SERVER, "Start Now", "Start the round RIGHT NOW.", ADMIN_CATEGORY_SERVER) var/static/list/waiting_states = list(GAME_STATE_PREGAME, GAME_STATE_STARTUP) if(!(SSticker.current_state in waiting_states)) to_chat(user, span_warning(span_red("The game has already started!"))) @@ -192,7 +192,7 @@ ADMIN_VERB(toggle_respawn, R_SERVER, "Toggle Respawn", "Toggle the ability to re world.update_status() SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Respawn", "[new_state_text]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc! -ADMIN_VERB(delay, R_SERVER, "Delay Pre-Game", "Delay the game start.", ADMIN_CATEGORY_SERVER) +ADMIN_VERB(delay, R_DEBUG, "Delay Pre-Game", "Delay the game start.", ADMIN_CATEGORY_SERVER) // TFF CHANGE. ORIGINAL - ADMIN_VERB(delay, R_SERVER, "Delay Pre-Game", "Delay the game start.", ADMIN_CATEGORY_SERVER) var/newtime = input(user, "Set a new time in seconds. Set -1 for indefinite delay.", "Set Delay", round(SSticker.GetTimeLeft()/10)) as num|null if(!newtime) return diff --git a/code/modules/admin/view_variables/topic.dm b/code/modules/admin/view_variables/topic.dm index 4fde1e30d1a..443e08d05d8 100644 --- a/code/modules/admin/view_variables/topic.dm +++ b/code/modules/admin/view_variables/topic.dm @@ -1,7 +1,7 @@ //DO NOT ADD MORE TO THIS FILE. //Use vv_do_topic() for datums! /client/proc/view_var_Topic(href, href_list, hsrc) - if( (usr.client != src) || !src.holder || !holder.CheckAdminHref(href, href_list)) + if( (usr.client != src) || !src.holder || (!holder.CheckAdminHref(href, href_list) && !is_eventmaker())) // TFF EDIT - Eventmaker return var/target = GET_VV_TARGET vv_do_basic(target, href_list, href) diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 08e98bb2af3..af30bbd2771 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -65,7 +65,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( topiclimiter[ADMINSWARNED_AT] = minute msg += " Administrators have been informed." log_game("[key_name(src)] Has hit the per-minute topic limit of [mtl] topic calls in a given game minute") - message_admins("[ADMIN_LOOKUPFLW(usr)] [ADMIN_KICK(usr)] Has hit the per-minute topic limit of [mtl] topic calls in a given game minute") + message_admins("[ADMIN_LOOKUPFLW(usr)] [ADMIN_KICK(usr)] Has hit the per-minute topic limit of [mtl] topic calls in a given game minute", TRUE) to_chat(src, span_danger("[msg]")) return @@ -324,10 +324,10 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( if(matches) if(C) - message_admins(span_danger("[message_type]: Connecting player [key_name_admin(src)] has the same [matches] as [key_name_admin(C)][in_round].")) + message_admins(span_danger("[message_type]: Connecting player [key_name_admin(src)] has the same [matches] as [key_name_admin(C)][in_round]."), TRUE) log_admin_private("[message_type]: Connecting player [key_name(src)] has the same [matches] as [key_name(C)][in_round].") else - message_admins(span_danger("[message_type]: Connecting player [key_name_admin(src)] has the same [matches] as [joined_player_ckey](no longer logged in)[in_round]. ")) + message_admins(span_danger("[message_type]: Connecting player [key_name_admin(src)] has the same [matches] as [joined_player_ckey](no longer logged in)[in_round]. "), TRUE) log_admin_private("[message_type]: Connecting player [key_name(src)] has the same [matches] as [joined_player_ckey](no longer logged in)[in_round].") var/reconnecting = FALSE if(GLOB.player_details[ckey]) @@ -422,7 +422,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( var/dupe_login_message = "Your ComputerID has already logged in with another key this round, please log out of this one NOW or risk being banned!" if (alert_admin_multikey) dupe_login_message += "\nAdmins have been informed." - message_admins(span_danger("MULTIKEYING: [key_name_admin(src)] has a matching CID+IP with another player and is clearly multikeying. They have been warned to leave the server or risk getting banned.")) + message_admins(span_danger("MULTIKEYING: [key_name_admin(src)] has a matching CID+IP with another player and is clearly multikeying. They have been warned to leave the server or risk getting banned."), TRUE) log_admin_private("MULTIKEYING: [key_name(src)] has a matching CID+IP with another player and is clearly multikeying. They have been warned to leave the server or risk getting banned.") spawn(0.5 SECONDS) //needs to run during world init, do not convert to add timer alert(mob, dupe_login_message) //players get banned if they don't see this message, do not convert to tgui_alert (or even tg_alert) please. @@ -507,7 +507,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( if (isnum(cached_player_age) && cached_player_age == -1) //first connection if (nnpa >= 0) log_admin_private("New login: [key_name(key, FALSE, TRUE)] (IP: [address], ID: [computer_id]) logged onto the servers for the first time.") - message_admins("New user: [key_name_admin(src)] is connecting here for the first time.") + message_admins("New user: [key_name_admin(src)] is connecting here for the first time.", TRUE) if (CONFIG_GET(flag/irc_first_connection_alert)) var/new_player_alert_role = CONFIG_GET(string/new_player_alert_role_id) send2tgs_adminless_only( @@ -515,11 +515,11 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( "[key_name(src)] is connecting for the first time![new_player_alert_role ? " <@&[new_player_alert_role]>" : ""]" ) else if (isnum(cached_player_age) && cached_player_age < nnpa) - message_admins("New user: [key_name_admin(src)] just connected with an age of [cached_player_age] day[(player_age == 1?"":"s")]") + message_admins("New user: [key_name_admin(src)] just connected with an age of [cached_player_age] day[(player_age == 1?"":"s")]", TRUE) if(CONFIG_GET(flag/use_account_age_for_jobs) && account_age >= 0) player_age = account_age if(account_age >= 0 && account_age < nnpa) - message_admins("[key_name_admin(src)] (IP: [address], ID: [computer_id]) is a new BYOND account [account_age] day[(account_age == 1?"":"s")] old, created on [account_join_date].") + message_admins("[key_name_admin(src)] (IP: [address], ID: [computer_id]) is a new BYOND account [account_age] day[(account_age == 1?"":"s")] old, created on [account_join_date].", TRUE) if (CONFIG_GET(flag/irc_first_connection_alert)) var/new_player_alert_role = CONFIG_GET(string/new_player_alert_role_id) send2tgs_adminless_only( @@ -703,7 +703,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( //NOVA EDIT ADDITION BEGIN - PANICBUNKER if (CONFIG_GET(flag/panic_bunker) && !holder && !GLOB.deadmins[ckey] && !(ckey in GLOB.bunker_passthrough)) log_access("Failed Login: [key] - [address] - New account attempting to connect during panic bunker") - message_admins(span_adminnotice("Failed Login: [key] - [address] - New account attempting to connect during panic bunker")) + message_admins(span_adminnotice("Failed Login: [key] - [address] - New account attempting to connect during panic bunker"), TRUE) to_chat_immediate(src, span_notice("Hi! We have temporarily enabled safety measures that prevents new players from joining currently.
Please try again later, or contact a staff on Discord if you have any questions.

To join our community, check out our Discord! To gain full access to our Discord, read the rules and post a request in the #access-requests channel under the \"Landing Zone\" category in the Discord server linked here: https://discord.gg/novasector")) var/list/connectiontopic_a = params2list(connectiontopic) var/list/panic_addr = CONFIG_GET(string/panic_server_address) @@ -901,10 +901,10 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( msg += " Administrators have been informed." if (ab) log_game("[key_name(src)] is using the middle click aimbot exploit") - message_admins("[ADMIN_LOOKUPFLW(usr)] [ADMIN_KICK(usr)] is using the middle click aimbot exploit
") + message_admins("[ADMIN_LOOKUPFLW(usr)] [ADMIN_KICK(usr)] is using the middle click aimbot exploit", TRUE) add_system_note("aimbot", "Is using the middle click aimbot exploit") log_game("[key_name(src)] Has hit the per-minute click limit of [mcl] clicks in a given game minute") - message_admins("[ADMIN_LOOKUPFLW(usr)] [ADMIN_KICK(usr)] Has hit the per-minute click limit of [mcl] clicks in a given game minute") + message_admins("[ADMIN_LOOKUPFLW(usr)] [ADMIN_KICK(usr)] Has hit the per-minute click limit of [mcl] clicks in a given game minute", TRUE) to_chat(src, span_danger("[msg]")) return @@ -1044,7 +1044,13 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( movement_keys[key] = SOUTH if(ADMIN_CHANNEL) if(holder) - var/asay = tgui_say_create_open_command(ADMIN_CHANNEL) + // TFF EDIT START - Eventmaker + var/asay + if(is_eventmaker()) + asay = tgui_say_create_open_command(EVENT_CHANNEL) + else + asay = tgui_say_create_open_command(ADMIN_CHANNEL) + // TFF EDIT END winset(src, "default-[REF(key)]", "parent=default;name=[key];command=[asay]") else winset(src, "default-[REF(key)]", "parent=default;name=[key];command=") diff --git a/code/modules/mob/dead/observer/observer_say.dm b/code/modules/mob/dead/observer/observer_say.dm index a8fd0094934..fcf288ec783 100644 --- a/code/modules/mob/dead/observer/observer_say.dm +++ b/code/modules/mob/dead/observer/observer_say.dm @@ -44,7 +44,12 @@ message = trim_left(copytext_char(message, length(message_mods[RADIO_KEY]) + 2)) switch(message_mods[RADIO_EXTENSION]) if(MODE_ADMIN) - SSadmin_verbs.dynamic_invoke_verb(client, /datum/admin_verb/cmd_admin_say, message) + // TFF ADDITION START - Eventmaker + if(client.is_eventmaker()) + SSadmin_verbs.dynamic_invoke_verb(client, /datum/admin_verb/cmd_eventmaker_say, message) + else + // TFF ADDITION END + SSadmin_verbs.dynamic_invoke_verb(client, /datum/admin_verb/cmd_admin_say, message) if(MODE_DEADMIN) SSadmin_verbs.dynamic_invoke_verb(client, /datum/admin_verb/dsay, message) if(MODE_PUPPET) diff --git a/code/modules/mob/living/living_say.dm b/code/modules/mob/living/living_say.dm index e72899d482d..290b4cd807b 100644 --- a/code/modules/mob/living/living_say.dm +++ b/code/modules/mob/living/living_say.dm @@ -130,7 +130,12 @@ GLOBAL_LIST_INIT(message_modes_stat_limits, list( return if(message_mods[RADIO_EXTENSION] == MODE_ADMIN) - SSadmin_verbs.dynamic_invoke_verb(client, /datum/admin_verb/cmd_admin_say, message) + // TFF ADDITION START - Eventmaker + if(client.is_eventmaker()) + SSadmin_verbs.dynamic_invoke_verb(client, /datum/admin_verb/cmd_eventmaker_say, message) + else + // TFF ADDITION END + SSadmin_verbs.dynamic_invoke_verb(client, /datum/admin_verb/cmd_admin_say, message) return if(message_mods[RADIO_EXTENSION] == MODE_DEADMIN) diff --git a/code/modules/tgui_input/say_modal/modal.dm b/code/modules/tgui_input/say_modal/modal.dm index f700a6cdbea..4401df88f77 100644 --- a/code/modules/tgui_input/say_modal/modal.dm +++ b/code/modules/tgui_input/say_modal/modal.dm @@ -86,7 +86,7 @@ if(!payload?["channel"]) CRASH("No channel provided to an open TGUI-Say") window_open = TRUE - if(payload["channel"] != OOC_CHANNEL && payload["channel"] != ADMIN_CHANNEL && payload["channel"] != LOOC_CHANNEL) // NOVA EDIT CHANGE (Add LOOC_CHANNEL) + if(payload["channel"] != OOC_CHANNEL && payload["channel"] != ADMIN_CHANNEL && payload["channel"] != LOOC_CHANNEL && payload["channel"] != EVENT_CHANNEL) // NOVA EDIT CHANGE (Add LOOC_CHANNEL) // TFF EDIT - Eventmaker start_thinking() if(!client.typing_indicators) log_speech_indicators("[key_name(client)] started typing at [loc_name(client.mob)], indicators DISABLED.") diff --git a/code/modules/tgui_input/say_modal/speech.dm b/code/modules/tgui_input/say_modal/speech.dm index 9ed87be111a..ac1169e84ec 100644 --- a/code/modules/tgui_input/say_modal/speech.dm +++ b/code/modules/tgui_input/say_modal/speech.dm @@ -57,6 +57,11 @@ if(DO_CHANNEL) client.mob.do_verb(entry) // NOVA EDIT ADDITION END + // TFF ADDITION START - Eventmaker + if(EVENT_CHANNEL) + SSadmin_verbs.dynamic_invoke_verb(client, /datum/admin_verb/cmd_eventmaker_say, entry) + return TRUE + // TFF ADDITION END return FALSE /** diff --git a/config/nova/config_nova.txt b/config/nova/config_nova.txt index af44fea6ed8..f5522769253 100644 --- a/config/nova/config_nova.txt +++ b/config/nova/config_nova.txt @@ -152,6 +152,7 @@ SIZE_COLLAR_MINIMUM 15 DONATOR_LEGACY_SYSTEM MENTOR_LEGACY_SYSTEM VETERAN_LEGACY_SYSTEM +EVENTMAKER_LEGACY_SYSTEM ## How much time arrivals shuttle should stay at station after its engines recharged before returning to interlink. In deciseconds. 150 - 15 seconds. 0 - disables autoreturn. ARRIVALS_WAIT 150 diff --git a/config/nova/eventmakers.txt b/config/nova/eventmakers.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/modular_nova/master_files/code/modules/logging/categories/log_category_game.dm b/modular_nova/master_files/code/modules/logging/categories/log_category_game.dm index f665a603a10..f373634061f 100644 --- a/modular_nova/master_files/code/modules/logging/categories/log_category_game.dm +++ b/modular_nova/master_files/code/modules/logging/categories/log_category_game.dm @@ -2,6 +2,11 @@ category = LOG_CATEGORY_GAME_MENTOR master_category = /datum/log_category/game +//TODO: ПЕРЕНЕСТИ ОТСЮДАВОЙ +/datum/log_category/game_eventmaker + category = LOG_CATEGORY_GAME_EVENTMAKER + master_category = /datum/log_category/game + /datum/log_category/game_subtle category = LOG_CATEGORY_GAME_SUBTLE master_category = /datum/log_category/game diff --git a/modular_nova/modules/player_ranks/code/subsystem/player_ranks.dm b/modular_nova/modules/player_ranks/code/subsystem/player_ranks.dm index 6dd15874973..041e5bc0429 100644 --- a/modular_nova/modules/player_ranks/code/subsystem/player_ranks.dm +++ b/modular_nova/modules/player_ranks/code/subsystem/player_ranks.dm @@ -203,7 +203,6 @@ SUBSYSTEM_DEF(player_ranks) load_player_rank_sql(veteran_controller) - /** * Handles populating the player rank from the database. * diff --git a/tff_modular/modules/eventers/eventmaker.dm b/tff_modular/modules/eventers/eventmaker.dm new file mode 100644 index 00000000000..a985a3126f9 --- /dev/null +++ b/tff_modular/modules/eventers/eventmaker.dm @@ -0,0 +1,34 @@ +/** + * Returns whether or not the user is qualified as a eventmaker. + */ +/client/proc/is_eventmaker() + return holder?.ranks && holder.ranks[1].name == "Eventmaker" + + +/datum/controller/subsystem/admin_verbs/get_valid_verbs_for_admin(client/admin) + if(isnull(admin.holder)) + CRASH("Why are we checking a non-admin for their valid... ahem... admin verbs?") + + var/list/has_permission = list() + for(var/permission_flag in GLOB.bitflags) + if(admin.holder.check_for_rights(permission_flag)) + has_permission["[permission_flag]"] = TRUE + + var/list/valid_verbs = list() + for(var/datum/admin_verb/verb_type as anything in admin_verbs_by_type) + var/datum/admin_verb/verb_singleton = admin_verbs_by_type[verb_type] + if(!verify_visibility(admin, verb_singleton)) + continue + + if(admin.is_eventmaker() && GLOB.eventmakers_blacklist_verbs["[verb_singleton.name]"]) + continue + + var/verb_permissions = verb_singleton.permissions + if(verb_permissions == R_NONE) + valid_verbs |= list(verb_singleton) + else for(var/permission_flag in bitfield_to_list(verb_permissions)) + if(!has_permission["[permission_flag]"]) + continue + valid_verbs |= list(verb_singleton) + + return valid_verbs diff --git a/tff_modular/modules/eventers/eventmaker_verbs.dm b/tff_modular/modules/eventers/eventmaker_verbs.dm new file mode 100644 index 00000000000..ae4aaae36bc --- /dev/null +++ b/tff_modular/modules/eventers/eventmaker_verbs.dm @@ -0,0 +1,13 @@ +ADMIN_VERB(cmd_eventmaker_say, R_NONE, "ESay", "Send a message to eventmakes", ADMIN_CATEGORY_MAIN, message as text) + message = emoji_parse(copytext_char(sanitize(message), 1, MAX_MESSAGE_LEN)) + if(!message) + return + + user.mob.log_talk(message, LOG_ASAY) + message = keywords_lookup(message) + message = "[span_eventmaker("[span_prefix("EVENTCHAT:")] [key_name_admin(user)] [ADMIN_FLW(user.mob)]: [message]")]
" + to_chat(GLOB.admins, + type = MESSAGE_TYPE_ADMINCHAT, + html = message, + confidential = TRUE) + BLACKBOX_LOG_ADMIN_VERB("Esay") diff --git a/tff_modular/modules/eventers/random_stuff_ban.dm b/tff_modular/modules/eventers/random_stuff_ban.dm new file mode 100644 index 00000000000..10e61655ee6 --- /dev/null +++ b/tff_modular/modules/eventers/random_stuff_ban.dm @@ -0,0 +1,14 @@ +/client/CanProcCall(procname) + if(usr.client.is_eventmaker()) + return FALSE + . = ..() + +/client/can_vv_get(var_name) + if(usr?.client.is_eventmaker()) + return FALSE + . = ..() + +/datum/admins/can_vv_get(var_name) + if(usr?.client.is_eventmaker()) + return FALSE + . = ..() diff --git a/tgstation.dme b/tgstation.dme index 8841314acef..def8c55eca7 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -400,11 +400,14 @@ #include "code\__DEFINES\~ff_defines\flavor_misc.dm" #include "code\__DEFINES\~ff_defines\nabber_clothes_pathes.dm" #include "code\__DEFINES\~ff_defines\say.dm" +#include "code\__DEFINES\~ff_defines\span.dm" #include "code\__DEFINES\~ff_defines\text.dm" #include "code\__DEFINES\~ff_defines\vv.dm" #include "code\__DEFINES\~ff_defines\__HELPERS\global_lists.dm" #include "code\__DEFINES\~ff_defines\__HELPERS\ishelpers.dm" #include "code\__DEFINES\~ff_defines\__HELPERS\names.dm" +#include "code\__DEFINES\~ff_defines\_globalvars\logging.dm" +#include "code\__DEFINES\~ff_defines\_globalvars\lists\hidden_verbs.dm" #include "code\__DEFINES\~nova_defines\_organ_defines.dm" #include "code\__DEFINES\~nova_defines\access.dm" #include "code\__DEFINES\~nova_defines\actionspeed_modification.dm" @@ -8858,6 +8861,9 @@ #include "tff_modular\modules\drinks\skrelluq\reaction.dm" #include "tff_modular\modules\drinks\skrelluq\reagent.dm" #include "tff_modular\modules\drone\code\droneDispenser.dm" +#include "tff_modular\modules\eventers\eventmaker.dm" +#include "tff_modular\modules\eventers\eventmaker_verbs.dm" +#include "tff_modular\modules\eventers\random_stuff_ban.dm" #include "tff_modular\modules\extra_vv\extra_carbon_vv.dm" #include "tff_modular\modules\holidays_decor\halloween\halloween-craft.dm" #include "tff_modular\modules\holidays_decor\halloween\halloween-decor.dm" diff --git a/tgui/packages/tgui-panel/chat/constants.ts b/tgui/packages/tgui-panel/chat/constants.ts index 0e1a79bc1d6..46a3ab8ffda 100644 --- a/tgui/packages/tgui-panel/chat/constants.ts +++ b/tgui/packages/tgui-panel/chat/constants.ts @@ -38,6 +38,7 @@ export const MESSAGE_TYPE_ADMINLOG = 'adminlog'; export const MESSAGE_TYPE_ATTACKLOG = 'attacklog'; export const MESSAGE_TYPE_DEBUG = 'debug'; export const MESSAGE_TYPE_MENTOR = 'mentor'; // NOVA EDIT ADDITION +export const MESSAGE_TYPE_EVENTMAKER = 'eventmaker'; // TFF EDIT - Eventmaker // Metadata for each message type export const MESSAGE_TYPES = [ @@ -152,4 +153,12 @@ export const MESSAGE_TYPES = [ description: 'Mentor PMs and other mentor things.', selector: '.mentor, .mentornotice', }, + // TFF ADDITION START - Eventmaker + { + type: MESSAGE_TYPE_EVENTMAKER, + name: 'Eventmaker Log', + description: 'Eventmaker PMs and other eventmaker things.', + selector: '.eventmaker', + }, + // TFF ADDITION END ]; diff --git a/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss b/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss index 09cdd23495a..710f9ba1ae9 100644 --- a/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss +++ b/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss @@ -1438,3 +1438,11 @@ $border-width-px: $border-width * 1px; font-style: italic; } // NOVA EDIT ADDITION END + +/* TFF ADDITION START - Eventmaker */ + +.eventmaker { + color: #009c22; +} + +// TFF EDIT ADDITION END diff --git a/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss b/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss index 8f606cbdd6f..ec4d83762f8 100644 --- a/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss +++ b/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss @@ -1383,3 +1383,11 @@ $border-width-px: $border-width * 1px; } } // NOVA EDIT ADDITION END + +/* TFF ADDITION START - Eventmaker */ + +.eventmaker { + color: #006616; +} + +// TFF EDIT ADDITION END diff --git a/tgui/packages/tgui-say/ChannelIterator.ts b/tgui/packages/tgui-say/ChannelIterator.ts index 57866808609..cddac3571e1 100644 --- a/tgui/packages/tgui-say/ChannelIterator.ts +++ b/tgui/packages/tgui-say/ChannelIterator.ts @@ -8,7 +8,8 @@ export type Channel = | 'Do' // NOVA EDIT ADDITION END | 'OOC' - | 'Admin'; + | 'Admin' + | 'Event'; // TFF EDIT - Eventmaker /** * ### ChannelIterator @@ -29,9 +30,10 @@ export class ChannelIterator { // NOVA EDIT ADDITION 'OOC', 'Admin', + 'Event', // TFF EDIT - Eventmaker ]; - private readonly blacklist: Channel[] = ['Admin']; - private readonly quiet: Channel[] = ['OOC', 'LOOC', 'Admin']; // NOVA EDIT CHANGE (Add LOOC) + private readonly blacklist: Channel[] = ['Admin', 'Event']; // TFF EDIT - Eventmaker + private readonly quiet: Channel[] = ['OOC', 'LOOC', 'Admin', 'Event']; // NOVA EDIT CHANGE (Add LOOC) // TFF EDIT - Eventmaker public next(): Channel { if (this.blacklist.includes(this.channels[this.index])) { diff --git a/tgui/packages/tgui-say/constants/index.tsx b/tgui/packages/tgui-say/constants/index.tsx index 8095aa98583..c9a11592d90 100644 --- a/tgui/packages/tgui-say/constants/index.tsx +++ b/tgui/packages/tgui-say/constants/index.tsx @@ -8,6 +8,7 @@ export const CHANNELS = [ 'Do', // NOVA EDIT ADDITION - Do roleplay addition 'OOC', 'Admin', + 'Event', // TFF EDIT - Eventmaker ] as const; /** Window sizes in pixels */ diff --git a/tgui/packages/tgui-say/styles/colors.scss b/tgui/packages/tgui-say/styles/colors.scss index 337887e358f..34cfec4e11b 100644 --- a/tgui/packages/tgui-say/styles/colors.scss +++ b/tgui/packages/tgui-say/styles/colors.scss @@ -36,6 +36,8 @@ $_channel_map: ( 'Whis': hsl(238, 55%, 67%), 'Do': hsl(137, 64%, 60%), // NOVA EDIT ADDITION END + // TFF EDIT - Eventmaker + 'Event': hsl(92, 80%, 37%), ); $channel_keys: map.keys($_channel_map) !default; diff --git a/tgui/packages/tgui/interfaces/Secrets.jsx b/tgui/packages/tgui/interfaces/Secrets.jsx index 3e3ccd70cc0..09d3d93e274 100644 --- a/tgui/packages/tgui/interfaces/Secrets.jsx +++ b/tgui/packages/tgui/interfaces/Secrets.jsx @@ -632,7 +632,7 @@ const FunForYouTab = (props) => { export const Secrets = (props) => { const { act, data } = useBackend(); - const { is_debugger, is_funmin } = data; + const { is_debugger, is_funmin, is_eventmaker } = data; const [tabIndex, setTabIndex] = useState(2); const TabComponent = TAB2NAME[tabIndex - 1].component(); @@ -644,20 +644,22 @@ export const Secrets = (props) => {
-