mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-06 23:51:43 +00:00
* SSinput Rewrite, Custom Keybindings
* hmm yes, safety
* azerty begone
* address AA and SteelSlayer
* Address the old man
* what
* CI dbconfig too
* Address TM issues
Unicode support
Better numpad support
Fix no perms message
Fix modifier screwing movement
* pre-TM tweak, nitfix
* pre TM change 2
* Display others
* MERGE ME
* unduplicates your rows
* reverts some changes, makes this work for now (not TM safe)
* fixes direction facing, removes hotkey help item
* weird keys
* TM commit revert later
* fixed asay/msay keybind
* adds ALL the emotes
* flip and spin
* makes old people happy
* and fixes admins not being able to msay
* lets borgs stow modules
* saves prefs when someone changes a keybind
* reverts skin changes and manually applies
HEAVEN HELP YOU IF YOU USE THE DM SKIN EDITOR IT BREAKS EVERYTHING
* tidies menu, unduplicates rest
* sql file pls come back
* Update SQL/updates/40-41.sql
* why did you not throw an error?!
* inits keybinds if your prefs somehow fail, i guess
* restores these spaces, i guess
* fixes local testing, i guess
* emote cooldown returns (oops)
* movement lock improvements
* Pageup does Swap Hands
* LOOC
* whisper for living mobs
* oops
* fix dsay
* fix IPC silicon emote hotkeys
* category name
* backspace only clears if input is focused
* Makes TAB and BACKSPACE rebindable
* charlie review
* define move
* yeet
* Lewcc review
* brings back legacy mode
* restores legacy mode
* tell legacy mode what is going on
* Update code/controllers/subsystem/input.dm
* Update code/controllers/subsystem/input.dm
Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
* safeties!
* legacy mode is a pref now
* undo TM changes
* null prefs safeties
* Revert "legacy mode is a pref now"
This reverts commit b45af65139.
* revert this too thanks
Co-authored-by: mochi <shenesis@gmail.com>
Co-authored-by: dearmochi <1496804+dearmochi@users.noreply.github.com>
Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
114 lines
4.0 KiB
Plaintext
114 lines
4.0 KiB
Plaintext
/client/proc/cmd_admin_say(msg as text)
|
|
set category = "Admin"
|
|
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 hidden = 1
|
|
if(!check_rights(R_ADMIN)) return
|
|
|
|
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
|
|
if(!msg) return
|
|
|
|
var/datum/asays/asay = new(usr.ckey, usr.client.holder.rank, msg, world.timeofday)
|
|
GLOB.asays += asay
|
|
log_adminsay(msg, src)
|
|
|
|
if(check_rights(R_ADMIN,0))
|
|
// Do this up here before it gets sent to everyone & emoji'd
|
|
if(SSredis.connected)
|
|
var/list/data = list()
|
|
data["author"] = usr.ckey
|
|
data["source"] = GLOB.configuration.system.instance_id
|
|
data["message"] = msg
|
|
SSredis.publish("byond.asay.out", json_encode(data))
|
|
|
|
for(var/client/C in GLOB.admins)
|
|
if(R_ADMIN & C.holder.rights)
|
|
// Lets see if this admin was pinged in the asay message
|
|
if(findtext(msg, "@[C.ckey]") || findtext(msg, "@[C.key]")) // Check ckey and key, so you can type @AffectedArc07 or @affectedarc07
|
|
SEND_SOUND(C, sound('sound/misc/ping.ogg'))
|
|
msg = replacetext(msg, "@[C.ckey]", "<font color='red'>@[C.ckey]</font>")
|
|
msg = replacetext(msg, "@[C.key]", "<font color='red'>@[C.key]</font>") // Same applies here. key and ckey.
|
|
|
|
msg = "<span class='emoji_enabled'>[msg]</span>"
|
|
to_chat(C, "<span class='admin_channel'>ADMIN: <span class='name'>[key_name(usr, 1)]</span> ([admin_jump_link(mob)]): <span class='message'>[msg]</span></span>")
|
|
|
|
SSblackbox.record_feedback("tally", "admin_verb", 1, "Asay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/get_admin_say()
|
|
if(check_rights(R_ADMIN, FALSE))
|
|
var/msg = input(src, null, "asay \"text\"") as text|null
|
|
cmd_admin_say(msg)
|
|
|
|
/client/proc/get_mentor_say()
|
|
if(check_rights(R_MENTOR | R_ADMIN | R_MOD))
|
|
var/msg = input(src, null, "msay \"text\"") as text|null
|
|
cmd_mentor_say(msg)
|
|
|
|
/client/proc/cmd_mentor_say(msg as text)
|
|
set category = "Admin"
|
|
set name = "Msay"
|
|
set hidden = 1
|
|
|
|
if(!check_rights(R_ADMIN|R_MOD|R_MENTOR))
|
|
return
|
|
|
|
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
|
|
log_mentorsay(msg, src)
|
|
mob.create_log(OOC_LOG, "MSAY: [msg]")
|
|
|
|
if(!msg)
|
|
return
|
|
|
|
// Do this up here before it gets sent to everyone & emoji'd
|
|
if(SSredis.connected)
|
|
var/list/data = list()
|
|
data["author"] = usr.ckey
|
|
data["source"] = GLOB.configuration.system.instance_id
|
|
data["message"] = msg
|
|
SSredis.publish("byond.msay.out", json_encode(data))
|
|
|
|
for(var/client/C in GLOB.admins)
|
|
if(check_rights(R_ADMIN|R_MOD|R_MENTOR, 0, C.mob))
|
|
var/display_name = key
|
|
if(holder.fakekey)
|
|
if(C.holder && C.holder.rights & R_ADMIN)
|
|
display_name = "[holder.fakekey]/([key])"
|
|
else
|
|
display_name = holder.fakekey
|
|
msg = "<span class='emoji_enabled'>[msg]</span>"
|
|
to_chat(C, "<span class='[check_rights(R_ADMIN, 0) ? "mentor_channel_admin" : "mentor_channel"]'>MENTOR: <span class='name'>[display_name]</span> ([admin_jump_link(mob)]): <span class='message'>[msg]</span></span>")
|
|
|
|
SSblackbox.record_feedback("tally", "admin_verb", 1, "Msay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/toggle_mentor_chat()
|
|
set category = "Server"
|
|
set name = "Toggle Mentor Chat"
|
|
set desc = "Toggle whether mentors have access to the msay command"
|
|
|
|
if(!check_rights(R_ADMIN))
|
|
return
|
|
|
|
var/enabling
|
|
var/msay = /client/proc/cmd_mentor_say
|
|
|
|
if(msay in GLOB.admin_verbs_mentor)
|
|
enabling = FALSE
|
|
GLOB.admin_verbs_mentor -= msay
|
|
else
|
|
enabling = TRUE
|
|
GLOB.admin_verbs_mentor += msay
|
|
|
|
for(var/client/C in GLOB.admins)
|
|
if(check_rights(R_ADMIN|R_MOD, 0, C.mob))
|
|
continue
|
|
if(!check_rights(R_MENTOR, 0, C.mob))
|
|
continue
|
|
if(enabling)
|
|
C.verbs += msay
|
|
to_chat(C, "<b>Mentor chat has been enabled.</b> Use 'msay' to speak in it.")
|
|
else
|
|
C.verbs -= msay
|
|
to_chat(C, "<b>Mentor chat has been disabled.</b>")
|
|
|
|
log_and_message_admins("toggled mentor chat [enabling ? "on" : "off"].")
|
|
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Msay")
|