Fixes map vote (#17740)

This commit is contained in:
AffectedArc07
2022-05-07 12:05:53 +01:00
committed by GitHub
parent c0a6432464
commit a388046df4
4 changed files with 11 additions and 5 deletions

View File

@@ -184,6 +184,7 @@ SUBSYSTEM_DEF(vote)
var/datum/map/top_voted_map
for(var/x in subtypesof(/datum/map))
var/datum/map/M = x
if(initial(M.voteable))
// Set top voted map
if(. == "[initial(M.fluff_name)] ([initial(M.technical_name)])")
top_voted_map = M
@@ -240,6 +241,7 @@ SUBSYSTEM_DEF(vote)
question = "Map for next round"
for(var/x in subtypesof(/datum/map))
var/datum/map/M = x
if(initial(M.voteable))
choices.Add("[initial(M.fluff_name)] ([initial(M.technical_name)])")
if("custom")

View File

@@ -190,6 +190,7 @@ GLOBAL_VAR_INIT(intercom_range_display_status, 0)
var/list/map_datums = list()
for(var/x in subtypesof(/datum/map))
var/datum/map/M = x
if(initial(M.voteable))
map_datums["[initial(M.fluff_name)] ([initial(M.technical_name)])"] = M // Put our map in
var/target_map_name = input(usr, "Select target map", "Next map", null) as null|anything in map_datums

View File

@@ -14,3 +14,5 @@
var/map_path
/// URL to the maps webmap
var/webmap_url
/// Is this map voteable?
var/voteable = TRUE

View File

@@ -2,3 +2,4 @@
fluff_name = "test_tiny"
technical_name = "test_tiny"
map_path = "_maps/map_files/test_tiny/test_tiny.dmm"
voteable = FALSE