MAP ROTATION PART 2 (#12345)

* MAP ROTATION

* Tweaks + New additions

* Apply suggestions from code review

Co-authored-by: dearmochi <shenesis@gmail.com>

* Fixes improper naming

* Fixes map vote

Co-authored-by: dearmochi <shenesis@gmail.com>
This commit is contained in:
AffectedArc07
2021-05-24 08:25:18 -06:00
committed by GitHub
co-authored by dearmochi
parent 122f09585e
commit 663eff7b5e
38 changed files with 273 additions and 192 deletions
+25
View File
@@ -179,3 +179,28 @@ GLOBAL_VAR_INIT(intercom_range_display_status, 0)
to_chat(world, "There are [count] objects of type [type_path] in the game world.")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Count Objects (Global)") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/set_next_map()
set category = "Server"
set name = "Set Next Map"
if(!check_rights(R_SERVER))
return
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
var/target_map_name = input(usr, "Select target map", "Next map", null) as null|anything in map_datums
if(!target_map_name)
return
var/datum/map/TM = map_datums[target_map_name]
SSmapping.next_map = new TM
var/announce_to_players = alert(usr, "Do you wish to tell the playerbase about your choice?", "Announce", "Yes", "No")
message_admins("[key_name_admin(usr)] has set the next map to [SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])")
log_admin("[key_name(usr)] has set the next map to [SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])")
if(announce_to_players == "Yes")
to_chat(world, "<span class='boldannounce'>[key] has chosen the following map for next round: <font color='cyan'>[SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])</font></span>")