mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 14:08:31 +01:00
Redoes the admin verb define to require passing in an Admin Visible Name, and restores the usage of '-' for the verb bar when you want to call verbs from the command bar. Also cleans up and organizes the backend for drawing verbs to make it easier in the future for me to make it look better (#73214)
## About The Pull Request Damn that's a long title. Admin Verbs can be used in the verb bar with hyphens instead of spaces again. ## Why It's Good For The Game Admin muscle memory ## Changelog
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
// Server Tab - Server Verbs
|
||||
|
||||
|
||||
ADMIN_VERB(server, toggle_random_events, "Toggles random events such as meteors, black holes, blob (but not space dust) on/off", R_SERVER)
|
||||
ADMIN_VERB(server, toggle_random_events, "Toggle Random Events", "Toggles random events such as meteors, black holes, blob (but not space dust) on/off", R_SERVER)
|
||||
var/new_are = !CONFIG_GET(flag/allow_random_events)
|
||||
CONFIG_SET(flag/allow_random_events, new_are)
|
||||
message_admins("[key_name_admin(usr)] has [new_are ? "enabled" : "disabled"] random events.")
|
||||
|
||||
ADMIN_VERB(server, toggle_hub, "", R_SERVER)
|
||||
ADMIN_VERB(server, toggle_hub, "Toggle Hub", "", R_SERVER)
|
||||
world.update_hub_visibility(!GLOB.hub_visibility)
|
||||
|
||||
log_admin("[key_name(usr)] has toggled the server's hub status for the round, it is now [(GLOB.hub_visibility?"on":"off")] the hub.")
|
||||
@@ -14,7 +14,7 @@ ADMIN_VERB(server, toggle_hub, "", R_SERVER)
|
||||
if (GLOB.hub_visibility && !world.reachable)
|
||||
message_admins("WARNING: The server will not show up on the hub because byond is detecting that a filewall is blocking incoming connections.")
|
||||
|
||||
ADMIN_VERB(server, reboot_world, "Restarts the world immediately", R_SERVER)
|
||||
ADMIN_VERB(server, reboot_world, "Reboot World", "Restarts the world immediately", R_SERVER)
|
||||
var/localhost_addresses = list("127.0.0.1", "::1")
|
||||
var/list/options = list("Regular Restart", "Regular Restart (with delay)", "Hard Restart (No Delay/Feeback Reason)", "Hardest Restart (No actions, just reboot)")
|
||||
if(world.TgsAvailable())
|
||||
@@ -51,24 +51,24 @@ ADMIN_VERB(server, reboot_world, "Restarts the world immediately", R_SERVER)
|
||||
to_chat(world, "Server restart - [init_by]")
|
||||
world.TgsEndProcess()
|
||||
|
||||
ADMIN_VERB(server, end_round, "Attempts to produce a round end report and then restart the server organically.", R_SERVER)
|
||||
ADMIN_VERB(server, end_round, "End Round", "Attempts to produce a round end report and then restart the server organically.", R_SERVER)
|
||||
var/confirm = tgui_alert(usr, "End the round and restart the game world?", "End Round", list("Yes", "Cancel"))
|
||||
if(confirm == "Cancel")
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
SSticker.force_ending = TRUE
|
||||
|
||||
ADMIN_VERB(server, toggle_ooc, "Toggle dis bitch", R_SERVER)
|
||||
ADMIN_VERB(server, toggle_ooc, "Toggle OOC", "Toggle dis bitch", R_SERVER)
|
||||
toggle_ooc()
|
||||
log_admin("[key_name(usr)] toggled OOC.")
|
||||
message_admins("[key_name_admin(usr)] toggled OOC.")
|
||||
|
||||
ADMIN_VERB(server, toggle_dead_ooc, "Toggle dis bitch", R_SERVER)
|
||||
ADMIN_VERB(server, toggle_dead_ooc, "Toggle Dead OOC", "Toggle dis bitch", R_SERVER)
|
||||
toggle_dooc()
|
||||
log_admin("[key_name(usr)] toggled OOC.")
|
||||
message_admins("[key_name_admin(usr)] toggled Dead OOC.")
|
||||
|
||||
ADMIN_VERB(server, start_now, "Start the round RIGHT NOW", R_SERVER)
|
||||
ADMIN_VERB(server, start_now, "Start Now", "Start the round RIGHT NOW", R_SERVER)
|
||||
if(SSticker.current_state == GAME_STATE_PREGAME || SSticker.current_state == GAME_STATE_STARTUP)
|
||||
if(!SSticker.start_immediately)
|
||||
var/localhost_addresses = list("127.0.0.1", "::1")
|
||||
@@ -94,7 +94,7 @@ ADMIN_VERB(server, start_now, "Start the round RIGHT NOW", R_SERVER)
|
||||
to_chat(usr, "<span class='warningplain'><font color='red'>Error: Start Now: Game has already started.</font></span>")
|
||||
return FALSE
|
||||
|
||||
ADMIN_VERB(server, delay_round_end, "Prevent the server from restarting", R_SERVER)
|
||||
ADMIN_VERB(server, delay_round_end, "Delay Round End", "Prevent the server from restarting", R_SERVER)
|
||||
if(SSticker.delay_end)
|
||||
tgui_alert(usr, "The round end is already delayed. The reason for the current delay is: \"[SSticker.admin_delay_notice]\"", "Alert", list("Ok"))
|
||||
return
|
||||
@@ -114,14 +114,14 @@ ADMIN_VERB(server, delay_round_end, "Prevent the server from restarting", R_SERV
|
||||
log_admin("[key_name(usr)] delayed the round end for reason: [SSticker.admin_delay_notice]")
|
||||
message_admins("[key_name_admin(usr)] delayed the round end for reason: [SSticker.admin_delay_notice]")
|
||||
|
||||
ADMIN_VERB(server, toggle_entering, "People can't enter", R_SERVER)
|
||||
ADMIN_VERB(server, toggle_entering, "Toggle Entering", "People can't enter", R_SERVER)
|
||||
if(!SSlag_switch.initialized)
|
||||
return
|
||||
SSlag_switch.set_measure(DISABLE_NON_OBSJOBS, !SSlag_switch.measures[DISABLE_NON_OBSJOBS])
|
||||
log_admin("[key_name(usr)] toggled new player game entering. Lag Switch at index ([DISABLE_NON_OBSJOBS])")
|
||||
message_admins("[key_name_admin(usr)] toggled new player game entering [SSlag_switch.measures[DISABLE_NON_OBSJOBS] ? "OFF" : "ON"].")
|
||||
|
||||
ADMIN_VERB(server, toggle_ai, "People can't be AI", R_SERVER)
|
||||
ADMIN_VERB(server, toggle_ai, "Toggle AI", "People can't be AI", R_SERVER)
|
||||
var/alai = CONFIG_GET(flag/allow_ai)
|
||||
CONFIG_SET(flag/allow_ai, !alai)
|
||||
if (alai)
|
||||
@@ -131,7 +131,7 @@ ADMIN_VERB(server, toggle_ai, "People can't be AI", R_SERVER)
|
||||
log_admin("[key_name(usr)] toggled AI allowed.")
|
||||
world.update_status()
|
||||
|
||||
ADMIN_VERB(server, toggle_respawn, "Respawn basically", R_SERVER)
|
||||
ADMIN_VERB(server, toggle_respawn, "Toggle Respawn", "Respawn basically", R_SERVER)
|
||||
var/new_nores = !CONFIG_GET(flag/norespawn)
|
||||
CONFIG_SET(flag/norespawn, new_nores)
|
||||
if (!new_nores)
|
||||
@@ -142,7 +142,7 @@ ADMIN_VERB(server, toggle_respawn, "Respawn basically", R_SERVER)
|
||||
log_admin("[key_name(usr)] toggled respawn to [!new_nores ? "On" : "Off"].")
|
||||
world.update_status()
|
||||
|
||||
ADMIN_VERB(server, delay_pre_game, "Delay the game start", R_SERVER)
|
||||
ADMIN_VERB(server, delay_pre_game, "Delay Pre Game", "Delay the game start", R_SERVER)
|
||||
var/newtime = input(usr, "Set a new time in seconds. Set -1 for indefinite delay.","Set Delay",round(SSticker.GetTimeLeft()/10)) as num|null
|
||||
if(SSticker.current_state > GAME_STATE_PREGAME)
|
||||
return tgui_alert(usr, "Too late... The game has already started!")
|
||||
@@ -158,7 +158,7 @@ ADMIN_VERB(server, delay_pre_game, "Delay the game start", R_SERVER)
|
||||
SEND_SOUND(world, sound('sound/ai/default/attention.ogg'))
|
||||
log_admin("[key_name(usr)] set the pre-game delay to [DisplayTimeText(newtime)].")
|
||||
|
||||
ADMIN_VERB(server, set_admin_notice, "Set an announcement that appears to everone who joins the server; only lasts this round", R_SERVER)
|
||||
ADMIN_VERB(server, set_admin_notice, "Set Admin Notice", "Set an announcement that appears to everone who joins the server; only lasts this round", R_SERVER)
|
||||
var/new_admin_notice = input(src,"Set a public notice for this round. Everyone who joins the server will see it.\n(Leaving it blank will delete the current notice):","Set Notice",GLOB.admin_notice) as message|null
|
||||
if(new_admin_notice == null)
|
||||
return
|
||||
@@ -173,7 +173,7 @@ ADMIN_VERB(server, set_admin_notice, "Set an announcement that appears to everon
|
||||
to_chat(world, span_adminnotice("<b>Admin Notice:</b>\n \t [new_admin_notice]"), confidential = TRUE)
|
||||
GLOB.admin_notice = new_admin_notice
|
||||
|
||||
ADMIN_VERB(server, toggle_guests, "Guests can't enter", R_SERVER)
|
||||
ADMIN_VERB(server, toggle_guests, "Toggle Guests", "Guests can't enter", R_SERVER)
|
||||
var/new_guest_ban = !CONFIG_GET(flag/guest_ban)
|
||||
CONFIG_SET(flag/guest_ban, new_guest_ban)
|
||||
if (new_guest_ban)
|
||||
|
||||
Reference in New Issue
Block a user