mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
Adds subtypesof(). It's shorthand for typesof(path) - path.
Replaces typesof(path) - path with subtypesof(path) in obvious places. I was a bit conservative, there's probably a few more places that could use this.
This commit is contained in:
@@ -185,7 +185,7 @@
|
||||
if("turf-reference")
|
||||
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as turf in world
|
||||
if(AREA_BUILDMODE)
|
||||
var/list/gen_paths = typesof(/datum/mapGenerator) - /datum/mapGenerator
|
||||
var/list/gen_paths = subtypesof(/datum/mapGenerator)
|
||||
|
||||
var/type = input(usr,"Select Generator Type","Type") as null|anything in gen_paths
|
||||
if(!type) return
|
||||
|
||||
@@ -419,7 +419,7 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
var/global/list/g_fancy_list_of_types = null
|
||||
/proc/get_fancy_list_of_types()
|
||||
if (isnull(g_fancy_list_of_types)) //init
|
||||
var/list/temp = sortList(typesof(/atom) - typesof(/area) - /atom - /atom/movable)
|
||||
var/list/temp = sortList(subtypesof(/atom) - typesof(/area) - /atom/movable)
|
||||
g_fancy_list_of_types = new(temp.len)
|
||||
for(var/type in temp)
|
||||
var/typename = "[type]"
|
||||
@@ -627,7 +627,7 @@ var/global/list/g_fancy_list_of_types = null
|
||||
|
||||
|
||||
var/list/outfits = list("Naked","Custom","As Job...")
|
||||
var/list/paths = typesof(/datum/outfit) - /datum/outfit - typesof(/datum/outfit/job)
|
||||
var/list/paths = subtypesof(/datum/outfit) - typesof(/datum/outfit/job)
|
||||
for(var/path in paths)
|
||||
var/datum/outfit/O = path //not much to initalize here but whatever
|
||||
outfits[initial(O.name)] = path
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/list/organs = list()
|
||||
switch(operation)
|
||||
if("add organ")
|
||||
for(var/path in typesof(/obj/item/organ/internal) - /obj/item/organ/internal)
|
||||
for(var/path in subtypesof(/obj/item/organ/internal))
|
||||
var/dat = replacetext("[path]", "/obj/item/organ/internal/", ":")
|
||||
organs[dat] = path
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
organ.Insert(C)
|
||||
|
||||
if("add implant")
|
||||
for(var/path in typesof(/obj/item/weapon/implant) - /obj/item/weapon/implant)
|
||||
for(var/path in subtypesof(/obj/item/weapon/implant))
|
||||
var/dat = replacetext("[path]", "/obj/item/weapon/implant/", ":")
|
||||
organs[dat] = path
|
||||
|
||||
|
||||
Reference in New Issue
Block a user