mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 23:27:34 +01:00
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:
@@ -108,7 +108,12 @@ var/list/admin_verbs_server = list(
|
||||
/client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/
|
||||
/client/proc/cmd_debug_del_all,
|
||||
/client/proc/toggle_random_events,
|
||||
#if SERVERTOOLS
|
||||
/client/proc/forcerandomrotate,
|
||||
/client/proc/adminchangemap,
|
||||
#endif
|
||||
/client/proc/panicbunker
|
||||
|
||||
)
|
||||
var/list/admin_verbs_debug = list(
|
||||
/client/proc/restart_controller,
|
||||
|
||||
@@ -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])
|
||||
Reference in New Issue
Block a user