mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 19:44:58 +01:00
standardizes Reboot(), allows round to be delayed after it finishes and removes immediate reboot verb
This commit is contained in:
@@ -491,24 +491,16 @@ var/global/floorIsLava = 0
|
||||
/datum/admins/proc/restart()
|
||||
set category = "Server"
|
||||
set name = "Restart"
|
||||
set desc="Restarts the world"
|
||||
set desc="Restarts the world immediately"
|
||||
if (!usr.client.holder)
|
||||
return
|
||||
var/confirm = alert("Restart the game world?", "Restart", "Yes", "Cancel")
|
||||
if(confirm == "Cancel")
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
world << "<span class='boldannounce'>Restarting world!</span> <span class='adminnotice'> Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]!</span>"
|
||||
log_admin("[key_name(usr)] initiated a reboot.")
|
||||
|
||||
feedback_set_details("end_error","admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]")
|
||||
ticker.delay_end = 0
|
||||
feedback_add_details("admin_verb","R") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
if(blackbox)
|
||||
blackbox.save_all_data_to_sql()
|
||||
|
||||
sleep(50)
|
||||
world.Reboot()
|
||||
world.Reboot("Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key].", "end_error", "admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]", 10)
|
||||
|
||||
|
||||
/datum/admins/proc/announce()
|
||||
@@ -650,24 +642,6 @@ var/global/floorIsLava = 0
|
||||
log_admin("[key_name(usr)] set the pre-game delay to [newtime] seconds.")
|
||||
feedback_add_details("admin_verb","DELAY") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/immreboot()
|
||||
set category = "Server"
|
||||
set desc="Reboots the server post haste"
|
||||
set name="Immediate Reboot"
|
||||
if(!usr.client.holder) return
|
||||
if( alert("Reboot server?",,"Yes","No") == "No")
|
||||
return
|
||||
world << "<span class='boldannounce'>Rebooting world!</span> <span class='adminnotice'>Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]!</span>"
|
||||
log_admin("[key_name(usr)] initiated an immediate reboot.")
|
||||
|
||||
feedback_set_details("end_error","immediate admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]")
|
||||
feedback_add_details("admin_verb","IR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
if(blackbox)
|
||||
blackbox.save_all_data_to_sql()
|
||||
|
||||
world.Reboot()
|
||||
|
||||
/datum/admins/proc/unprison(var/mob/M in mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Unprison"
|
||||
|
||||
@@ -97,7 +97,6 @@ var/list/admin_verbs_server = list(
|
||||
/datum/admins/proc/delay,
|
||||
/datum/admins/proc/toggleaban,
|
||||
/client/proc/toggle_log_hrefs,
|
||||
/datum/admins/proc/immreboot,
|
||||
/client/proc/everyone_random,
|
||||
/datum/admins/proc/toggleAI,
|
||||
/client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/
|
||||
@@ -178,7 +177,6 @@ var/list/admin_verbs_hideable = list(
|
||||
/datum/admins/proc/delay,
|
||||
/datum/admins/proc/toggleaban,
|
||||
/client/proc/toggle_log_hrefs,
|
||||
/datum/admins/proc/immreboot,
|
||||
/client/proc/everyone_random,
|
||||
/datum/admins/proc/toggleAI,
|
||||
/client/proc/restart_controller,
|
||||
|
||||
@@ -1716,28 +1716,13 @@
|
||||
dirty_paths = href_list["object_list"]
|
||||
|
||||
var/paths = list()
|
||||
var/removed_paths = list()
|
||||
|
||||
for(var/dirty_path in dirty_paths)
|
||||
var/path = text2path(dirty_path)
|
||||
if(!path)
|
||||
removed_paths += dirty_path
|
||||
continue
|
||||
else if(!ispath(path, /obj) && !ispath(path, /turf) && !ispath(path, /mob))
|
||||
removed_paths += dirty_path
|
||||
continue
|
||||
else if(ispath(path, /obj/item/weapon/gun/energy/pulse))
|
||||
if(!check_rights(R_FUN,0))
|
||||
removed_paths += dirty_path
|
||||
continue
|
||||
else if(ispath(path, /obj/item/weapon/melee/energy/blade))//Not an item one should be able to spawn./N
|
||||
if(!check_rights(R_FUN,0))
|
||||
removed_paths += dirty_path
|
||||
continue
|
||||
else if(ispath(path, /obj/effect/anomaly/bhole))
|
||||
if(!check_rights(R_FUN,0))
|
||||
removed_paths += dirty_path
|
||||
continue
|
||||
paths += path
|
||||
|
||||
if(!paths)
|
||||
@@ -1746,8 +1731,6 @@
|
||||
if(length(paths) > 5)
|
||||
alert("Select fewer object types, (max 5)")
|
||||
return
|
||||
else if(length(removed_paths))
|
||||
alert("Removed:\n" + list2text(removed_paths, "\n"))
|
||||
|
||||
var/list/offset = text2list(href_list["offset"],",")
|
||||
var/number = dd_range(1, 100, text2num(href_list["object_count"]))
|
||||
|
||||
Reference in New Issue
Block a user