Fix map vote revert, add admin verb (#89505)

## About The Pull Request

Fixes revert_next_map() not actually reverting the map vote. Also added
an admin verb for it for ease of access.

## Why It's Good For The Game

Fix bug, revert map vote without having to poke around in the subsystem.

## Changelog

🆑 LT3
fix: Revert next map command actually reverts the map vote
admin: Admins now have a verb to revert the map vote
/🆑
This commit is contained in:
LT3
2025-02-17 12:15:36 -08:00
committed by GitHub
parent 62feae86a5
commit 9a14e4dcb9
2 changed files with 9 additions and 1 deletions
+6 -1
View File
@@ -154,7 +154,7 @@ SUBSYSTEM_DEF(map_vote)
next_map_config = change_to
return TRUE
/datum/controller/subsystem/map_vote/proc/revert_next_map()
/datum/controller/subsystem/map_vote/proc/revert_next_map(client/user)
if(!next_map_config)
return
if(previous_cache)
@@ -163,6 +163,11 @@ SUBSYSTEM_DEF(map_vote)
already_voted = FALSE
admin_override = FALSE
next_map_config = null
if(!isnull(user))
message_admins("[key_name_admin(user)] has reverted the next map selection. Voting re-enabled.")
log_admin("[key_name_admin(user)] reverted the next map selection.")
send_map_vote_notice("Next map reverted. Voting re-enabled.")
#undef MAP_VOTE_CACHE_LOCATION
+3
View File
@@ -114,3 +114,6 @@ ADMIN_VERB(admin_change_map, R_SERVER, "Change Map", "Set the next map.", ADMIN_
if (SSmap_vote.set_next_map(virtual_map))
message_admins("[key_name_admin(user)] has changed the map to [virtual_map.map_name]")
SSmap_vote.admin_override = TRUE
ADMIN_VERB(admin_revert_map, R_SERVER, "Revert Map Vote", "Revert the map vote, allowing a new vote.", ADMIN_CATEGORY_SERVER)
SSmap_vote.revert_next_map(user)