Files
Bubberstation/code/modules/admin/verbs/maprotation.dm
Cyberboss 1bbc640afe Runtime Dynamic Station Loading (#24171)
* Dynamic map loading prototype

* Get the title screen working

* Fixes the random pod bugs

* map configs

* Add back the asteroid

* Ignore the rotate file

* Fix some shit

* More shit fixes

* Babby's first json

* Cyberboss confirmed shitcoder

* Makes map rotation great again

* Moves the map defines

* Delete tgstation2.dm

* Convert runtimestation

* Convert PubbyStation

* Convert OmegaStation

* Convert Metastation

* Convert Delta Station

* Lol file extensions

* Reee line endings

* Take out the trash

* Fix loadallmaps.dm

* Deltaassssssstation?

* Fix travis

* Did I ASK you to change the line endings?

* Remove votable maps

* Cleanup

* Previous config. Load configs in New. Fix splash

* Fix this

* More generic minetype

* STOP TOUCHING THE LINE ENDINGS!!!

* Add some flexibility to /obj/screen/splash

* Fix the shit

* Update gitignore

* Smooth transition from last map

* Better check

* Missed this map rotate check

* Remove these checks too

* Prep for a future request by @kevinz000

* Fix z2 line endings

* Solution for custom .dms

* Rename some things, trim some fat

* Fixes default map_config

* Remove stale comment

* Delete the previous config after loading

* Don't try to open a non-existent file

* Delete the old rotator script

* And references to it

* Line endings

* More line endings

* Del checks from when m-config may have not existed

* LINE ENDINGS

* Update the default map config

* Map load error checking for what it's worth

* Small cleanup

* For case sensitive

* File systems

* Strip maprotate stuff from build script

* Spruce up the _maps tree. Compile some empty space

* Make travis simpler

* LINEARU ENDARU!!!

* tgstation TWO!!!

* Lowercase mine type

* Dummy dm's for testmerging

* Fixes job ordering

* If ghosts wanna watch the map load so be it

* Let them know what's going on

* Fixes z-transitions

* Optimize z expansion further

* Remove this old var

* Fix wiznerd teleportation

* Rmove butt

* Does the thing

* Moved temp configs to the data dir

* Un-touch gitignore

* Forgot templates.dm

* Forgot to include the includer

* Fair enough

* SILENCE IMBECILE!

* @Cyberboss still a fuckboi

* Speed things up a bit

* Fix a potential bug with the error message

* Whatever
2017-03-07 10:45:31 +13:00

44 lines
1.5 KiB
Plaintext

/client/proc/forcerandomrotate()
set category = "Server"
set name = "Trigger Random Map Rotation"
var/rotate = alert("Force a random map rotation to trigger?", "Rotate map?", "Yes", "Cancel")
if (rotate != "Yes")
return
message_admins("[key_name_admin(usr)] is forcing a random map rotation.")
log_admin("[key_name(usr)] is forcing a random map rotation.")
ticker.maprotatechecked = 1
SSmapping.maprotate()
/client/proc/adminchangemap()
set category = "Server"
set name = "Change Map"
var/list/maprotatechoices = list()
for (var/map in config.maplist)
var/datum/map_config/VM = config.maplist[map]
var/mapname = VM.map_name
if (VM == config.defaultmap)
mapname += " (Default)"
if (VM.config_min_users > 0 || VM.config_max_users > 0)
mapname += " \["
if (VM.config_min_users > 0)
mapname += "[VM.config_min_users]"
else
mapname += "0"
mapname += "-"
if (VM.config_max_users > 0)
mapname += "[VM.config_max_users]"
else
mapname += "inf"
mapname += "\]"
maprotatechoices[mapname] = VM
var/chosenmap = input("Choose a map to change to", "Change Map") as null|anything in maprotatechoices
if (!chosenmap)
return
ticker.maprotatechecked = 1
var/datum/map_config/VM = maprotatechoices[chosenmap]
message_admins("[key_name_admin(usr)] is changing the map to [VM.map_name]")
log_admin("[key_name(usr)] is changing the map to [VM.map_name]")
if (SSmapping.changemap(VM) == 0)
message_admins("[key_name_admin(usr)] has changed the map to [VM.map_name]")