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
+2 -1
View File
@@ -137,7 +137,8 @@ GLOBAL_LIST_INIT(admin_verbs_server, list(
/client/proc/toggle_antagHUD_restrictions,
/client/proc/set_ooc,
/client/proc/reset_ooc,
/client/proc/toggledrones
/client/proc/toggledrones,
/client/proc/set_next_map
))
GLOBAL_LIST_INIT(admin_verbs_debug, list(
/client/proc/cmd_admin_list_open_jobs,
+1 -1
View File
@@ -2341,7 +2341,7 @@
P.name = "Central Command - paper"
var/stypes = list("Handle it yourselves!","Illegible fax","Fax not signed","Not Right Now","You are wasting our time", "Keep up the good work", "ERT Instructions")
var/stype = input(src.owner, "Which type of standard reply do you wish to send to [H]?","Choose your paperwork", "") as null|anything in stypes
var/tmsg = "<font face='Verdana' color='black'><center><img src = 'ntlogo.png'><BR><BR><BR><font size='4'><b>Nanotrasen Science Station [GLOB.using_map.station_short]</b></font><BR><BR><BR><font size='4'>NAS Trurl Communications Department Report</font></center><BR><BR>"
var/tmsg = "<font face='Verdana' color='black'><center><img src = 'ntlogo.png'><BR><BR><BR><font size='4'><b>[SSmapping.map_datum.fluff_name]</b></font><BR><BR><BR><font size='4'>NAS Trurl Communications Department Report</font></center><BR><BR>"
if(stype == "Handle it yourselves!")
tmsg += "Greetings, esteemed crewmember. Your fax has been <b><I>DECLINED</I></b> automatically by NAS Trurl Fax Registration.<BR><BR>Please proceed in accordance with Standard Operating Procedure and/or Space Law. You are fully trained to handle this situation without Central Command intervention.<BR><BR><i><small>This is an automatic message.</small>"
else if(stype == "Illegible fax")
+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>")