diff --git a/code/_helpers/global_lists.dm b/code/_helpers/global_lists.dm
index 557348ff06..1a482e6d24 100644
--- a/code/_helpers/global_lists.dm
+++ b/code/_helpers/global_lists.dm
@@ -270,7 +270,7 @@ GLOBAL_LIST_EMPTY(mannequins)
/*
// Custom species traits
- paths = subtypesof(/datum/trait) - /datum/trait
+ paths = subtypesof(/datum/trait)
for(var/path in paths)
var/datum/trait/instance = new path()
if(!instance.name)
diff --git a/code/_helpers/global_lists_vr.dm b/code/_helpers/global_lists_vr.dm
index 87cd24a36f..1f5b6d41ae 100644
--- a/code/_helpers/global_lists_vr.dm
+++ b/code/_helpers/global_lists_vr.dm
@@ -510,7 +510,7 @@ var/global/list/remainless_species = list(SPECIES_PROMETHEAN,
var/paths
// Custom Hair Accessories
- paths = typesof(/datum/sprite_accessory/hair_accessory) - /datum/sprite_accessory/hair_accessory
+ paths = subtypesof(/datum/sprite_accessory/hair_accessory)
for(var/path in paths)
var/datum/sprite_accessory/hair_accessory/instance = new path()
hair_accesories_list[path] = instance
@@ -544,14 +544,14 @@ var/global/list/remainless_species = list(SPECIES_PROMETHEAN,
// Weaver recipe stuff
- paths = typesof(/datum/weaver_recipe/structure) - /datum/weaver_recipe/structure
+ paths = subtypesof(/datum/weaver_recipe/structure)
for(var/path in paths)
var/datum/weaver_recipe/instance = new path()
if(!instance.title)
continue //A prototype or something
weavable_structures[instance.title] = instance
- paths = typesof(/datum/weaver_recipe/item) - /datum/weaver_recipe/item
+ paths = subtypesof(/datum/weaver_recipe/item)
for(var/path in paths)
var/datum/weaver_recipe/instance = new path()
if(!instance.title)
diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm
index 84eb483b29..21acf2c577 100644
--- a/code/controllers/configuration.dm
+++ b/code/controllers/configuration.dm
@@ -298,7 +298,7 @@ var/list/gamemode_cache = list()
var/static/list/jukebox_track_files
/datum/configuration/New()
- var/list/L = typesof(/datum/game_mode) - /datum/game_mode
+ var/list/L = subtypesof(/datum/game_mode)
for (var/T in L)
// I wish I didn't have to instance the game modes in order to look up
// their information, but it is the only way (at least that I know of).
diff --git a/code/controllers/subsystems/events.dm b/code/controllers/subsystems/events.dm
index 5b613775e4..83ab2fa00c 100644
--- a/code/controllers/subsystems/events.dm
+++ b/code/controllers/subsystems/events.dm
@@ -13,7 +13,7 @@ SUBSYSTEM_DEF(events)
var/datum/event_meta/new_event = new
/datum/controller/subsystem/events/Initialize()
- allEvents = typesof(/datum/event) - /datum/event
+ allEvents = subtypesof(/datum/event)
event_containers = list(
EVENT_LEVEL_MUNDANE = new/datum/event_container/mundane,
EVENT_LEVEL_MODERATE = new/datum/event_container/moderate,
diff --git a/code/controllers/subsystems/plants.dm b/code/controllers/subsystems/plants.dm
index 1959709174..072f261a01 100644
--- a/code/controllers/subsystems/plants.dm
+++ b/code/controllers/subsystems/plants.dm
@@ -62,7 +62,7 @@ SUBSYSTEM_DEF(plants)
accessible_product_sprites |= base
// Populate the global seed datum list.
- for(var/type in typesof(/datum/seed)-/datum/seed)
+ for(var/type in subtypesof(/datum/seed))
var/datum/seed/S = new type
seeds[S.name] = S
S.uid = "[seeds.len]"
diff --git a/code/game/antagonist/_antagonist_setup.dm b/code/game/antagonist/_antagonist_setup.dm
index 6f514b9413..c1e5002e74 100644
--- a/code/game/antagonist/_antagonist_setup.dm
+++ b/code/game/antagonist/_antagonist_setup.dm
@@ -46,7 +46,7 @@ var/global/list/antag_names_to_ids = list()
antag.update_all_icons()
/proc/populate_antag_type_list()
- for(var/antag_type in typesof(/datum/antagonist)-/datum/antagonist)
+ for(var/antag_type in subtypesof(/datum/antagonist))
var/datum/antagonist/A = new antag_type
all_antag_types[A.id] = A
all_antag_spawnpoints[A.landmark_id] = list()
diff --git a/code/game/antagonist/mutiny/mutineer.dm b/code/game/antagonist/mutiny/mutineer.dm
index 480fc83c70..85aecd71ea 100644
--- a/code/game/antagonist/mutiny/mutineer.dm
+++ b/code/game/antagonist/mutiny/mutineer.dm
@@ -54,7 +54,7 @@ var/datum/antagonist/mutineer/mutineers
proc/get_directive_candidates()
var/list/candidates[0]
- for(var/T in typesof(/datum/directive) - /datum/directive)
+ for(var/T in subtypesof(/datum/directive))
var/datum/directive/D = new T(src)
if (D.meets_prerequisites())
candidates.Add(D)
diff --git a/code/game/gamemodes/changeling/modularchangling.dm b/code/game/gamemodes/changeling/modularchangling.dm
index c6af89ad75..5563d4f01b 100644
--- a/code/game/gamemodes/changeling/modularchangling.dm
+++ b/code/game/gamemodes/changeling/modularchangling.dm
@@ -2,7 +2,7 @@
//Ling power's evolution menu entry datum should be contained alongside the mob proc for the actual power, in their own file.
-var/list/powers = typesof(/datum/power/changeling) - /datum/power/changeling //needed for the badmin verb for now
+var/list/powers = subtypesof(/datum/power/changeling) //needed for the badmin verb for now
var/list/datum/power/changeling/powerinstances = list()
/datum/power //Could be used by other antags too
diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm
index 74f590a848..b95ddde1ab 100644
--- a/code/game/gamemodes/sandbox/h_sandbox.dm
+++ b/code/game/gamemodes/sandbox/h_sandbox.dm
@@ -107,7 +107,7 @@ mob
hsb.loc = usr.loc
to_chat(usr, "Sandbox: Created an airlock.")
if("hsbcanister")
- var/list/hsbcanisters = typesof(/obj/machinery/portable_atmospherics/canister/) - /obj/machinery/portable_atmospherics/canister/
+ var/list/hsbcanisters = subtypesof(/obj/machinery/portable_atmospherics/canister)
var/hsbcanister = tgui_input_list(usr, "Choose a canister to spawn:", "Sandbox", hsbcanisters)
if(hsbcanister)
new hsbcanister(usr.loc)
diff --git a/code/game/gamemodes/technomancer/catalog.dm b/code/game/gamemodes/technomancer/catalog.dm
index 7d0ddc6c2e..5dd0d64310 100644
--- a/code/game/gamemodes/technomancer/catalog.dm
+++ b/code/game/gamemodes/technomancer/catalog.dm
@@ -4,10 +4,10 @@
#define UTILITY_SPELLS "Utility"
#define SUPPORT_SPELLS "Support"
-var/list/all_technomancer_spells = typesof(/datum/technomancer/spell) - /datum/technomancer/spell
-var/list/all_technomancer_equipment = typesof(/datum/technomancer/equipment) - /datum/technomancer/equipment
-var/list/all_technomancer_consumables = typesof(/datum/technomancer/consumable) - /datum/technomancer/consumable
-var/list/all_technomancer_assistance = typesof(/datum/technomancer/assistance) - /datum/technomancer/assistance
+var/list/all_technomancer_spells = subtypesof(/datum/technomancer/spell)
+var/list/all_technomancer_equipment = subtypesof(/datum/technomancer/equipment)
+var/list/all_technomancer_consumables = subtypesof(/datum/technomancer/consumable)
+var/list/all_technomancer_assistance = subtypesof(/datum/technomancer/assistance)
/datum/technomancer
var/name = "technomancer thing"
diff --git a/code/game/machinery/frame.dm b/code/game/machinery/frame.dm
index d390cb4e52..6a593ab554 100644
--- a/code/game/machinery/frame.dm
+++ b/code/game/machinery/frame.dm
@@ -5,7 +5,7 @@
//Create global frame type list if it hasn't been made already.
construction_frame_wall = list()
construction_frame_floor = list()
- for(var/R in typesof(/datum/frame/frame_types) - /datum/frame/frame_types)
+ for(var/R in subtypesof(/datum/frame/frame_types))
var/datum/frame/frame_types/type = new R
if(type.frame_style == FRAME_STYLE_WALL)
construction_frame_wall += type
diff --git a/code/game/machinery/partslathe_vr.dm b/code/game/machinery/partslathe_vr.dm
index 232fe56f5c..77eefb94c9 100644
--- a/code/game/machinery/partslathe_vr.dm
+++ b/code/game/machinery/partslathe_vr.dm
@@ -354,7 +354,7 @@
/obj/machinery/partslathe/proc/update_recipe_list()
if(!partslathe_recipies)
partslathe_recipies = list()
- var/list/paths = typesof(/obj/item/weapon/stock_parts)-/obj/item/weapon/stock_parts
+ var/list/paths = subtypesof(/obj/item/weapon/stock_parts)
for(var/type in paths)
var/obj/item/weapon/stock_parts/I = new type()
if(getHighestOriginTechLevel(I) > 1)
diff --git a/code/game/periodic_news.dm b/code/game/periodic_news.dm
index a3d89313c5..a5eb2042be 100644
--- a/code/game/periodic_news.dm
+++ b/code/game/periodic_news.dm
@@ -109,7 +109,7 @@ var/global/list/newscaster_standard_feeds = list(/datum/news_announcement/bluesp
var/global/tmp/announced_news_types = list()
/proc/check_for_newscaster_updates(type)
- for(var/subtype in typesof(type)-type)
+ for(var/subtype in subtypesof(type))
var/datum/news_announcement/news = new subtype()
if(news.round_time * 10 <= world.time && !(subtype in announced_news_types))
announced_news_types += subtype
diff --git a/code/modules/admin/admin_secrets.dm b/code/modules/admin/admin_secrets.dm
index 89f032071c..e8ab89101c 100644
--- a/code/modules/admin/admin_secrets.dm
+++ b/code/modules/admin/admin_secrets.dm
@@ -12,7 +12,7 @@ var/datum/admin_secrets/admin_secrets = new()
for(var/datum/admin_secret_category/category in categories)
category_assoc[category.type] = category
- for(var/item_type in (typesof(/datum/admin_secret_item) - /datum/admin_secret_item))
+ for(var/item_type in subtypesof(/datum/admin_secret_item))
var/datum/admin_secret_item/secret_item = item_type
if(!initial(secret_item.name))
continue
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index fd11766653..e9d63621b0 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -302,7 +302,7 @@
to_chat(usr, "Looks like you didn't select a mob.")
return
- var/list/possible_modifiers = typesof(/datum/modifier) - /datum/modifier
+ var/list/possible_modifiers = subtypesof(/datum/modifier)
var/new_modifier_type = tgui_input_list(usr, "What modifier should we add to [L]?", "Modifier Type", possible_modifiers)
if(!new_modifier_type)
diff --git a/code/modules/awaymissions/loot_vr.dm b/code/modules/awaymissions/loot_vr.dm
index 4f3b19aaca..7f4eeaf3a1 100644
--- a/code/modules/awaymissions/loot_vr.dm
+++ b/code/modules/awaymissions/loot_vr.dm
@@ -63,7 +63,7 @@
//credits
var/amount = rand(2,6)
var/list/possible_spawns = list()
- for(var/cash_type in typesof(/obj/item/weapon/spacecash) - /obj/item/weapon/spacecash)
+ for(var/cash_type in subtypesof(/obj/item/weapon/spacecash))
possible_spawns += cash_type
var/cash_type = pick(possible_spawns)
diff --git a/code/modules/busy_space/loremaster.dm b/code/modules/busy_space/loremaster.dm
index 28dca0055b..9c2f0f55b4 100644
--- a/code/modules/busy_space/loremaster.dm
+++ b/code/modules/busy_space/loremaster.dm
@@ -7,7 +7,7 @@ var/datum/lore/loremaster/loremaster = new/datum/lore/loremaster
/datum/lore/loremaster/New()
- var/list/paths = typesof(/datum/lore/organization) - /datum/lore/organization
+ var/list/paths = subtypesof(/datum/lore/organization)
for(var/path in paths)
// Some intermediate paths are not real organizations (ex. /datum/lore/organization/mil). Only do ones with names
var/datum/lore/organization/instance = path
diff --git a/code/modules/busy_space_vr/loremaster.dm b/code/modules/busy_space_vr/loremaster.dm
index 28dca0055b..9c2f0f55b4 100644
--- a/code/modules/busy_space_vr/loremaster.dm
+++ b/code/modules/busy_space_vr/loremaster.dm
@@ -7,7 +7,7 @@ var/datum/lore/loremaster/loremaster = new/datum/lore/loremaster
/datum/lore/loremaster/New()
- var/list/paths = typesof(/datum/lore/organization) - /datum/lore/organization
+ var/list/paths = subtypesof(/datum/lore/organization)
for(var/path in paths)
// Some intermediate paths are not real organizations (ex. /datum/lore/organization/mil). Only do ones with names
var/datum/lore/organization/instance = path
diff --git a/code/modules/client/preference_setup/loadout/loadout_general.dm b/code/modules/client/preference_setup/loadout/loadout_general.dm
index 5ee5ab3537..8b566fe3c9 100644
--- a/code/modules/client/preference_setup/loadout/loadout_general.dm
+++ b/code/modules/client/preference_setup/loadout/loadout_general.dm
@@ -53,7 +53,7 @@
/datum/gear/plushie/New()
..()
var/list/plushies = list()
- for(var/obj/item/toy/plushie/plushie_type as anything in subtypesof(/obj/item/toy/plushie/) - /obj/item/toy/plushie/therapy)
+ for(var/obj/item/toy/plushie/plushie_type as anything in subtypesof(/obj/item/toy/plushie) - /obj/item/toy/plushie/therapy)
plushies[initial(plushie_type.name)] = plushie_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(plushies))
@@ -65,7 +65,7 @@
/datum/gear/figure/New()
..()
var/list/figures = list()
- for(var/obj/item/toy/figure/figure_type as anything in typesof(/obj/item/toy/figure/) - /obj/item/toy/figure)
+ for(var/obj/item/toy/figure/figure_type as anything in subtypesof(/obj/item/toy/figure))
figures[initial(figure_type.name)] = figure_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(figures))
diff --git a/code/modules/client/preference_setup/loadout/loadout_general_vr.dm b/code/modules/client/preference_setup/loadout/loadout_general_vr.dm
index 8196032233..9b72d27aba 100644
--- a/code/modules/client/preference_setup/loadout/loadout_general_vr.dm
+++ b/code/modules/client/preference_setup/loadout/loadout_general_vr.dm
@@ -18,7 +18,7 @@
/datum/gear/character/New()
..()
var/list/characters = list()
- for(var/obj/item/toy/character/character_type as anything in typesof(/obj/item/toy/character/) - /obj/item/toy/character)
+ for(var/obj/item/toy/character/character_type as anything in subtypesof(/obj/item/toy/character))
characters[initial(character_type.name)] = character_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(characters))
@@ -30,7 +30,7 @@
/datum/gear/mechtoy/New()
..()
var/list/mechs = list()
- for(var/obj/item/toy/mecha/mech_type as anything in typesof(/obj/item/toy/mecha/) - /obj/item/toy/mecha/)
+ for(var/obj/item/toy/mecha/mech_type as anything in subtypesof(/obj/item/toy/mecha))
mechs[initial(mech_type.name)] = mech_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(mechs))
diff --git a/code/modules/client/preferences_spawnpoints.dm b/code/modules/client/preferences_spawnpoints.dm
index 06f7aa5e06..455be8a8b8 100644
--- a/code/modules/client/preferences_spawnpoints.dm
+++ b/code/modules/client/preferences_spawnpoints.dm
@@ -2,7 +2,7 @@ var/list/spawntypes = list()
/proc/populate_spawn_points()
spawntypes = list()
- for(var/type in typesof(/datum/spawnpoint)-/datum/spawnpoint)
+ for(var/type in subtypesof(/datum/spawnpoint))
var/datum/spawnpoint/S = new type()
spawntypes[S.display_name] = S
diff --git a/code/modules/economy/economy_misc.dm b/code/modules/economy/economy_misc.dm
index a44c7c03fd..1b029ac74a 100644
--- a/code/modules/economy/economy_misc.dm
+++ b/code/modules/economy/economy_misc.dm
@@ -60,7 +60,7 @@ var/global/economy_init = 0
news_network.CreateFeedChannel("The Gibson Gazette", "Editor Mike Hammers", 1, 1)
news_network.CreateFeedChannel("Oculum Content Aggregator", "Oculus v6rev7", 1, 1)
- for(var/loc_type in typesof(/datum/trade_destination) - /datum/trade_destination)
+ for(var/loc_type in subtypesof(/datum/trade_destination))
var/datum/trade_destination/D = new loc_type
weighted_randomevent_locations[D] = D.viable_random_events.len
weighted_mundaneevent_locations[D] = D.mundane_probability
diff --git a/code/modules/events/supply_demand_vr.dm b/code/modules/events/supply_demand_vr.dm
index 64d402c443..6e229e1b48 100644
--- a/code/modules/events/supply_demand_vr.dm
+++ b/code/modules/events/supply_demand_vr.dm
@@ -252,7 +252,7 @@
//
/datum/event/supply_demand/proc/choose_food_items(var/differentTypes)
- var/list/types = typesof(/datum/recipe) - /datum/recipe
+ var/list/types = subtypesof(/datum/recipe)
for(var/i in 1 to differentTypes)
var/datum/recipe/R = pick(types)
types -= R // Don't pick the same thing twice
@@ -262,7 +262,7 @@
return
/datum/event/supply_demand/proc/choose_research_items(var/differentTypes)
- var/list/types = typesof(/datum/design) - /datum/design
+ var/list/types = subtypesof(/datum/design)
for(var/i in 1 to differentTypes)
var/datum/design/D = pick(types)
types -= D // Don't pick the same thing twice
@@ -327,7 +327,7 @@
return
/datum/event/supply_demand/proc/choose_alloy_items(var/differentTypes)
- var/list/types = typesof(/datum/alloy) - /datum/alloy
+ var/list/types = subtypesof(/datum/alloy)
for(var/i in 1 to differentTypes)
var/datum/alloy/A = pick(types)
types -= A // Don't pick the same thing twice
diff --git a/code/modules/food/kitchen/microwave.dm b/code/modules/food/kitchen/microwave.dm
index 1611f9ac77..b781c4473b 100644
--- a/code/modules/food/kitchen/microwave.dm
+++ b/code/modules/food/kitchen/microwave.dm
@@ -43,7 +43,7 @@
if(!available_recipes)
available_recipes = new
- for(var/datum/recipe/type as anything in (typesof(/datum/recipe)-/datum/recipe))
+ for(var/datum/recipe/type as anything in subtypesof(/datum/recipe))
if((initial(type.appliance) & appliancetype))
available_recipes += new type
diff --git a/code/modules/food/recipe_dump.dm b/code/modules/food/recipe_dump.dm
index 63dc510eb9..dffce315e4 100644
--- a/code/modules/food/recipe_dump.dm
+++ b/code/modules/food/recipe_dump.dm
@@ -15,7 +15,7 @@
"Catalysts" = CR.catalysts)
//////////////////////// FOOD
- var/list/food_recipes = typesof(/datum/recipe) - /datum/recipe
+ var/list/food_recipes = subtypesof(/datum/recipe)
//Build a useful list
for(var/Rp in food_recipes)
//Lists don't work with datum-stealing no-instance initial() so we have to.
diff --git a/code/modules/genetics/side_effects.dm b/code/modules/genetics/side_effects.dm
index 498aff20d0..958f05d5ac 100644
--- a/code/modules/genetics/side_effects.dm
+++ b/code/modules/genetics/side_effects.dm
@@ -67,7 +67,7 @@
/proc/trigger_side_effect(mob/living/carbon/human/H)
spawn
if(!istype(H)) return
- var/tp = pick(typesof(/datum/genetics/side_effect) - /datum/genetics/side_effect)
+ var/tp = pick(subtypesof(/datum/genetics/side_effect))
var/datum/genetics/side_effect/S = new tp
S.start(H)
diff --git a/code/modules/mining/abandonedcrates.dm b/code/modules/mining/abandonedcrates.dm
index 199b1ed0d0..2896f7feea 100644
--- a/code/modules/mining/abandonedcrates.dm
+++ b/code/modules/mining/abandonedcrates.dm
@@ -58,7 +58,7 @@
if(53 to 54)
new/obj/item/latexballon(src)
if(55 to 56)
- var/newitem = pick(typesof(/obj/item/toy/mecha) - /obj/item/toy/mecha)
+ var/newitem = pick(subtypesof(/obj/item/toy/mecha))
new newitem(src)
if(57 to 58)
new/obj/item/toy/syndicateballoon(src)
@@ -77,7 +77,7 @@
if(67 to 68)
var/t = rand(4,7)
for(var/i = 0, i < t, ++i)
- var/newitem = pick(typesof(/obj/item/weapon/stock_parts) - /obj/item/weapon/stock_parts - /obj/item/weapon/stock_parts/subspace)
+ var/newitem = pick(subtypesof(/obj/item/weapon/stock_parts) - /obj/item/weapon/stock_parts/subspace)
new newitem(src)
if(69 to 70)
new/obj/item/weapon/pickaxe/silver(src)
diff --git a/code/modules/mob/living/carbon/human/MedicalSideEffects.dm b/code/modules/mob/living/carbon/human/MedicalSideEffects.dm
index 9af2957074..6946f26a80 100644
--- a/code/modules/mob/living/carbon/human/MedicalSideEffects.dm
+++ b/code/modules/mob/living/carbon/human/MedicalSideEffects.dm
@@ -56,7 +56,7 @@
if(life_tick % 15 != 0)
return 0
- var/list/L = typesof(/datum/medical_effect)-/datum/medical_effect
+ var/list/L = subtypesof(/datum/medical_effect)
for(var/T in L)
var/datum/medical_effect/M = new T
if (M.manifest(src))
diff --git a/code/modules/mob/living/carbon/human/chem_side_effects.dm b/code/modules/mob/living/carbon/human/chem_side_effects.dm
index 9af2957074..6946f26a80 100644
--- a/code/modules/mob/living/carbon/human/chem_side_effects.dm
+++ b/code/modules/mob/living/carbon/human/chem_side_effects.dm
@@ -56,7 +56,7 @@
if(life_tick % 15 != 0)
return 0
- var/list/L = typesof(/datum/medical_effect)-/datum/medical_effect
+ var/list/L = subtypesof(/datum/medical_effect)
for(var/T in L)
var/datum/medical_effect/M = new T
if (M.manifest(src))
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 54544145f1..5c3cfef731 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -751,7 +751,7 @@
update_eyes()
// hair
- var/list/all_hairs = typesof(/datum/sprite_accessory/hair) - /datum/sprite_accessory/hair
+ var/list/all_hairs = subtypesof(/datum/sprite_accessory/hair)
var/list/hairs = list()
// loop through potential hairs
@@ -767,7 +767,7 @@
h_style = new_style
// facial hair
- var/list/all_fhairs = typesof(/datum/sprite_accessory/facial_hair) - /datum/sprite_accessory/facial_hair
+ var/list/all_fhairs = subtypesof(/datum/sprite_accessory/facial_hair)
var/list/fhairs = list()
for(var/x in all_fhairs)
diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm
index cad5229097..3a98a5bea3 100644
--- a/code/modules/mob/living/silicon/pai/software.dm
+++ b/code/modules/mob/living/silicon/pai/software.dm
@@ -21,7 +21,7 @@ var/global/list/pai_software_by_key = list()
var/global/list/default_pai_software = list()
/hook/startup/proc/populate_pai_software_list()
var/r = 1 // I would use ., but it'd sacrifice runtime detection
- for(var/type in typesof(/datum/pai_software) - /datum/pai_software)
+ for(var/type in subtypesof(/datum/pai_software))
var/datum/pai_software/P = new type()
if(pai_software_by_key[P.id])
var/datum/pai_software/O = pai_software_by_key[P.id]
diff --git a/code/modules/mob/new_player/skill.dm b/code/modules/mob/new_player/skill.dm
index a24da0e4ba..e1a0b50b7f 100644
--- a/code/modules/mob/new_player/skill.dm
+++ b/code/modules/mob/new_player/skill.dm
@@ -159,7 +159,7 @@ var/global/list/SKILL_PRE = list("Engineer" = SKILL_ENGINEER, "Roboticist" = SKI
/proc/setup_skills()
if(SKILLS == null)
SKILLS = list()
- for(var/T in (typesof(/datum/skill)-/datum/skill))
+ for(var/T in subtypesof(/datum/skill))
var/datum/skill/S = new T
if(S.ID != "none")
if(!SKILLS.Find(S.field))
diff --git a/code/modules/power/fusion/fusion_reactions.dm b/code/modules/power/fusion/fusion_reactions.dm
index b49fa564bc..54d72b11e8 100644
--- a/code/modules/power/fusion/fusion_reactions.dm
+++ b/code/modules/power/fusion/fusion_reactions.dm
@@ -17,7 +17,8 @@ var/list/fusion_reactions
/proc/get_fusion_reaction(var/p_react, var/s_react, var/m_energy)
if(!fusion_reactions)
fusion_reactions = list()
- for(var/rtype in typesof(/decl/fusion_reaction) - /decl/fusion_reaction)
+ for(var/rtype in subtypesof(/decl/fusion_reaction)
+ )
var/decl/fusion_reaction/cur_reaction = new rtype()
if(!fusion_reactions[cur_reaction.p_react])
fusion_reactions[cur_reaction.p_react] = list()
diff --git a/code/modules/random_map/drop/droppod.dm b/code/modules/random_map/drop/droppod.dm
index e63c31b1a5..31a575212c 100644
--- a/code/modules/random_map/drop/droppod.dm
+++ b/code/modules/random_map/drop/droppod.dm
@@ -158,7 +158,7 @@
var/mob/living/spawned_mob
var/list/spawned_mobs = list()
- var/spawn_path = tgui_input_list(usr, "Select a mob type.", "Drop Pod Selection", typesof(/mob/living)-/mob/living)
+ var/spawn_path = tgui_input_list(usr, "Select a mob type.", "Drop Pod Selection", subtypesof(/mob/living))
if(!spawn_path)
return
diff --git a/code/modules/random_map/drop/supply.dm b/code/modules/random_map/drop/supply.dm
index 912542d654..d1cc04211d 100644
--- a/code/modules/random_map/drop/supply.dm
+++ b/code/modules/random_map/drop/supply.dm
@@ -55,14 +55,14 @@
choice = tgui_alert(usr, "Do you wish to add structures or machines?","Supply Drop",list("No","Yes"))
if(choice == "Yes")
while(1)
- var/adding_loot_type = tgui_input_list(usr, "Select a new loot path. Cancel to finish.", "Loot Selection", typesof(/obj) - typesof(/obj/item))
+ var/adding_loot_type = tgui_input_list(usr, "Select a new loot path. Cancel to finish.", "Loot Selection", subtypesof(/obj))
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
choice = tgui_alert(usr, "Do you wish to add any non-weapon items?","Supply Drop",list("No","Yes"))
if(choice == "Yes")
while(1)
- var/adding_loot_type = tgui_input_list(usr, "Select a new loot path. Cancel to finish.", "Loot Selection", typesof(/obj/item) - typesof(/obj/item/weapon))
+ var/adding_loot_type = tgui_input_list(usr, "Select a new loot path. Cancel to finish.", "Loot Selection", subtypesof(/obj/item))
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
diff --git a/code/modules/random_map/noise/desert.dm b/code/modules/random_map/noise/desert.dm
index 0264d2a781..ccb768ce3a 100644
--- a/code/modules/random_map/noise/desert.dm
+++ b/code/modules/random_map/noise/desert.dm
@@ -24,14 +24,14 @@
switch(val)
if(2 to 3)
if(prob(60))
- var/grass_path = pick(typesof(/obj/structure/flora/grass)-/obj/structure/flora/grass)
+ var/grass_path = pick(subtypesof(/obj/structure/flora/grass))
new grass_path(T)
if(prob(5))
var/mob_type = pick(list(/mob/living/simple_mob/animal/passive/lizard, /mob/living/simple_mob/animal/passive/mouse))
new mob_type(T)
if(5 to 6)
if(prob(20))
- var/grass_path = pick(typesof(/obj/structure/flora/grass)-/obj/structure/flora/grass)
+ var/grass_path = pick(subtypesof(/obj/structure/flora/grass))
new grass_path(T)
if(7 to 9)
if(prob(60))
diff --git a/code/modules/random_map/random_map_verbs.dm b/code/modules/random_map/random_map_verbs.dm
index c4d572d23f..ff93b73b09 100644
--- a/code/modules/random_map/random_map_verbs.dm
+++ b/code/modules/random_map/random_map_verbs.dm
@@ -36,7 +36,7 @@
if(!holder) return
- var/map_datum = tgui_input_list(usr, "Choose a map to create.", "Map Choice", typesof(/datum/random_map)-/datum/random_map)
+ var/map_datum = tgui_input_list(usr, "Choose a map to create.", "Map Choice", subtypesof(/datum/random_map))
if(!map_datum)
return
diff --git a/code/modules/reagents/reactions/instant/instant_vr.dm b/code/modules/reagents/reactions/instant/instant_vr.dm
index 31e5fb7bc2..a1ea2aee0c 100644
--- a/code/modules/reagents/reactions/instant/instant_vr.dm
+++ b/code/modules/reagents/reactions/instant/instant_vr.dm
@@ -208,7 +208,8 @@
result_amount = 1
/decl/chemical_reaction/instant/slime_food/on_reaction(var/datum/reagents/holder)
- var/list/borks = typesof(/obj/item/weapon/reagent_containers/food/snacks) - /obj/item/weapon/reagent_containers/food/snacks // BORK BORK BORK
+ var/list/borks = subtypesof(/obj/item/weapon/reagent_containers/food/snacks)
+
playsound(holder.my_atom, 'sound/effects/phasein.ogg', 100, 1)
diff --git a/code/modules/research/research.dm b/code/modules/research/research.dm
index 2fa527f9ca..81ee392a8b 100644
--- a/code/modules/research/research.dm
+++ b/code/modules/research/research.dm
@@ -52,12 +52,12 @@ GLOBAL_LIST_INIT(design_datums, list())
/datum/research/New() //Insert techs into possible_tech here. Known_tech automatically updated.
if(!LAZYLEN(GLOB.design_datums))
- for(var/T in typesof(/datum/design) - /datum/design)
+ for(var/T in subtypesof(/datum/design))
GLOB.design_datums += new T
possible_designs = GLOB.design_datums
if(!LAZYLEN(known_tech))
- for(var/T in typesof(/datum/tech) - /datum/tech)
+ for(var/T in subtypesof(/datum/tech))
known_tech += new T
RefreshResearch()
diff --git a/code/modules/resleeving/infomorph.dm b/code/modules/resleeving/infomorph.dm
index 7ba0858334..584ea22aac 100644
--- a/code/modules/resleeving/infomorph.dm
+++ b/code/modules/resleeving/infomorph.dm
@@ -447,7 +447,7 @@ var/global/list/infomorph_software_by_key = list()
var/global/list/default_infomorph_software = list()
/hook/startup/proc/populate_infomorph_software_list()
var/r = 1 // I would use ., but it'd sacrifice runtime detection
- for(var/type in typesof(/datum/infomorph_software) - /datum/infomorph_software)
+ for(var/type in subtypesof(/datum/infomorph_software))
var/datum/infomorph_software/P = new type()
if(infomorph_software_by_key[P.id])
var/datum/infomorph_software/O = infomorph_software_by_key[P.id]
diff --git a/code/modules/shuttles/web_datums.dm b/code/modules/shuttles/web_datums.dm
index 6e34d3750b..d061ebe397 100644
--- a/code/modules/shuttles/web_datums.dm
+++ b/code/modules/shuttles/web_datums.dm
@@ -193,7 +193,7 @@
/datum/shuttle_web_master/proc/build_destinations()
// First, instantiate all the destination subtypes relevant to this datum.
- var/list/destination_types = typesof(destination_class) - destination_class
+ var/list/destination_types = subtypesof(destination_class)
for(var/new_type in destination_types)
var/datum/shuttle_destination/D = new_type
if(initial(D.skip_me))
diff --git a/code/modules/tgs/v3210/commands.dm b/code/modules/tgs/v3210/commands.dm
index 6cced05cb1..fe33018c13 100644
--- a/code/modules/tgs/v3210/commands.dm
+++ b/code/modules/tgs/v3210/commands.dm
@@ -8,7 +8,7 @@
var/list/command_name_types = list()
var/list/warned_command_names = warnings_only ? list() : null
var/warned_about_the_dangers_of_robutussin = !warnings_only
- for(var/I in typesof(/datum/tgs_chat_command) - /datum/tgs_chat_command)
+ for(var/I in subtypesof(/datum/tgs_chat_command))
if(!warned_about_the_dangers_of_robutussin)
TGS_ERROR_LOG("Custom chat commands in [ApiVersion()] lacks the /datum/tgs_chat_user/sender.channel field!")
warned_about_the_dangers_of_robutussin = TRUE
diff --git a/code/modules/tgs/v4/commands.dm b/code/modules/tgs/v4/commands.dm
index 1d9951bc04..8d283b4cd5 100644
--- a/code/modules/tgs/v4/commands.dm
+++ b/code/modules/tgs/v4/commands.dm
@@ -1,7 +1,7 @@
/datum/tgs_api/v4/proc/ListCustomCommands()
var/results = list()
custom_commands = list()
- for(var/I in typesof(/datum/tgs_chat_command) - /datum/tgs_chat_command)
+ for(var/I in subtypesof(/datum/tgs_chat_command))
var/datum/tgs_chat_command/stc = new I
var/command_name = stc.name
if(!command_name || findtext(command_name, " ") || findtext(command_name, "'") || findtext(command_name, "\""))
diff --git a/code/modules/tgs/v5/commands.dm b/code/modules/tgs/v5/commands.dm
index 2775157656..70db4333dd 100644
--- a/code/modules/tgs/v5/commands.dm
+++ b/code/modules/tgs/v5/commands.dm
@@ -1,7 +1,7 @@
/datum/tgs_api/v5/proc/ListCustomCommands()
var/results = list()
custom_commands = list()
- for(var/I in typesof(/datum/tgs_chat_command) - /datum/tgs_chat_command)
+ for(var/I in subtypesof(/datum/tgs_chat_command))
var/datum/tgs_chat_command/stc = new I
var/command_name = stc.name
if(!command_name || findtext(command_name, " ") || findtext(command_name, "'") || findtext(command_name, "\""))
diff --git a/code/modules/xenoarcheaology/artifacts/artifact.dm b/code/modules/xenoarcheaology/artifacts/artifact.dm
index bbf54ed469..e723561a73 100644
--- a/code/modules/xenoarcheaology/artifacts/artifact.dm
+++ b/code/modules/xenoarcheaology/artifacts/artifact.dm
@@ -33,11 +33,11 @@
secondary_effect.ToggleActivate(0)
else
- var/effecttype = pick(typesof(/datum/artifact_effect) - /datum/artifact_effect)
+ var/effecttype = pick(subtypesof(/datum/artifact_effect))
my_effect = new effecttype(src)
if(prob(75))
- effecttype = pick(typesof(/datum/artifact_effect) - /datum/artifact_effect)
+ effecttype = pick(subtypesof(/datum/artifact_effect))
secondary_effect = new effecttype(src)
if(prob(75))
secondary_effect.ToggleActivate(0)
@@ -85,11 +85,11 @@
secondary_effect.trigger = predefined_trig_secondary
/obj/machinery/artifact/proc/choose_effect()
- var/effect_type = tgui_input_list(usr, "What type do you want?", "Effect Type", typesof(/datum/artifact_effect) - /datum/artifact_effect)
+ var/effect_type = tgui_input_list(usr, "What type do you want?", "Effect Type", subtypesof(/datum/artifact_effect))
if(effect_type)
my_effect = new effect_type(src)
if(tgui_alert(usr, "Do you want a secondary effect?", "Second Effect", list("No", "Yes")) == "Yes")
- var/second_effect_type = tgui_input_list(usr, "What type do you want as well?", "Second Effect Type", typesof(/datum/artifact_effect) - list(/datum/artifact_effect, effect_type))
+ var/second_effect_type = tgui_input_list(usr, "What type do you want as well?", "Second Effect Type", subtypesof(/datum/artifact_effect) - effect_type)
secondary_effect = new second_effect_type(src)
else
secondary_effect = null
diff --git a/code/modules/xenobio2/mob/slime/slime.dm b/code/modules/xenobio2/mob/slime/slime.dm
index 3d52c053d8..a3fca442d5 100644
--- a/code/modules/xenobio2/mob/slime/slime.dm
+++ b/code/modules/xenobio2/mob/slime/slime.dm
@@ -82,7 +82,7 @@ Slime definitions, Life and New live here.
/mob/living/simple_mob/xeno/slime/New()
..()
- for(var/datum/language/L in (typesof(/datum/language) - /datum/language))
+ for(var/datum/language/L in subtypesof(/datum/language))
languages += L
speak += "[station_name()]?"
traitdat.source = "Slime"
diff --git a/code/modules/xgm/xgm_gas_data.dm b/code/modules/xgm/xgm_gas_data.dm
index 4ee3e1c501..42c508c4f6 100644
--- a/code/modules/xgm/xgm_gas_data.dm
+++ b/code/modules/xgm/xgm_gas_data.dm
@@ -29,7 +29,7 @@
/hook/startup/proc/generateGasData()
gas_data = new
- for(var/p in (typesof(/decl/xgm_gas) - /decl/xgm_gas))
+ for(var/p in subtypesof(/decl/xgm_gas))
var/decl/xgm_gas/gas = new p //avoid initial() because of potential New() actions
if(gas.id in gas_data.gases)
diff --git a/code/unit_tests/research_tests.dm b/code/unit_tests/research_tests.dm
index 9d0174cabe..09de5aaca6 100644
--- a/code/unit_tests/research_tests.dm
+++ b/code/unit_tests/research_tests.dm
@@ -47,7 +47,7 @@
/datum/unit_test/research_designs_have_valid_materials/start_test()
var/number_of_issues = 0
- for(var/design_type in typesof(/datum/design) - /datum/design)
+ for(var/design_type in subtypesof(/datum/design))
var/datum/design/design = design_type
if(initial(design.id) == "id")
continue
diff --git a/maps/~map_system/maps.dm b/maps/~map_system/maps.dm
index ce1dedc801..7eb677df5e 100644
--- a/maps/~map_system/maps.dm
+++ b/maps/~map_system/maps.dm
@@ -3,7 +3,7 @@ var/datum/map/using_map = new USING_MAP_DATUM
var/list/all_maps = list()
/hook/startup/proc/initialise_map_list()
- for(var/type in typesof(/datum/map) - /datum/map)
+ for(var/type in subtypesof(/datum/map))
var/datum/map/M
if(type == using_map.type)
M = using_map