mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-23 05:06:50 +01:00
Persistent Trash/Dirt/Graffiti/Notices (#7337)
* Port Trash/Writing Persistence from World * stuff beyond straight portin * Fixed admin menu * Config, cigbutts, blood exceptions, offices.... * mapped butts
This commit is contained in:
@@ -930,6 +930,20 @@ proc/admin_notice(var/message, var/rights)
|
||||
world.update_status()
|
||||
feedback_add_details("admin_verb","TR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/togglepersistence()
|
||||
set category = "Server"
|
||||
set desc="Whether persistent data will be saved from now on."
|
||||
set name="Toggle Persistent Data"
|
||||
config.persistence_enabled = !(config.persistence_enabled)
|
||||
if(config.persistence_enabled)
|
||||
to_world("<B>Persistence is now enabled..</B>")
|
||||
else
|
||||
to_world("<B>Persistence is no longer enabled.</B>")
|
||||
message_admins("<font color='blue'>[key_name_admin(usr)] toggled persistence to [config.persistence_enabled ? "On" : "Off"].</font>", 1)
|
||||
log_admin("[key_name(usr)] toggled persistence to [config.persistence_enabled ? "On" : "Off"].")
|
||||
world.update_status()
|
||||
feedback_add_details("admin_verb","TPD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/toggle_aliens()
|
||||
set category = "Server"
|
||||
set desc="Toggle alien mobs"
|
||||
|
||||
@@ -163,6 +163,7 @@ var/list/admin_verbs_server = list(
|
||||
/datum/admins/proc/restart,
|
||||
/datum/admins/proc/delay,
|
||||
/datum/admins/proc/toggleaban,
|
||||
/datum/admins/proc/togglepersistence,
|
||||
/client/proc/cmd_mod_say,
|
||||
/client/proc/toggle_log_hrefs,
|
||||
/datum/admins/proc/immreboot,
|
||||
@@ -351,6 +352,7 @@ var/list/admin_verbs_mod = list(
|
||||
/client/proc/allow_character_respawn, // Allows a ghost to respawn ,
|
||||
/datum/admins/proc/sendFax,
|
||||
/client/proc/getserverlog, //allows us to fetch server logs (diary) for other days,
|
||||
/datum/admins/proc/view_persistent_data,
|
||||
/datum/admins/proc/view_txt_log, //shows the server log (diary) for today,
|
||||
/datum/admins/proc/view_atk_log //shows the server combat-log, doesn't do anything presently,
|
||||
)
|
||||
|
||||
@@ -26,14 +26,18 @@ var/jobban_keylist[0] //to store the keys & ranks
|
||||
if(config.usewhitelist && !check_whitelist(M))
|
||||
return "Whitelisted Job"
|
||||
|
||||
for (var/s in jobban_keylist)
|
||||
if( findtext(s,"[M.ckey] - [rank]") == 1 )
|
||||
var/startpos = findtext(s, "## ")+3
|
||||
if(startpos && startpos<length(s))
|
||||
var/text = copytext(s, startpos, 0)
|
||||
if(text)
|
||||
return text
|
||||
return "Reason Unspecified"
|
||||
return ckey_is_jobbanned(M.ckey, rank)
|
||||
return 0
|
||||
|
||||
/proc/ckey_is_jobbanned(var/check_key, var/rank)
|
||||
for(var/s in jobban_keylist)
|
||||
if(findtext(s,"[check_key] - [rank]") == 1 )
|
||||
var/startpos = findtext(s, "## ")+3
|
||||
if(startpos && startpos<length(s))
|
||||
var/text = copytext(s, startpos, 0)
|
||||
if(text)
|
||||
return text
|
||||
return "Reason Unspecified"
|
||||
return 0
|
||||
|
||||
/*
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
/datum/admins/proc/view_persistent_data()
|
||||
set category = "Admin"
|
||||
set name = "View Persistent Data"
|
||||
set desc = "Shows a list of persistent data for this round. Allows modification by admins."
|
||||
|
||||
SSpersistence.show_info(usr)
|
||||
+10
-10
@@ -593,15 +593,15 @@
|
||||
|
||||
jobs += "</tr></table>"
|
||||
|
||||
//Other races (BLUE, because I have no idea what other color to make this)
|
||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
jobs += "<tr bgcolor='ccccff'><th colspan='1'>Other Races</th></tr><tr align='center'>"
|
||||
|
||||
if(jobban_isbanned(M, "Dionaea"))
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=Dionaea;jobban4=\ref[M]'><font color=red>Dionaea</font></a></td>"
|
||||
else
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=Dionaea;jobban4=\ref[M]'>Dionaea</a></td>"
|
||||
jobs += "</tr></table>"
|
||||
//Other races (Blue) ... And also graffiti.
|
||||
var/list/misc_roles = list("Dionaea", "Graffiti")
|
||||
jobs += "<tr bgcolor='ccccff'><th colspan='[LAZYLEN(misc_roles)]'>Other Roles</th></tr><tr align='center'>"
|
||||
for(var/entry in misc_roles)
|
||||
if(jobban_isbanned(M, entry))
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=[entry];jobban4=\ref[M]'><font color=red>[entry]</font></a></td>"
|
||||
else
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=[entry];jobban4=\ref[M]'>[entry]</a></td>"
|
||||
jobs += "</tr></table>"
|
||||
body = "<body>[jobs]</body>"
|
||||
dat = "<tt>[header][body]</tt>"
|
||||
usr << browse(dat, "window=jobban2;size=800x490")
|
||||
@@ -697,7 +697,7 @@
|
||||
switch(alert("Temporary Ban?",,"Yes","No", "Cancel"))
|
||||
if("Yes")
|
||||
if(!check_rights(R_MOD,0) && !check_rights(R_BAN, 0))
|
||||
to_chat(usr, "<span class='filter_adminlog warning'> You Cannot issue temporary job-bans!</span>")
|
||||
to_chat(usr, "<span class='filter_adminlog warning'> You cannot issue temporary job-bans!</span>")
|
||||
return
|
||||
if(config.ban_legacy_system)
|
||||
to_chat(usr, "<span class='filter_adminlog warning'>Your server is using the legacy banning system, which does not support temporary job bans. Consider upgrading. Aborting ban.</span>")
|
||||
|
||||
Reference in New Issue
Block a user