mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 15:37:36 +01:00
Fixes map vote (#17740)
This commit is contained in:
@@ -184,9 +184,10 @@ SUBSYSTEM_DEF(vote)
|
||||
var/datum/map/top_voted_map
|
||||
for(var/x in subtypesof(/datum/map))
|
||||
var/datum/map/M = x
|
||||
// Set top voted map
|
||||
if(. == "[initial(M.fluff_name)] ([initial(M.technical_name)])")
|
||||
top_voted_map = M
|
||||
if(initial(M.voteable))
|
||||
// Set top voted map
|
||||
if(. == "[initial(M.fluff_name)] ([initial(M.technical_name)])")
|
||||
top_voted_map = M
|
||||
to_chat(world, "<font color='purple'>Map for next round: [initial(top_voted_map.fluff_name)] ([initial(top_voted_map.technical_name)])</font>")
|
||||
SSmapping.next_map = new top_voted_map
|
||||
|
||||
@@ -240,7 +241,8 @@ SUBSYSTEM_DEF(vote)
|
||||
question = "Map for next round"
|
||||
for(var/x in subtypesof(/datum/map))
|
||||
var/datum/map/M = x
|
||||
choices.Add("[initial(M.fluff_name)] ([initial(M.technical_name)])")
|
||||
if(initial(M.voteable))
|
||||
choices.Add("[initial(M.fluff_name)] ([initial(M.technical_name)])")
|
||||
|
||||
if("custom")
|
||||
question = html_encode(input(usr,"What is the vote for?") as text|null)
|
||||
|
||||
@@ -190,7 +190,8 @@ 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
|
||||
map_datums["[initial(M.fluff_name)] ([initial(M.technical_name)])"] = M // Put our map in
|
||||
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
|
||||
|
||||
|
||||
@@ -14,3 +14,5 @@
|
||||
var/map_path
|
||||
/// URL to the maps webmap
|
||||
var/webmap_url
|
||||
/// Is this map voteable?
|
||||
var/voteable = TRUE
|
||||
|
||||
@@ -2,3 +2,4 @@
|
||||
fluff_name = "test_tiny"
|
||||
technical_name = "test_tiny"
|
||||
map_path = "_maps/map_files/test_tiny/test_tiny.dmm"
|
||||
voteable = FALSE
|
||||
|
||||
Reference in New Issue
Block a user