mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
Admin "Reload Station" Map Generator - Reloads specified block to roundstart. (#28986)
Badmins: Buildmode map generators have names in the list to select them, instead of paths. Also, a new map generator has been added, repair/reload station. Use it VERY sparingly, it deletes the block of the map and reloads it to roundstart. THIS CAN CAUSE ISSUES WITH MACHINES AND ATMOSPHERICS, SO DO NOT USE IT UNLESS YOU ABSOLUTELY HAVE TO! The reload station one tagged DO NOT USE shouldn't be used as it doesn't delete anything before loading, so if you use it you'll have two copies of things. That can result in a LOT of issues, so don't use it unless you're a codermin and know what you're doing/abusing!
This commit is contained in:
@@ -194,11 +194,14 @@
|
||||
valueholder = input(user,"Enter variable value:" ,"Value") as turf in world
|
||||
if(AREA_BUILDMODE)
|
||||
var/list/gen_paths = subtypesof(/datum/mapGenerator)
|
||||
|
||||
var/type = input(user,"Select Generator Type","Type") as null|anything in gen_paths
|
||||
var/list/options = list()
|
||||
for(var/path in gen_paths)
|
||||
var/datum/mapGenerator/MP = path
|
||||
options[initial(MP.buildmode_name)] = path
|
||||
var/type = input(user,"Select Generator Type","Type") as null|anything in options
|
||||
if(!type) return
|
||||
|
||||
generator_path = type
|
||||
generator_path = options[type]
|
||||
cornerA = null
|
||||
cornerB = null
|
||||
|
||||
@@ -342,7 +345,12 @@
|
||||
if(cornerA && cornerB)
|
||||
if(!generator_path)
|
||||
to_chat(user, "<span class='warning'>Select generator type first.</span>")
|
||||
return
|
||||
var/datum/mapGenerator/G = new generator_path
|
||||
if(istype(G, /datum/mapGenerator/repair/reload_station_map))
|
||||
if(GLOB.reloading_map)
|
||||
to_chat(user, "<span class='boldwarning'>You are already reloading an area! Please wait for it to fully finish loading before trying to load another!</span>")
|
||||
return
|
||||
G.defineRegion(cornerA,cornerB,1)
|
||||
G.generate()
|
||||
cornerA = null
|
||||
|
||||
Reference in New Issue
Block a user