mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-07-19 20:23:07 +01:00
Merge branch 'master' of https://github.com/Yawn-Wider/YWPolarisVore into August2020UpstreamPull
August2020UpstreamPull
This commit is contained in:
@@ -933,6 +933,20 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
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"
|
||||
@@ -1454,12 +1468,12 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
|
||||
if(check_rights(R_ADMIN|R_MOD|R_EVENT))
|
||||
if (H.paralysis == 0)
|
||||
H.paralysis = 8000
|
||||
H.SetParalysis(8000)
|
||||
msg = "has paralyzed [key_name(H)]."
|
||||
log_and_message_admins(msg)
|
||||
else
|
||||
if(alert(src, "[key_name(H)] is paralyzed, would you like to unparalyze them?",,"Yes","No") == "Yes")
|
||||
H.paralysis = 0
|
||||
H.SetParalysis(0)
|
||||
msg = "has unparalyzed [key_name(H)]."
|
||||
log_and_message_admins(msg)
|
||||
|
||||
|
||||
@@ -167,6 +167,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,
|
||||
@@ -355,6 +356,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
|
||||
|
||||
/*
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
create_mob_html = file2text('html/create_object.html')
|
||||
create_mob_html = replacetext(create_mob_html, "null /* object types */", "\"[mobjs]\"")
|
||||
|
||||
user << browse(replacetext(create_mob_html, "/* ref src */", "\ref[src]"), "window=create_mob;size=425x475")
|
||||
user << browse(replacetext(create_mob_html, "/* ref src */", "\ref[src]"), "window=create_mob;size=680x600")
|
||||
|
||||
@@ -7,15 +7,28 @@
|
||||
create_object_html = file2text('html/create_object.html')
|
||||
create_object_html = replacetext(create_object_html, "null /* object types */", "\"[objectjs]\"")
|
||||
|
||||
user << browse(replacetext(create_object_html, "/* ref src */", "\ref[src]"), "window=create_object;size=425x475")
|
||||
user << browse(replacetext(create_object_html, "/* ref src */", "\ref[src]"), "window=create_object;size=680x600")
|
||||
|
||||
|
||||
/datum/admins/proc/quick_create_object(var/mob/user)
|
||||
|
||||
var/quick_create_object_html = null
|
||||
var/pathtext = null
|
||||
pathtext = input("Select the path of the object you wish to create.", "Path", "/obj") as null|anything in list("/obj",
|
||||
"/obj/structure",
|
||||
"/obj/item",
|
||||
"/obj/item/device",
|
||||
"/obj/item/weapon",
|
||||
"/obj/item/weapon/gun",
|
||||
"/obj/item/weapon/reagent_containers",
|
||||
"/obj/item/weapon/reagent_containers/food",
|
||||
"/obj/item/clothing",
|
||||
"/obj/item/weapon/storage/box/fluff", //VOREStation Edit,
|
||||
"/obj/machinery",
|
||||
"/obj/mecha",
|
||||
"/obj/item/mecha_parts",
|
||||
"/obj/item/mecha_parts/mecha_equipment")
|
||||
|
||||
pathtext = input("Select the path of the object you wish to create.", "Path", "/obj") as null|anything in list("/obj","/obj/structure","/obj/item","/obj/item/device","/obj/item/weapon","/obj/item/weapon/gun","/obj/item/weapon/reagent_containers","/obj/item/weapon/reagent_containers/food","/obj/item/clothing","/obj/machinery","/obj/mecha","/obj/item/mecha_parts/part","/obj/mecha_parts/mecha_equipement","/obj/item/weapon/storage/box/fluff") //VOREStation Edit - Added fluff boxes
|
||||
if(!pathtext)
|
||||
return
|
||||
var path = text2path(pathtext)
|
||||
@@ -26,4 +39,4 @@
|
||||
quick_create_object_html = file2text('html/create_object.html')
|
||||
quick_create_object_html = replacetext(quick_create_object_html, "null /* object types */", "\"[objectjs]\"")
|
||||
|
||||
user << browse(replacetext(quick_create_object_html, "/* ref src */", "\ref[src]"), "window=quick_create_object;size=425x475")
|
||||
user << browse(replacetext(quick_create_object_html, "/* ref src */", "\ref[src]"), "window=quick_create_object;size=680x600")
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
create_turf_html = file2text('html/create_object.html')
|
||||
create_turf_html = replacetext(create_turf_html, "null /* object types */", "\"[turfjs]\"")
|
||||
|
||||
user << browse(replacetext(create_turf_html, "/* ref src */", "\ref[src]"), "window=create_turf;size=425x475")
|
||||
user << browse(replacetext(create_turf_html, "/* ref src */", "\ref[src]"), "window=create_turf;size=680x600")
|
||||
|
||||
@@ -119,3 +119,11 @@ NOTE: It checks usr by default. Supply the "user" argument if you wish to check
|
||||
holder.disassociate()
|
||||
//qdel(holder)
|
||||
return 1
|
||||
|
||||
//This proc checks whether subject has at least ONE of the rights specified in rights_required.
|
||||
/proc/check_rights_for(client/subject, rights_required)
|
||||
if(subject && subject.holder)
|
||||
if(rights_required && !(rights_required & subject.holder.rights))
|
||||
return 0
|
||||
return 1
|
||||
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
@@ -614,15 +614,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")
|
||||
@@ -726,7 +726,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>")
|
||||
|
||||
@@ -189,7 +189,10 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
var/list/adm = get_admin_counts()
|
||||
var/list/activemins = adm["present"]
|
||||
var activeMins = activemins.len
|
||||
SERVER_TOOLS_RELAY_BROADCAST("ADMINHELP: FROM: [initiator_ckey]/[initiator_key_name] - MSG: **[msg]** - Heard by [activeMins] NON-AFK staff members.")
|
||||
if(is_bwoink)
|
||||
world.TgsTargetedChatBroadcast("ADMINHELP: FROM: [key_name_admin(usr)] TO [initiator_ckey]/[initiator_key_name] - MSG: **[msg]** - Heard by [activeMins] NON-AFK staff members.", TRUE)
|
||||
else
|
||||
world.TgsTargetedChatBroadcast("ADMINHELP: FROM: [initiator_ckey]/[initiator_key_name] - MSG: **[msg]** - Heard by [activeMins] NON-AFK staff members.", TRUE)
|
||||
//YW EDIT END
|
||||
GLOB.ahelp_tickets.active_tickets += src
|
||||
|
||||
|
||||
Reference in New Issue
Block a user