Some map rotation tweaks.

Adds a config option for the map rotation chance.
Ups default rotation chance from 50% of round length to 75% of round length.
Moves the procs around.
Adds two new admin verbs:
Force map rotation.
Change map.
This commit is contained in:
MrStonedOne
2015-10-02 10:48:09 -07:00
parent a6e189a873
commit 29cf9bd265
7 changed files with 127 additions and 64 deletions

View File

@@ -0,0 +1,34 @@
/client/proc/forcerandomrotate()
set category = "Server"
set name = "Trigger Random Map Rotation"
ticker.maprotatechecked = 1
maprotate()
/client/proc/adminchangemap()
set category = "Server"
set name = "Change Map"
var/list/maprotatechoices = list()
for (var/map in config.maplist)
var/datum/votablemap/VM = config.maplist[map]
var/mapname = VM.friendlyname
if (VM == config.defaultmap)
mapname += " (Default)"
if (VM.minusers > 0 || VM.maxusers > 0)
mapname += " \["
if (VM.minusers > 0)
mapname += "[VM.minusers]"
else
mapname += "0"
mapname += "-"
if (VM.maxusers > 0)
mapname += "[VM.maxusers]"
else
mapname += "inf"
mapname += "\]"
maprotatechoices[mapname] = VM
var/choosenmap = input("Choose a map to rotate to", "Change Map") as null|anything in maprotatechoices
if (!choosenmap)
return
changemap(maprotatechoices[choosenmap])