mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
announce login message as a config
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#define SOUND_INSTRUMENTS 128
|
||||
#define SOUND_SHIP_AMBIENCE 256
|
||||
#define SOUND_PRAYERS 512
|
||||
#define ANNOUNCE_LOGIN 1024
|
||||
|
||||
#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|MEMBER_PUBLIC|INTENT_STYLE|MIDROUND_ANTAG|SOUND_INSTRUMENTS|SOUND_SHIP_AMBIENCE|SOUND_PRAYERS)
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
|
||||
var/autoconvert_notes = 0 //if all connecting player's notes should attempt to be converted to the database
|
||||
|
||||
var/announce_admin_logout = 1
|
||||
var/announce_admin_logout = 0
|
||||
var/announce_admin_login = 0
|
||||
|
||||
/datum/configuration/New()
|
||||
|
||||
@@ -816,7 +816,8 @@ var/global/floorIsLava = 0
|
||||
if(logout && config && config.announce_admin_logout)
|
||||
string = pick(
|
||||
"Admin logout: [key_name(src)]")
|
||||
else if(!logout && config && config.announce_admin_login)
|
||||
else if(!logout && config && config.announce_admin_login && (prefs.toggles & ANNOUNCE_LOGIN))
|
||||
string = pick(
|
||||
"Admin login: [key_name(src)]")
|
||||
message_admins("[string]")
|
||||
if(string)
|
||||
message_admins("[string]")
|
||||
@@ -1,6 +1,7 @@
|
||||
//admin verb groups - They can overlap if you so wish. Only one of each verb will exist in the verbs list regardless
|
||||
var/list/admin_verbs_default = list(
|
||||
/client/proc/toggleadminhelpsound, /*toggles whether we hear a sound when adminhelps/PMs are used*/
|
||||
/client/proc/toggleannouncelogin, /*toggles if an admin's login is announced during a round*/
|
||||
/client/proc/deadmin_self, /*destroys our own admin datum so we can play as a regular player*/
|
||||
/client/proc/cmd_admin_say, /*admin-only ooc chat*/
|
||||
/client/proc/hide_verbs, /*hides all our adminverbs*/
|
||||
|
||||
@@ -184,6 +184,7 @@ var/next_external_rsc = 0
|
||||
//////////////
|
||||
/client/Del()
|
||||
if(holder)
|
||||
adminGreet(1)
|
||||
holder.owner = null
|
||||
admins -= src
|
||||
directory -= ckey
|
||||
|
||||
@@ -345,8 +345,8 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
|
||||
|
||||
if(user.client)
|
||||
if(user.client.holder)
|
||||
dat += "<b>Adminhelp Sound:</b> "
|
||||
dat += "<a href='?_src_=prefs;preference=hear_adminhelps'>[(toggles & SOUND_ADMINHELP)?"On":"Off"]</a><br>"
|
||||
dat += "<b>Adminhelp Sound:</b> <a href='?_src_=prefs;preference=hear_adminhelps'>[(toggles & SOUND_ADMINHELP)?"On":"Off"]</a><br>"
|
||||
dat += "<b>Announce Login:</b> <a href='?_src_=prefs;preference=announce_login'>[(toggles & ANNOUNCE_LOGIN)?"On":"Off"]</a><br>"
|
||||
|
||||
if(unlock_content || check_rights_for(user.client, R_ADMIN))
|
||||
dat += "<b>OOC:</b> <span style='border: 1px solid #161616; background-color: [ooccolor ? ooccolor : normal_ooc_colour];'> </span> <a href='?_src_=prefs;preference=ooccolor;task=input'>Change</a><br>"
|
||||
@@ -955,6 +955,8 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
|
||||
|
||||
if("hear_adminhelps")
|
||||
toggles ^= SOUND_ADMINHELP
|
||||
if("announce_login")
|
||||
toggles ^= ANNOUNCE_LOGIN
|
||||
|
||||
if("ui")
|
||||
switch(UI_style)
|
||||
|
||||
@@ -64,6 +64,16 @@
|
||||
usr << "You will [(prefs.toggles & SOUND_ADMINHELP) ? "now" : "no longer"] hear a sound when adminhelps arrive."
|
||||
feedback_add_details("admin_verb","AHS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/toggleannouncelogin()
|
||||
set name = "Do/Don't Announce Login"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggle if you want an announcement to admins when you login during a round"
|
||||
if(!holder) return
|
||||
prefs.toggles ^= ANNOUNCE_LOGIN
|
||||
prefs.save_preferences()
|
||||
usr << "You will [(prefs.toggles & ANNOUNCE_LOGIN) ? "now" : "no longer"] have an announcement to other admins when you login."
|
||||
feedback_add_details("admin_verb","TAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/deadchat()
|
||||
set name = "Show/Hide Deadchat"
|
||||
set category = "Preferences"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
if(admin_datums[src.ckey])
|
||||
if (ticker && ticker.current_state == GAME_STATE_PLAYING) //Only report this stuff if we are currently playing.
|
||||
var/admins_number = admins.len
|
||||
client.adminGreet(1)
|
||||
if(admins_number == 0) //Apparently the admin logging out is no longer an admin at this point, so we have to check this towards 0 and not towards 1. Awell.
|
||||
var/cheesy_message = pick( list( \
|
||||
"I have no admins online!",\
|
||||
|
||||
Reference in New Issue
Block a user