diff --git a/code/ATMOSPHERICS/pipes/he_pipes.dm b/code/ATMOSPHERICS/pipes/he_pipes.dm
index 8b1b800830..89ecf1e2bb 100644
--- a/code/ATMOSPHERICS/pipes/he_pipes.dm
+++ b/code/ATMOSPHERICS/pipes/he_pipes.dm
@@ -104,9 +104,7 @@
parent.radiate_heat_to_space(surface, 1)
if(has_buckled_mobs())
- for(var/M in buckled_mobs)
- var/mob/living/L = M
-
+ for(var/mob/living/L as anything in buckled_mobs)
var/hc = pipe_air.heat_capacity()
var/avg_temp = (pipe_air.temperature * hc + L.bodytemperature * 3500) / (hc + 3500)
pipe_air.temperature = avg_temp
diff --git a/code/ZAS/Atom.dm b/code/ZAS/Atom.dm
index 1953c58e9f..06305182b3 100644
--- a/code/ZAS/Atom.dm
+++ b/code/ZAS/Atom.dm
@@ -93,8 +93,7 @@
return AIR_BLOCKED
var/result = 0
- for(var/mm in contents)
- var/atom/movable/M = mm
+ for(var/atom/movable/M as anything in contents)
switch(M.can_atmos_pass)
if(ATMOS_PASS_YES)
continue
diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm
index 1f281d334a..e67d2ad3ac 100644
--- a/code/ZAS/Fire.dm
+++ b/code/ZAS/Fire.dm
@@ -71,8 +71,7 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin
var/fuel_to_remove = used_liquid_fuel/(fuel_objs.len*LIQUIDFUEL_AMOUNT_TO_MOL) //convert back to liquid volume units
- for(var/O in fuel_objs)
- var/obj/effect/decal/cleanable/liquid_fuel/fuel = O
+ for(var/obj/effect/decal/cleanable/liquid_fuel/fuel as anything in fuel_objs)
if(!istype(fuel))
fuel_objs -= fuel
continue
diff --git a/code/_helpers/_lists.dm b/code/_helpers/_lists.dm
index d71897c466..c359227f05 100644
--- a/code/_helpers/_lists.dm
+++ b/code/_helpers/_lists.dm
@@ -127,22 +127,19 @@
//returns a new list with only atoms that are in typecache L
/proc/typecache_filter_list(list/atoms, list/typecache)
. = list()
- for(var/thing in atoms)
- var/atom/A = thing
+ for(var/atom/A as anything in atoms)
if(typecache[A.type])
. += A
/proc/typecache_filter_list_reverse(list/atoms, list/typecache)
. = list()
- for(var/thing in atoms)
- var/atom/A = thing
+ for(var/atom/A as anything in atoms)
if(!typecache[A.type])
. += A
/proc/typecache_filter_multi_list_exclusion(list/atoms, list/typecache_include, list/typecache_exclude)
. = list()
- for(var/thing in atoms)
- var/atom/A = thing
+ for(var/atom/A as anything in atoms)
if(typecache_include[A.type] && !typecache_exclude[A.type])
. += A
diff --git a/code/_helpers/game.dm b/code/_helpers/game.dm
index 179f7251d9..ac38f40302 100644
--- a/code/_helpers/game.dm
+++ b/code/_helpers/game.dm
@@ -226,8 +226,7 @@ var/mobs_radio_range_fired = 1 //CHOMPEdit
. = list()
// Returns a list of mobs who can hear any of the radios given in @radios
var/list/speaker_coverage = list()
- for(var/r in radios)
- var/obj/item/device/radio/R = r // You better fucking be a radio.
+ for(var/obj/item/device/radio/R as anything in radios)
var/turf/speaker = get_turf(R)
if(speaker)
for(var/turf/T in R.can_broadcast_to()) //CHOMPEdit
@@ -378,8 +377,7 @@ var/mobs_radio_range_fired = 1 //CHOMPEdit
/proc/flick_overlay_view(image/I, atom/target, duration, gc_after) //wrapper for the above, flicks to everyone who can see the target atom
var/list/viewing = list()
- for(var/m in viewers(target))
- var/mob/M = m
+ for(var/mob/M as anything in viewers(target))
if(M.client)
viewing += M.client
flick_overlay(I, viewing, duration, gc_after)
diff --git a/code/_helpers/global_lists.dm b/code/_helpers/global_lists.dm
index fcb6554a5c..1a482e6d24 100644
--- a/code/_helpers/global_lists.dm
+++ b/code/_helpers/global_lists.dm
@@ -215,23 +215,20 @@ GLOBAL_LIST_EMPTY(mannequins)
// Suit cyclers
paths = subtypesof(/datum/suit_cycler_choice/department)
- for(var/path in paths)
- var/datum/suit_cycler_choice/SCC = path
+ for(var/datum/suit_cycler_choice/SCC as anything in paths)
if(!initial(SCC.name))
continue
- GLOB.suit_cycler_departments += new path()
+ GLOB.suit_cycler_departments += new SCC()
paths = subtypesof(/datum/suit_cycler_choice/species)
- for(var/path in paths)
- var/datum/suit_cycler_choice/SCC = path
+ for(var/datum/suit_cycler_choice/SCC as anything in paths)
if(!initial(SCC.name))
continue
- GLOB.suit_cycler_species += new path()
+ GLOB.suit_cycler_species += new SCC()
paths = subtypesof(/datum/suit_cycler_choice/department/emag)
- for(var/path in paths)
- var/datum/suit_cycler_choice/SCC = path
+ for(var/datum/suit_cycler_choice/SCC as anything in paths)
if(!initial(SCC.name))
continue
- GLOB.suit_cycler_emagged += new path()
+ GLOB.suit_cycler_emagged += new SCC()
//Ores
paths = subtypesof(/ore)
@@ -273,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 47107f6888..178903c82a 100644
--- a/code/_helpers/global_lists_vr.dm
+++ b/code/_helpers/global_lists_vr.dm
@@ -534,7 +534,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
@@ -568,14 +568,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/_helpers/icons.dm b/code/_helpers/icons.dm
index 74607efe05..24f398c8ec 100644
--- a/code/_helpers/icons.dm
+++ b/code/_helpers/icons.dm
@@ -224,8 +224,7 @@
// Dimensions of overlay being added
var/list/add_size[4]
- for(var/V in layers)
- var/image/I = V
+ for(var/image/I as anything in layers)
if(I.alpha == 0)
continue
@@ -359,8 +358,7 @@
//For photo camera.
/proc/build_composite_icon(atom/A)
var/icon/composite = icon(A.icon, A.icon_state, A.dir, 1)
- for(var/O in A.overlays)
- var/image/I = O
+ for(var/image/I as anything in A.overlays)
composite.Blend(icon(I.icon, I.icon_state, I.dir, 1), ICON_OVERLAY)
return composite
diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm
index cef24751a2..4772ebcdf4 100644
--- a/code/_helpers/unsorted.dm
+++ b/code/_helpers/unsorted.dm
@@ -1249,8 +1249,7 @@ var/mob/dview/dview_mob = new
if(orange)
turfs -= get_turf(center)
. = list()
- for(var/V in turfs)
- var/turf/T = V
+ for(var/turf/T as anything in turfs)
. += T
. += T.contents
if(areas)
diff --git a/code/_helpers/visual_filters.dm b/code/_helpers/visual_filters.dm
index 96f6871000..c02bbb6993 100644
--- a/code/_helpers/visual_filters.dm
+++ b/code/_helpers/visual_filters.dm
@@ -335,8 +335,7 @@ GLOBAL_LIST_INIT(master_filter_info, list(
/obj/item/update_filters()
. = ..()
/* Will port this from TG
- for(var/X in actions)
- var/datum/action/A = X
+ for(var/datum/action/A as anything in actions)
A.UpdateButtonIcon()
*/
diff --git a/code/_onclick/hud/minihud_rigmech.dm b/code/_onclick/hud/minihud_rigmech.dm
index e54a733f80..b4d13f1c86 100644
--- a/code/_onclick/hud/minihud_rigmech.dm
+++ b/code/_onclick/hud/minihud_rigmech.dm
@@ -21,8 +21,7 @@
screenobjs += new /obj/screen/rig/deco1_f
screenobjs += new /obj/screen/rig/deco2_f
- for(var/scr in screenobjs)
- var/obj/screen/S = scr
+ for(var/obj/screen/S as anything in screenobjs)
S.master = owner_rig
..()
@@ -71,8 +70,7 @@
screenobjs += new /obj/screen/mech/deco1_f
screenobjs += new /obj/screen/mech/deco2_f
- for(var/scr in screenobjs)
- var/obj/screen/S = scr
+ for(var/obj/screen/S as anything in screenobjs)
S.master = owner_mech
..()
diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm
index 7ddfc9e088..2bafc95462 100644
--- a/code/controllers/configuration.dm
+++ b/code/controllers/configuration.dm
@@ -300,7 +300,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/master.dm b/code/controllers/master.dm
index 4ff1b7219b..fc065bc86a 100644
--- a/code/controllers/master.dm
+++ b/code/controllers/master.dm
@@ -251,8 +251,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
var/list/tickersubsystems = list()
var/list/runlevel_sorted_subsystems = list(list()) //ensure we always have at least one runlevel
var/timer = world.time
- for (var/thing in subsystems)
- var/datum/controller/subsystem/SS = thing
+ for (var/datum/controller/subsystem/SS as anything in subsystems)
if (SS.flags & SS_NO_FIRE)
continue
SS.queued_time = 0
@@ -339,8 +338,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
cached_runlevel = checking_runlevel
current_runlevel_subsystems = runlevel_sorted_subsystems[cached_runlevel]
var/stagger = world.time
- for(var/I in current_runlevel_subsystems)
- var/datum/controller/subsystem/SS = I
+ for(var/datum/controller/subsystem/SS as anything in current_runlevel_subsystems)
if(SS.next_fire <= world.time)
stagger += world.tick_lag * rand(1, 5)
SS.next_fire = stagger
@@ -553,8 +551,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
for(var/I in runlevel_SS)
subsystemstocheck |= I
- for (var/thing in subsystemstocheck)
- var/datum/controller/subsystem/SS = thing
+ for (var/datum/controller/subsystem/SS as anything in subsystemstocheck)
if (!SS || !istype(SS))
//list(SS) is so if a list makes it in the subsystem list, we remove the list, not the contents
subsystems -= list(SS)
@@ -601,8 +598,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
//disallow more than one map to load at once, multithreading it will just cause race conditions
while(map_loading)
stoplag()
- for(var/S in subsystems)
- var/datum/controller/subsystem/SS = S
+ for(var/datum/controller/subsystem/SS as anything in subsystems)
SS.StartLoadingMap()
map_loading = TRUE
@@ -611,6 +607,5 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
if(!quiet)
admin_notice("Map is finished. Unlocking.", R_DEBUG)
map_loading = FALSE
- for(var/S in subsystems)
- var/datum/controller/subsystem/SS = S
+ for(var/datum/controller/subsystem/SS as anything in subsystems)
SS.StopLoadingMap()
diff --git a/code/controllers/subsystems/assets.dm b/code/controllers/subsystems/assets.dm
index 2041104a2b..00d1693c06 100644
--- a/code/controllers/subsystems/assets.dm
+++ b/code/controllers/subsystems/assets.dm
@@ -6,8 +6,7 @@ SUBSYSTEM_DEF(assets)
var/list/preload = list()
/datum/controller/subsystem/assets/Initialize(timeofday)
- for(var/type in typesof(/datum/asset))
- var/datum/asset/A = type
+ for(var/datum/asset/A as anything in typesof(/datum/asset))
if (type != initial(A._abstract))
get_asset_datum(type)
diff --git a/code/controllers/subsystems/atoms.dm b/code/controllers/subsystems/atoms.dm
index 4db490914a..a62c5265c5 100644
--- a/code/controllers/subsystems/atoms.dm
+++ b/code/controllers/subsystems/atoms.dm
@@ -38,11 +38,10 @@ SUBSYSTEM_DEF(atoms)
if(atoms)
created_atoms = list()
count = atoms.len
- for(var/I in atoms)
- var/atom/A = I
+ for(var/atom/A as anything in atoms)
if(!A.initialized)
- if(InitAtom(I, mapload_arg))
- atoms -= I
+ if(InitAtom(A, mapload_arg))
+ atoms -= A
CHECK_TICK
else
count = 0
@@ -57,8 +56,7 @@ SUBSYSTEM_DEF(atoms)
initialized = INITIALIZATION_INNEW_REGULAR
if(late_loaders.len)
- for(var/I in late_loaders)
- var/atom/A = I
+ for(var/atom/A as anything in late_loaders)
A.LateInitialize()
CHECK_TICK
testing("Late initialized [late_loaders.len] atoms")
diff --git a/code/controllers/subsystems/chat.dm b/code/controllers/subsystems/chat.dm
index 553c30d128..aece61d39e 100644
--- a/code/controllers/subsystems/chat.dm
+++ b/code/controllers/subsystems/chat.dm
@@ -13,8 +13,7 @@ SUBSYSTEM_DEF(chat)
/datum/controller/subsystem/chat/fire()
var/list/msg_queue = src.msg_queue // Local variable for sanic speed.
- for(var/i in msg_queue)
- var/client/C = i
+ for(var/client/C as anything in msg_queue)
var/list/messages = msg_queue[C]
msg_queue -= C
if (C)
diff --git a/code/controllers/subsystems/circuits.dm b/code/controllers/subsystems/circuits.dm
index 8fda048c60..4d2b282171 100644
--- a/code/controllers/subsystems/circuits.dm
+++ b/code/controllers/subsystems/circuits.dm
@@ -23,11 +23,10 @@ SUBSYSTEM_DEF(circuit)
/datum/controller/subsystem/circuit/proc/circuits_init()
//Cached lists for free performance
- for(var/path in typesof(/obj/item/integrated_circuit))
- var/obj/item/integrated_circuit/IC = path
- var/name = initial(IC.name)
- all_components[name] = path // Populating the component lists
- cached_components[IC] = new path
+ for(var/obj/item/integrated_circuit/IC as anything in typesof(/obj/item/integrated_circuit))
+ var/path = IC
+ all_components[initial(IC.name)] = path // Populating the component lists
+ cached_components[path] = new path
if(!(initial(IC.spawn_flags) & (IC_SPAWN_DEFAULT | IC_SPAWN_RESEARCH)))
continue
@@ -38,11 +37,10 @@ SUBSYSTEM_DEF(circuit)
var/list/category_list = circuit_fabricator_recipe_list[category]
category_list += IC // Populating the fabricator categories
- for(var/path in typesof(/obj/item/device/electronic_assembly))
- var/obj/item/device/electronic_assembly/A = path
- var/name = initial(A.name)
- all_assemblies[name] = path
- cached_assemblies[A] = new path
+ for(var/obj/item/device/electronic_assembly/A as anything in typesof(/obj/item/device/electronic_assembly))
+ var/path = A
+ all_assemblies[initial(A.name)] = path
+ cached_assemblies[path] = new path
circuit_fabricator_recipe_list["Assemblies"] = list(
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/events2.dm b/code/controllers/subsystems/events2.dm
index 2a73498b1d..7cf986358f 100644
--- a/code/controllers/subsystems/events2.dm
+++ b/code/controllers/subsystems/events2.dm
@@ -14,8 +14,7 @@ SUBSYSTEM_DEF(event_ticker)
// Process active events.
/datum/controller/subsystem/event_ticker/fire(resumed)
- for(var/E in active_events)
- var/datum/event2/event/event = E
+ for(var/datum/event2/event/event as anything in active_events)
event.process()
if(event.finished)
event_finished(event)
diff --git a/code/controllers/subsystems/game_master.dm b/code/controllers/subsystems/game_master.dm
index 01ea086935..06a6060227 100644
--- a/code/controllers/subsystems/game_master.dm
+++ b/code/controllers/subsystems/game_master.dm
@@ -74,8 +74,7 @@ SUBSYSTEM_DEF(game_master)
chosen_event.enabled = FALSE
if(chosen_event.event_class)
// Disable similar events, too.
- for(var/M in available_events)
- var/datum/event2/meta/meta = M
+ for(var/datum/event2/meta/meta as anything in available_events)
if(meta.event_class == chosen_event.event_class)
meta.enabled = FALSE
@@ -235,8 +234,7 @@ SUBSYSTEM_DEF(game_master)
dat += "
Players"
dat += ""
- for(var/P in player_list)
- var/mob/M = P
+ for(var/mob/M as anything in player_list)
dat += " | "
dat += "| [M] ([M.ckey]) | "
dat += "[metric.assess_player_activity(M)]% | "
@@ -255,8 +253,7 @@ SUBSYSTEM_DEF(game_master)
dat += "Buttons | "
dat += "
"
- for(var/E in available_events)
- var/datum/event2/meta/event = E
+ for(var/datum/event2/meta/event as anything in available_events)
dat += ""
if(!event.enabled)
dat += "[event.name] | "
@@ -285,8 +282,7 @@ SUBSYSTEM_DEF(game_master)
dat += "Buttons | "
dat += "
"
- for(var/E in SSevent_ticker.active_events)
- var/datum/event2/event/event = E
+ for(var/datum/event2/event/event as anything in SSevent_ticker.active_events)
dat += ""
dat += "| [event.type] | "
dat += "[event.time_started] | "
@@ -309,8 +305,7 @@ SUBSYSTEM_DEF(game_master)
dat += "Finish Time | "
dat += "
"
- for(var/E in SSevent_ticker.finished_events)
- var/datum/event2/event/event = E
+ for(var/datum/event2/event/event as anything in SSevent_ticker.finished_events)
dat += ""
dat += "| [event.type] | "
dat += "[event.time_started] | "
diff --git a/code/controllers/subsystems/garbage.dm b/code/controllers/subsystems/garbage.dm
index 422fa6743f..c1fe92295d 100644
--- a/code/controllers/subsystems/garbage.dm
+++ b/code/controllers/subsystems/garbage.dm
@@ -172,8 +172,7 @@ SUBSYSTEM_DEF(garbage)
log_world("## TESTING: GC: -- \ref[D] | [type] was unable to be GC'd --")
#ifdef TESTING
- for(var/c in GLOB.admins) //Using testing() here would fill the logs with ADMIN_VV garbage
- var/client/admin = c
+ for(var/client/admin as anything in GLOB.admins) //Using testing() here would fill the logs with ADMIN_VV garbage
if(!check_rights_for(admin, R_ADMIN))
continue
to_chat(admin, "## TESTING: GC: -- [ADMIN_VV(D)] | [type] was unable to be GC'd --")
diff --git a/code/controllers/subsystems/mapping.dm b/code/controllers/subsystems/mapping.dm
index 848a5552d6..06bf16e255 100644
--- a/code/controllers/subsystems/mapping.dm
+++ b/code/controllers/subsystems/mapping.dm
@@ -34,11 +34,10 @@ SUBSYSTEM_DEF(mapping)
..()
/datum/controller/subsystem/mapping/proc/load_map_templates()
- for(var/T in subtypesof(/datum/map_template))
- var/datum/map_template/template = T
+ for(var/datum/map_template/template as anything in subtypesof(/datum/map_template))
if(!(initial(template.mappath))) // If it's missing the actual path its probably a base type or being used for inheritence.
continue
- template = new T()
+ template = new template()
map_templates[template.name] = template
return TRUE
@@ -113,8 +112,7 @@ SUBSYSTEM_DEF(mapping)
MT.load_new_z(centered = FALSE)
/datum/controller/subsystem/mapping/proc/preloadShelterTemplates()
- for(var/item in subtypesof(/datum/map_template/shelter))
- var/datum/map_template/shelter/shelter_type = item
+ for(var/datum/map_template/shelter/shelter_type as anything in subtypesof(/datum/map_template/shelter))
if(!(initial(shelter_type.mappath)))
continue
var/datum/map_template/shelter/S = new shelter_type()
diff --git a/code/controllers/subsystems/persistence.dm b/code/controllers/subsystems/persistence.dm
index 8168bfa6c2..f238621b3e 100644
--- a/code/controllers/subsystems/persistence.dm
+++ b/code/controllers/subsystems/persistence.dm
@@ -12,11 +12,10 @@ SUBSYSTEM_DEF(persistence)
/datum/controller/subsystem/persistence/Initialize()
. = ..()
- for(var/thing in subtypesof(/datum/persistent))
- var/datum/persistent/P = thing
+ for(var/datum/persistent/P as anything in subtypesof(/datum/persistent))
if(initial(P.name))
P = new P
- persistence_datums[thing] = P
+ persistence_datums[P.type] = P
P.Initialize()
/datum/controller/subsystem/persistence/Shutdown()
diff --git a/code/controllers/subsystems/planets.dm b/code/controllers/subsystems/planets.dm
index 16fbe59d3a..5486034871 100644
--- a/code/controllers/subsystems/planets.dm
+++ b/code/controllers/subsystems/planets.dm
@@ -111,8 +111,7 @@ SUBSYSTEM_DEF(planets)
/datum/controller/subsystem/planets/proc/updateTemp(var/datum/planet/P)
//Set new temperatures
- for(var/W in P.planet_walls)
- var/turf/unsimulated/wall/planetary/wall = W
+ for(var/turf/unsimulated/wall/planetary/wall as anything in P.planet_walls)
wall.set_temperature(P.weather_holder.temperature)
CHECK_TICK
@@ -120,8 +119,7 @@ SUBSYSTEM_DEF(planets)
var/count = 100000
while(count > 0)
count--
- for(var/planet in planets)
- var/datum/planet/P = planet
+ for(var/datum/planet/P as anything in planets)
if(P.weather_holder)
P.weather_holder.change_weather(pick(P.weather_holder.allowed_weather_types))
sleep(3)
diff --git a/code/controllers/subsystems/plants.dm b/code/controllers/subsystems/plants.dm
index cc066cb99d..f21cc1cb2c 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/controllers/subsystems/processing/instruments.dm b/code/controllers/subsystems/processing/instruments.dm
index ee0fd1ea00..3f305fb8fc 100644
--- a/code/controllers/subsystems/processing/instruments.dm
+++ b/code/controllers/subsystems/processing/instruments.dm
@@ -33,11 +33,10 @@ PROCESSING_SUBSYSTEM_DEF(instruments)
songs -= S
/datum/controller/subsystem/processing/instruments/proc/initialize_instrument_data()
- for(var/path in subtypesof(/datum/instrument))
- var/datum/instrument/I = path
- if(initial(I.abstract_type) == path)
+ for(var/datum/instrument/I as anything in subtypesof(/datum/instrument))
+ if(initial(I.abstract_type) == I)
continue
- I = new path
+ I = new I
I.Initialize()
if(!I.id)
qdel(I)
diff --git a/code/controllers/subsystems/processing/projectiles.dm b/code/controllers/subsystems/processing/projectiles.dm
index e4316304ce..3e5e1b2127 100644
--- a/code/controllers/subsystems/processing/projectiles.dm
+++ b/code/controllers/subsystems/processing/projectiles.dm
@@ -19,7 +19,6 @@ PROCESSING_SUBSYSTEM_DEF(projectiles)
/datum/controller/subsystem/processing/projectiles/proc/set_pixel_speed(new_speed)
global_pixel_speed = new_speed
- for(var/i in processing)
- var/obj/item/projectile/P = i
+ for(var/obj/item/projectile/P as anything in processing)
if(istype(P)) //there's non projectiles on this too.
P.set_pixel_speed(new_speed)
diff --git a/code/controllers/subsystems/radiation.dm b/code/controllers/subsystems/radiation.dm
index 50c72ddd60..8f140a5fc8 100644
--- a/code/controllers/subsystems/radiation.dm
+++ b/code/controllers/subsystems/radiation.dm
@@ -63,8 +63,7 @@ SUBSYSTEM_DEF(radiation)
if(!istype(T))
return
- for(var/value in sources)
- var/datum/radiation_source/source = value
+ for(var/datum/radiation_source/source as anything in sources)
if(source.rad_power < .)
continue // Already being affected by a stronger source
diff --git a/code/controllers/subsystems/shuttles.dm b/code/controllers/subsystems/shuttles.dm
index 40039edceb..38ec9e5c83 100644
--- a/code/controllers/subsystems/shuttles.dm
+++ b/code/controllers/subsystems/shuttles.dm
@@ -119,8 +119,7 @@ SUBSYSTEM_DEF(shuttles)
landmarks_still_needed[landmark_tag] = given_sector // Landmark isn't registered yet, queue it to be added once it is.
var/landmarks_to_check = landmarks_awaiting_sector.Copy()
- for(var/thing in landmarks_to_check)
- var/obj/effect/shuttle_landmark/automatic/landmark = thing
+ for(var/obj/effect/shuttle_landmark/automatic/landmark as anything in landmarks_to_check)
if(landmark.z in given_sector.map_z)
given_sector.add_landmark(landmark, landmark.shuttle_restricted)
landmarks_awaiting_sector -= landmark
@@ -170,8 +169,7 @@ SUBSYSTEM_DEF(shuttles)
if(overmap_halted == new_setting)
return
overmap_halted = !overmap_halted
- for(var/ship in ships)
- var/obj/effect/overmap/visitable/ship/ship_effect = ship
+ for(var/obj/effect/overmap/visitable/ship/ship_effect as anything in ships)
overmap_halted ? ship_effect.halt() : ship_effect.unhalt()
/datum/controller/subsystem/shuttles/stat_entry()
diff --git a/code/controllers/subsystems/timer.dm b/code/controllers/subsystems/timer.dm
index dadcd9ab95..4fadc4f599 100644
--- a/code/controllers/subsystems/timer.dm
+++ b/code/controllers/subsystems/timer.dm
@@ -202,8 +202,7 @@ SUBSYSTEM_DEF(timer)
bucket_count -= length(spent)
- for (var/i in spent)
- var/datum/timedevent/qtimer = i
+ for(var/datum/timedevent/qtimer as anything in spent)
if(QDELETED(qtimer))
bucket_count++
continue
diff --git a/code/controllers/subsystems/vote.dm b/code/controllers/subsystems/vote.dm
index 34128d372a..c1e4288869 100644
--- a/code/controllers/subsystems/vote.dm
+++ b/code/controllers/subsystems/vote.dm
@@ -35,8 +35,7 @@ SUBSYSTEM_DEF(vote)
// Before doing the vote, see if anyone is playing.
// If not, just do the transfer.
var/players_are_in_round = FALSE
- for(var/a in player_list) // Mobs with clients attached.
- var/mob/living/L = a
+ for(var/mob/living/L as anything in player_list) // Mobs with clients attached.
if(!istype(L)) // Exclude ghosts and other weird things.
continue
if(L.stat == DEAD) // Dead mobs aren't playing.
diff --git a/code/controllers/subsystems/xenoarch.dm b/code/controllers/subsystems/xenoarch.dm
index 9851c69278..a175625b1f 100644
--- a/code/controllers/subsystems/xenoarch.dm
+++ b/code/controllers/subsystems/xenoarch.dm
@@ -41,8 +41,7 @@ SUBSYSTEM_DEF(xenoarch)
continue
var/farEnough = 1
- for(var/A in digsite_spawning_turfs)
- var/turf/T = A
+ for(var/turf/T as anything in digsite_spawning_turfs)
if(T in range(5, M))
farEnough = 0
break
diff --git a/code/controllers/verbs.dm b/code/controllers/verbs.dm
index 7323d2cba2..da3e8e1baf 100644
--- a/code/controllers/verbs.dm
+++ b/code/controllers/verbs.dm
@@ -75,8 +75,7 @@
options["MC"] = Master
options["Failsafe"] = Failsafe
options["Configuration"] = config
- for(var/i in Master.subsystems)
- var/datum/controller/subsystem/S = i
+ for(var/datum/controller/subsystem/S as anything in Master.subsystems)
if(!istype(S)) //Eh, we're a debug verb, let's have typechecking.
continue
var/strtype = "SS[get_end_section_of_type(S.type)]"
diff --git a/code/datums/chat_message.dm b/code/datums/chat_message.dm
index ae17f21e2d..982e9e098c 100644
--- a/code/datums/chat_message.dm
+++ b/code/datums/chat_message.dm
@@ -172,8 +172,7 @@ var/list/runechat_image_cache = list()
if(owned_by.seen_messages)
var/idx = 1
var/combined_height = approx_lines
- for(var/msg in owned_by.seen_messages[message_loc])
- var/datum/chatmessage/m = msg
+ for(var/datum/chatmessage/m as anything in owned_by.seen_messages[message_loc])
animate(m.message, pixel_y = m.message.pixel_y + mheight, time = CHAT_MESSAGE_SPAWN_TIME)
combined_height += m.approx_lines
@@ -336,8 +335,7 @@ var/list/runechat_image_cache = list()
var/list/hear = get_mobs_and_objs_in_view_fast(get_turf(src), range, remote_ghosts = FALSE)
hearing_mobs = hear["mobs"]
- for(var/mob in hearing_mobs)
- var/mob/M = mob
+ for(var/mob/M as anything in hearing_mobs)
if(!M.client)
continue
M.create_chat_message(src, message, italics, classes, audible)
diff --git a/code/datums/components/_component.dm b/code/datums/components/_component.dm
index c5bd07cdcb..2e177c8ff3 100644
--- a/code/datums/components/_component.dm
+++ b/code/datums/components/_component.dm
@@ -320,8 +320,7 @@
var/proctype = C.signal_procs[src][sigtype]
return NONE | CallAsync(C, proctype, arguments)
. = NONE
- for(var/I in target)
- var/datum/C = I
+ for(var/datum/C as anything in target)
if(!C.signal_enabled)
continue
var/proctype = C.signal_procs[src][sigtype]
@@ -444,8 +443,7 @@
var/list/arguments = raw_args.Copy()
arguments[1] = new_comp
var/make_new_component = TRUE
- for(var/i in GetComponents(new_type))
- var/datum/component/C = i
+ for(var/datum/component/C as anything in GetComponents(new_type))
if(C.CheckDupeComponent(arglist(arguments)))
make_new_component = FALSE
QDEL_NULL(new_comp)
diff --git a/code/datums/components/crafting/crafting.dm b/code/datums/components/crafting/crafting.dm
index cc6bb53a97..c4d8bcc3d4 100644
--- a/code/datums/components/crafting/crafting.dm
+++ b/code/datums/components/crafting/crafting.dm
@@ -402,8 +402,7 @@
var/list/surroundings = get_surroundings(user)
var/list/craftability = list()
- for(var/rec in GLOB.crafting_recipes)
- var/datum/crafting_recipe/R = rec
+ for(var/datum/crafting_recipe/R as anything in GLOB.crafting_recipes)
if(!R.always_available && !(R.type in user?.mind?.learned_recipes)) //User doesn't actually know how to make this.
continue
@@ -420,11 +419,10 @@
var/list/data = list()
var/list/crafting_recipes = list()
- for(var/rec in GLOB.crafting_recipes)
- var/datum/crafting_recipe/R = rec
+ for(var/datum/crafting_recipe/R as anything in GLOB.crafting_recipes)
if(R.name == "") //This is one of the invalid parents that sneaks in
- GLOB.crafting_recipes -= rec
+ GLOB.crafting_recipes -= R
continue
if(!R.always_available && !(R.type in user?.mind?.learned_recipes)) //User doesn't actually know how to make this.
diff --git a/code/datums/components/material_container.dm b/code/datums/components/material_container.dm
index c8f54a1f0c..86573474e6 100644
--- a/code/datums/components/material_container.dm
+++ b/code/datums/components/material_container.dm
@@ -99,9 +99,8 @@
/datum/component/material_container/proc/on_examine(datum/source, mob/user, list/examine_texts)
SIGNAL_HANDLER
- for(var/I in materials)
- var/datum/material/M = I
- var/amt = materials[I]
+ for(var/datum/material/M as anything in materials)
+ var/amt = materials[M]
if(amt)
examine_texts += "It has [amt] units of [lowertext(M.name)] stored."
@@ -327,13 +326,13 @@
var/list/mats_to_remove = list() //Assoc list MAT | AMOUNT
- for(var/x in mats) //Loop through all required materials
- var/datum/material/req_mat = x
+ for(var/datum/material/req_mat as anything in mats) //Loop through all required materials
+ var/imat = req_mat
if(!istype(req_mat))
req_mat = GET_MATERIAL_REF(req_mat) //Get the ref if necesary
if(!materials[req_mat]) //Do we have the resource?
return FALSE //Can't afford it
- var/amount_required = mats[x] * multiplier
+ var/amount_required = mats[imat] * multiplier
if(!(materials[req_mat] >= amount_required)) // do we have enough of the resource?
return FALSE //Can't afford it
mats_to_remove[req_mat] += amount_required //Add it to the assoc list of things to remove
@@ -392,8 +391,8 @@
if(!mats || !mats.len)
return FALSE
- for(var/x in mats) //Loop through all required materials
- var/datum/material/req_mat = x
+ for(var/datum/material/req_mat as anything in mats) //Loop through all required materials
+ var/imat = req_mat
if(!istype(req_mat))
if(ispath(req_mat) || istext(req_mat)) //Is this an actual material, or is it a category?
req_mat = GET_MATERIAL_REF(req_mat) //Get the ref
@@ -404,7 +403,7 @@
// else
// continue
- if(!has_enough_of_material(req_mat, mats[x], multiplier))//Not a category, so just check the normal way
+ if(!has_enough_of_material(req_mat, mats[imat], multiplier))//Not a category, so just check the normal way
return FALSE
return TRUE
diff --git a/code/datums/components/overlay_lighting.dm b/code/datums/components/overlay_lighting.dm
index 8c4046c867..9bc3820494 100644
--- a/code/datums/components/overlay_lighting.dm
+++ b/code/datums/components/overlay_lighting.dm
@@ -171,8 +171,7 @@
///Clears the affected_turfs lazylist, removing from its contents the effects of being near the light.
/datum/component/overlay_lighting/proc/clean_old_turfs()
- for(var/t in affected_turfs)
- var/turf/lit_turf = t
+ for(var/turf/lit_turf as anything in affected_turfs)
lit_turf.dynamic_lumcount -= lum_power
affected_turfs = null
@@ -434,8 +433,7 @@
. = lum_power
lum_power = new_lum_power
var/difference = . - lum_power
- for(var/t in affected_turfs)
- var/turf/lit_turf = t
+ for(var/turf/lit_turf as anything in affected_turfs)
lit_turf.dynamic_lumcount -= difference
///Moves the light directional_atom that emits our "light" based on our position and our direction
diff --git a/code/datums/datum.dm b/code/datums/datum.dm
index 2304af887a..01eb82dd71 100644
--- a/code/datums/datum.dm
+++ b/code/datums/datum.dm
@@ -31,8 +31,7 @@
//clear timers
var/list/timers = active_timers
active_timers = null
- for(var/thing in timers)
- var/datum/timedevent/timer = thing
+ for(var/datum/timedevent/timer as anything in timers)
if (timer.spent)
continue
qdel(timer)
@@ -46,8 +45,7 @@
if(dc)
var/all_components = dc[/datum/component]
if(length(all_components))
- for(var/I in all_components)
- var/datum/component/C = I
+ for(var/datum/component/C as anything in all_components)
qdel(C, FALSE, TRUE)
else
var/datum/component/C = all_components
@@ -59,8 +57,7 @@
for(var/sig in lookup)
var/list/comps = lookup[sig]
if(length(comps))
- for(var/i in comps)
- var/datum/component/comp = i
+ for(var/datum/component/comp as anything in comps)
comp.UnregisterSignal(src, sig)
else
var/datum/component/comp = comps
diff --git a/code/datums/game_masters/default.dm b/code/datums/game_masters/default.dm
index d380476df2..8f69b296af 100644
--- a/code/datums/game_masters/default.dm
+++ b/code/datums/game_masters/default.dm
@@ -17,8 +17,7 @@
log_game_master("Got [best_events.len] choice\s for the next event.")
var/list/weighted_events = list()
- for(var/E in best_events)
- var/datum/event2/meta/event = E
+ for(var/datum/event2/meta/event as anything in best_events)
var/weight = event.get_weight()
if(weight <= 0)
continue
@@ -71,8 +70,7 @@
// If no list is passed, all the events will be returned.
/datum/game_master/default/proc/filter_events_by_departments(list/departments)
. = list()
- for(var/E in SSgame_master.available_events)
- var/datum/event2/meta/event = E
+ for(var/datum/event2/meta/event as anything in SSgame_master.available_events)
if(!event.enabled)
continue
if(event.chaotic_threshold && !ignore_round_chaos)
diff --git a/code/datums/game_masters/other_game_masters.dm b/code/datums/game_masters/other_game_masters.dm
index f62d83cfe3..cd45483251 100644
--- a/code/datums/game_masters/other_game_masters.dm
+++ b/code/datums/game_masters/other_game_masters.dm
@@ -3,8 +3,7 @@
// * Does not react to danger at all.
/datum/game_master/classic/choose_event()
var/list/weighted_events = list()
- for(var/E in SSgame_master.available_events)
- var/datum/event2/meta/event = E
+ for(var/datum/event2/meta/event as anything in SSgame_master.available_events)
if(!event.enabled)
continue
weighted_events[event] = event.get_weight()
@@ -31,8 +30,7 @@
/datum/game_master/brutal/choose_event()
var/list/weighted_events = list()
- for(var/E in SSgame_master.available_events)
- var/datum/event2/meta/event = E
+ for(var/datum/event2/meta/event as anything in SSgame_master.available_events)
if(!event.enabled)
continue
weighted_events[event] = event.get_weight() + (event.chaos * 2)
diff --git a/code/datums/helper_datums/getrev.dm b/code/datums/helper_datums/getrev.dm
index debc08c2c4..68aa27e2d1 100644
--- a/code/datums/helper_datums/getrev.dm
+++ b/code/datums/helper_datums/getrev.dm
@@ -45,8 +45,7 @@ GLOBAL_DATUM(revdata, /datum/getrev)
return
if(header)
. += "The following pull requests are currently test merged:"
- for(var/line in testmerge)
- var/datum/tgs_revision_information/test_merge/tm = line
+ for(var/datum/tgs_revision_information/test_merge/tm as anything in testmerge)
var/cm = tm.head_commit //CHOMPStation Edit TGS4
var/details = ": '" + html_encode(tm.title) + "' by " + html_encode(tm.author) + " at commit " + html_encode(copytext_char(cm, 1, 11))
if(details && findtext(details, "\[s\]") && (!usr || !usr.client.holder))
diff --git a/code/datums/observation/~cleanup.dm b/code/datums/observation/~cleanup.dm
index 9dcc601436..da902052bd 100644
--- a/code/datums/observation/~cleanup.dm
+++ b/code/datums/observation/~cleanup.dm
@@ -40,8 +40,7 @@ GLOBAL_LIST_EMPTY(event_listen_count)
/decl/observ/destroyed/proc/cleanup_global_listener(listener, listen_count)
GLOB.global_listen_count -= listener
- for(var/entry in GLOB.all_observable_events.events)
- var/decl/observ/event = entry
+ for(var/decl/observ/event as anything in GLOB.all_observable_events.events)
if(event.unregister_global(listener))
// log_debug("[event] - [listener] was deleted while still registered to global events.") // TODO: Apply axe, reimplement with datum component listeners
if(!(--listen_count))
@@ -49,8 +48,7 @@ GLOBAL_LIST_EMPTY(event_listen_count)
/decl/observ/destroyed/proc/cleanup_source_listeners(event_source, source_listener_count)
GLOB.event_sources_count -= event_source
- for(var/entry in GLOB.all_observable_events.events)
- var/decl/observ/event = entry
+ for(var/decl/observ/event as anything in GLOB.all_observable_events.events)
var/proc_owners = event.event_sources[event_source]
if(proc_owners)
for(var/proc_owner in proc_owners)
@@ -61,8 +59,7 @@ GLOBAL_LIST_EMPTY(event_listen_count)
/decl/observ/destroyed/proc/cleanup_event_listener(listener, listener_count)
GLOB.event_listen_count -= listener
- for(var/entry in GLOB.all_observable_events.events)
- var/decl/observ/event = entry
+ for(var/decl/observ/event as anything in GLOB.all_observable_events.events)
for(var/event_source in event.event_sources)
if(event.unregister(event_source, listener))
// log_debug("[event] - [listener] was deleted while still listening to [event_source].") // TODO: Apply axe, reimplement with datum component listeners
diff --git a/code/datums/orbit.dm b/code/datums/orbit.dm
index 0176d7f23d..adbd166d25 100644
--- a/code/datums/orbit.dm
+++ b/code/datums/orbit.dm
@@ -110,8 +110,7 @@
/atom/Destroy(force = FALSE)
. = ..()
if (orbiters)
- for (var/thing in orbiters)
- var/datum/orbit/O = thing
+ for(var/datum/orbit/O as anything in orbiters)
if (O.orbiter)
O.orbiter.stop_orbit()
@@ -123,8 +122,7 @@
/*
/atom/movable/proc/transfer_observers_to(atom/movable/target)
if(orbiters)
- for(var/thing in orbiters)
- var/datum/orbit/O = thing
+ for(var/datum/orbit/O as anything in orbiters)
if(O.orbiter && isobserver(O.orbiter))
var/mob/dead/observer/D = O.orbiter
D.ManualFollow(target)
diff --git a/code/datums/progressbar.dm b/code/datums/progressbar.dm
index c24dfcd922..8da8d7c000 100644
--- a/code/datums/progressbar.dm
+++ b/code/datums/progressbar.dm
@@ -51,8 +51,7 @@
animate(bar, pixel_y = shiftheight, time = 5, easing = SINE_EASING)
/datum/progressbar/Destroy()
- for(var/I in user.progressbars[bar.loc])
- var/datum/progressbar/P = I
+ for(var/datum/progressbar/P as anything in user.progressbars[bar.loc])
if(P != src && P.listindex > listindex)
P.shiftDown()
diff --git a/code/datums/soul_link.dm b/code/datums/soul_link.dm
index 7bc652a863..d15049d924 100644
--- a/code/datums/soul_link.dm
+++ b/code/datums/soul_link.dm
@@ -6,13 +6,11 @@
var/list/shared_soul_links // Soul links we are a/the sharer of.
/mob/living/Destroy()
- for(var/s in owned_soul_links)
- var/datum/soul_link/S = s
+ for(var/datum/soul_link/S as anything in owned_soul_links)
S.owner_died(FALSE)
- qdel(s) // If the owner is destroy()'d, the soullink is destroy()'d.
+ qdel(S) // If the owner is destroy()'d, the soullink is destroy()'d.
owned_soul_links = null
- for(var/s in shared_soul_links)
- var/datum/soul_link/S = s
+ for(var/datum/soul_link/S as anything in shared_soul_links)
S.sharer_died(FALSE)
S.remove_soul_sharer(src) // If a sharer is destroy()'d, they are simply removed.
shared_soul_links = null
@@ -82,8 +80,7 @@
soul_owner = owner
soul_sharers = sharers
LAZYADD(owner.owned_soul_links, src)
- for(var/l in sharers)
- var/mob/living/L = l
+ for(var/mob/living/L as anything in sharers)
LAZYADD(L.shared_soul_links, src)
return TRUE
@@ -144,8 +141,7 @@
/datum/soul_link/multi_sharer/replacement_pool/owner_died(gibbed, mob/living/owner)
if(LAZYLEN(soul_sharers) && !gibbed) //let's not put them in some gibs
var/list/souls = shuffle(soul_sharers.Copy())
- for(var/l in souls)
- var/mob/living/L = l
+ for(var/mob/living/L as anything in souls)
if(L.stat != DEAD && L.mind)
L.mind.transfer_to(soul_owner)
soul_owner.revive(TRUE, TRUE)
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/atoms.dm b/code/game/atoms.dm
index 5c8ff8974d..3e4b277696 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -153,8 +153,7 @@
ASSERT(callback)
ASSERT(isturf(loc))
var/list/turfs = trange(range, src)
- for(var/t in turfs)
- var/turf/T = t
+ for(var/turf/T as anything in turfs)
GLOB.turf_entered_event.register(T, src, callback)
//Unregister from prox listening in a certain range. You should do this BEFORE you move, but if you
@@ -162,8 +161,7 @@
/atom/proc/unsense_proximity(var/range = 1, var/callback, var/center)
ASSERT(isturf(center) || isturf(loc))
var/list/turfs = trange(range, center ? center : src)
- for(var/t in turfs)
- var/turf/T = t
+ for(var/turf/T as anything in turfs)
GLOB.turf_entered_event.unregister(T, src, callback)
@@ -529,11 +527,9 @@
if(LAZYLEN(exclude_mobs))
seeing_mobs -= exclude_mobs
- for(var/obj in seeing_objs)
- var/obj/O = obj
+ for(var/obj/O as anything in seeing_objs)
O.show_message(message, VISIBLE_MESSAGE, blind_message, AUDIBLE_MESSAGE)
- for(var/mob in seeing_mobs)
- var/mob/M = mob
+ for(var/mob/M as anything in seeing_mobs)
if(M.see_invisible >= invisibility && MOB_CAN_SEE_PLANE(M, plane))
M.show_message(message, VISIBLE_MESSAGE, blind_message, AUDIBLE_MESSAGE)
if(runemessage != -1)
@@ -555,16 +551,13 @@
var/list/hearing_objs = hear["objs"]
if(radio_message)
- for(var/obj in hearing_objs)
- var/obj/O = obj
+ for(var/obj/O as anything in hearing_objs)
O.hear_talk(src, list(new /datum/multilingual_say_piece(GLOB.all_languages["Noise"], radio_message)), null)
else
- for(var/obj in hearing_objs)
- var/obj/O = obj
+ for(var/obj/O as anything in hearing_objs)
O.show_message(message, AUDIBLE_MESSAGE, deaf_message, VISIBLE_MESSAGE)
- for(var/mob in hearing_mobs)
- var/mob/M = mob
+ for(var/mob/M as anything in hearing_mobs)
var/msg = message
M.show_message(msg, AUDIBLE_MESSAGE, deaf_message, VISIBLE_MESSAGE)
if(runemessage != -1)
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index 08b0f3e056..9dfba6c423 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -134,8 +134,7 @@
oldarea.Exited(src, newloc)
// Multi-tile objects can't reach here, otherwise you'd need to avoid uncrossing yourself
- for(var/i in oldloc)
- var/atom/movable/thing = i
+ for(var/atom/movable/thing as anything in oldloc)
// We don't call parent so we are calling this for byond
thing.Uncrossed(src)
@@ -145,8 +144,7 @@
newarea.Entered(src, oldloc)
// Multi-tile objects can't reach here, otherwise you'd need to avoid uncrossing yourself
- for(var/i in loc)
- var/atom/movable/thing = i
+ for(var/atom/movable/thing as anything in loc)
// We don't call parent so we are calling this for byond
thing.Crossed(src, oldloc)
@@ -315,8 +313,7 @@
old_area.Exited(src, destination)
// Uncross everything where we left
- for(var/i in oldloc)
- var/atom/movable/AM = i
+ for(var/atom/movable/AM as anything in oldloc)
if(AM == src)
continue
AM.Uncrossed(src)
@@ -341,8 +338,7 @@
destarea.Entered(src, oldloc)
// We ignore ourselves because if we're multi-tile we might be in both old and new locs
- for(var/i in destination)
- var/atom/movable/AM = i
+ for(var/atom/movable/AM as anything in destination)
if(AM == src)
continue
AM.Crossed(src, oldloc)
@@ -364,8 +360,7 @@
loc = null
// Uncross everything where we left (no multitile safety like above because we are definitely not still there)
- for(var/i in oldloc)
- var/atom/movable/AM = i
+ for(var/atom/movable/AM as anything in oldloc)
AM.Uncrossed(src)
// Exited() our loc and area
@@ -379,8 +374,7 @@
/atom/movable/proc/onTransitZ(old_z,new_z)
GLOB.z_moved_event.raise_event(src, old_z, new_z)
SEND_SIGNAL(src, COMSIG_MOVABLE_Z_CHANGED, old_z, new_z)
- for(var/item in src) // Notify contents of Z-transition. This can be overridden IF we know the items contents do not care.
- var/atom/movable/AM = item
+ for(var/atom/movable/AM as anything in src) // Notify contents of Z-transition. This can be overridden IF we know the items contents do not care.
AM.onTransitZ(old_z,new_z)
/atom/movable/proc/glide_for(movetime)
diff --git a/code/game/dna/dna2_helpers.dm b/code/game/dna/dna2_helpers.dm
index 3fb282d72d..8371c395a4 100644
--- a/code/game/dna/dna2_helpers.dm
+++ b/code/game/dna/dna2_helpers.dm
@@ -258,8 +258,7 @@
//VOREStation Add
/mob/living/carbon/human/proc/force_update_organs()
- for(var/organ in organs + internal_organs)
- var/obj/item/organ/O = organ
+ for(var/obj/item/organ/O as anything in organs + internal_organs)
O.species = species
//VOREStation Add End
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 08340f5a76..449d448fe0 100644
--- a/code/game/gamemodes/sandbox/h_sandbox.dm
+++ b/code/game/gamemodes/sandbox/h_sandbox.dm
@@ -105,7 +105,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 b403639ddc..539329da15 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/adv_med.dm b/code/game/machinery/adv_med.dm
index d54f3e6521..bd8edfcd8a 100644
--- a/code/game/machinery/adv_med.dm
+++ b/code/game/machinery/adv_med.dm
@@ -474,9 +474,8 @@
infected = "Gangrene Detected:"
var/unknown_body = 0
- for(var/thing in e.implants)
- var/obj/item/weapon/implant/I = thing
- var/obj/item/device/nif/N = thing //VOREStation Add: NIFs
+ for(var/obj/item/weapon/implant/I as anything in e.implants)
+ var/obj/item/device/nif/N = I //VOREStation Add: NIFs
if(istype(I) && I.known_implant)
imp += "[I] implanted:"
if(istype(N) && N.known_implant) //VOREStation Add: NIFs
diff --git a/code/game/machinery/adv_med_vr.dm b/code/game/machinery/adv_med_vr.dm
index e8ff59adc0..c4c1d93374 100644
--- a/code/game/machinery/adv_med_vr.dm
+++ b/code/game/machinery/adv_med_vr.dm
@@ -12,8 +12,7 @@
var/livingprey = 0
var/objectprey = 0
- for(var/belly in H.vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in H.vore_organs)
for(var/C in B)
if(ishuman(C))
humanprey++
diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm
index b3d315cbad..f079485f19 100644
--- a/code/game/machinery/autolathe.dm
+++ b/code/game/machinery/autolathe.dm
@@ -183,9 +183,8 @@
//Check if we still have the materials.
var/coeff = (making.no_scale ? 1 : mat_efficiency) //stacks are unaffected by production coefficient
- for(var/MAT in making.resources)
- var/datum/material/used_material = MAT
- var/amount_needed = making.resources[MAT] * coeff * multiplier
+ for(var/datum/material/used_material as anything in making.resources)
+ var/amount_needed = making.resources[used_material] * coeff * multiplier
materials_used[used_material] = amount_needed
if(LAZYLEN(materials_used))
diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm
index 58565ead6e..c15a9d1524 100644
--- a/code/game/machinery/computer/card.dm
+++ b/code/game/machinery/computer/card.dm
@@ -111,8 +111,7 @@
data["id_rank"] = modify && modify.assignment ? modify.assignment : "Unassigned"
var/list/departments = list()
- for(var/D in SSjob.get_all_department_datums())
- var/datum/department/dept = D
+ for(var/datum/department/dept as anything in SSjob.get_all_department_datums())
if(!dept.assignable) // No AI ID cards for you.
continue
if(dept.centcom_only && !is_centcom())
diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm
index b7ba4a4339..19ae206605 100644
--- a/code/game/machinery/cryopod.dm
+++ b/code/game/machinery/cryopod.dm
@@ -373,8 +373,7 @@
hook_vr("despawn", list(to_despawn, src))
if(isliving(to_despawn))
var/mob/living/L = to_despawn
- for(var/belly in L.vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in L.vore_organs)
for(var/mob/living/sub_L in B)
despawn_occupant(sub_L)
for(var/obj/item/W in B)
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 279efa36a5..19cbb9811e 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -1222,8 +1222,7 @@ About the new airlock wires panel:
use_power(360) //360 W seems much more appropriate for an actuator moving an industrial door capable of crushing people
//if the door is unpowered then it doesn't make sense to hear the woosh of a pneumatic actuator
- for(var/P in player_list)
- var/mob/M = P
+ for(var/mob/M as anything in player_list)
if(!M || !M.client)
continue
var/old_sounds = M.client.is_preference_enabled(/datum/client_preference/old_door_sounds)
@@ -1351,8 +1350,7 @@ About the new airlock wires panel:
use_power(360) //360 W seems much more appropriate for an actuator moving an industrial door capable of crushing people
has_beeped = 0
- for(var/P in player_list)
- var/mob/M = P
+ for(var/mob/M as anything in player_list)
if(!M || !M.client)
continue
var/old_sounds = M.client.is_preference_enabled(/datum/client_preference/old_door_sounds)
diff --git a/code/game/machinery/frame.dm b/code/game/machinery/frame.dm
index d2ee11fbf8..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
@@ -272,9 +272,8 @@
for(var/A in circuit.req_components)
req_components[A] = circuit.req_components[A]
req_component_names = circuit.req_components.Copy()
- for(var/A in req_components)
- var/obj/ct = A
- req_component_names[A] = initial(ct.name)
+ for(var/obj/ct as anything in req_components)
+ req_component_names[ct] = initial(ct.name)
/obj/structure/frame/New(var/loc, var/dir, var/building = 0, var/datum/frame/frame_types/type, mob/user as mob)
..()
diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm
index 54a65642f0..db40cbcf39 100644
--- a/code/game/machinery/jukebox.dm
+++ b/code/game/machinery/jukebox.dm
@@ -91,8 +91,7 @@
media_start_time = 0
update_music()
//VOREStation Add
- for(var/rem in remotes)
- var/obj/item/device/juke_remote/remote = rem
+ for(var/obj/item/device/juke_remote/remote as anything in remotes)
remote.update_music()
//VOREStation Add End
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index 2da7d5342a..26766addf6 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -548,8 +548,7 @@ Class Procs:
surviving_parts += new /obj/item/stack/cable_coil(null, 1)
surviving_parts += new /obj/item/stack/cable_coil(null, 1)
- for(var/a in surviving_parts)
- var/atom/movable/A = a
+ for(var/atom/movable/A as anything in surviving_parts)
A.forceMove(droploc)
if(scatter && isturf(droploc))
var/turf/T = droploc
diff --git a/code/game/machinery/partslathe_vr.dm b/code/game/machinery/partslathe_vr.dm
index 6f83f6d158..77eefb94c9 100644
--- a/code/game/machinery/partslathe_vr.dm
+++ b/code/game/machinery/partslathe_vr.dm
@@ -265,8 +265,7 @@
if(istype(copy_board))
data["copyBoard"] = copy_board.name
var/list/req_components_ui = list()
- for(var/CP in (copy_board.req_components || list()))
- var/obj/comp_path = CP
+ for(var/obj/comp_path as anything in (copy_board.req_components || list()))
var/comp_amt = copy_board.req_components[comp_path]
if(comp_amt && (comp_path in partslathe_recipies))
req_components_ui.Add(list(list("name" = initial(comp_path.name), "qty" = comp_amt)))
@@ -355,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/machinery/pointdefense.dm b/code/game/machinery/pointdefense.dm
index d1923e949c..b4cfce40d5 100644
--- a/code/game/machinery/pointdefense.dm
+++ b/code/game/machinery/pointdefense.dm
@@ -25,8 +25,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/pointdefense)
. = ..()
if(id_tag)
//No more than 1 controller please.
- for(var/thing in GLOB.pointdefense_controllers)
- var/obj/machinery/pointdefense_control/PC = thing
+ for(var/obj/machinery/pointdefense_control/PC as anything in GLOB.pointdefense_controllers)
if(PC != src && PC.id_tag == id_tag)
warning("Two [src] with the same id_tag of [id_tag]")
id_tag = null
@@ -101,8 +100,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/pointdefense)
var/new_ident = input(user, "Enter a new ident tag.", "[src]", id_tag) as null|text
if(new_ident && new_ident != id_tag && user.Adjacent(src) && CanInteract(user, GLOB.tgui_physical_state))
// Check for duplicate controllers with this ID
- for(var/thing in GLOB.pointdefense_controllers)
- var/obj/machinery/pointdefense_control/PC = thing
+ for(var/obj/machinery/pointdefense_control/PC as anything in GLOB.pointdefense_controllers)
if(PC != src && PC.id_tag == id_tag)
to_chat(user, "The [new_ident] network already has a controller.")
return
@@ -208,8 +206,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/pointdefense)
if(!id_tag)
return null
var/list/connected_z_levels = GetConnectedZlevels(get_z(src))
- for(var/thing in GLOB.pointdefense_controllers)
- var/obj/machinery/pointdefense_control/PDC = thing
+ for(var/obj/machinery/pointdefense_control/PDC as anything in GLOB.pointdefense_controllers)
if(PDC.id_tag == id_tag && (get_z(PDC) in connected_z_levels))
return PDC
diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm
index 0b1e575596..1779fdb070 100644
--- a/code/game/machinery/portable_turret.dm
+++ b/code/game/machinery/portable_turret.dm
@@ -679,12 +679,11 @@
for(var/turf/T in oview(world.view, src))
seenturfs += T
- for(var/mob in living_mob_list)
- var/mob/M = mob
+ for(var/mob/M as anything in living_mob_list)
if(M.z != z) //Skip
continue
if(get_turf(M) in seenturfs)
- assess_and_assign(mob, targets, secondarytargets)
+ assess_and_assign(M, targets, secondarytargets)
/* This was dumb. Why do this and then check line of sight later?
for(var/mob/M in mobs_in_xray_view(world.view, src))
diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm
index 484c51012e..a4f5125b72 100644
--- a/code/game/objects/buckling.dm
+++ b/code/game/objects/buckling.dm
@@ -180,8 +180,7 @@
return M
/atom/movable/proc/handle_buckled_mob_movement(atom/old_loc, direct, movetime)
- for(var/A in buckled_mobs)
- var/mob/living/L = A
+ for(var/mob/living/L as anything in buckled_mobs)
if(!L.Move(loc, direct, movetime))
L.forceMove(loc, direct, movetime)
L.last_move = last_move
diff --git a/code/game/objects/effects/alien/aliens.dm b/code/game/objects/effects/alien/aliens.dm
index c0c01f3a46..5882723311 100644
--- a/code/game/objects/effects/alien/aliens.dm
+++ b/code/game/objects/effects/alien/aliens.dm
@@ -294,8 +294,7 @@
for(var/obj/effect/alien/weeds/W in orange(node_range, src))
nearby_weeds |= W
- for(var/nbw in nearby_weeds)
- var/obj/effect/alien/weeds/W = nbw
+ for(var/obj/effect/alien/weeds/W as anything in nearby_weeds)
if(!W.linked_node)
W.linked_node = src
diff --git a/code/game/objects/effects/map_effects/portal.dm b/code/game/objects/effects/map_effects/portal.dm
index 375bbcd336..ede5cbdaca 100644
--- a/code/game/objects/effects/map_effects/portal.dm
+++ b/code/game/objects/effects/map_effects/portal.dm
@@ -113,8 +113,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec
var/lowest_y = 0
// First pass is for finding the top right corner.
- for(var/thing in vis_contents)
- var/turf/T = thing
+ for(var/turf/T as anything in vis_contents)
if(T.x > highest_x)
highest_x = T.x
if(T.y > highest_y)
@@ -124,8 +123,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec
lowest_y = highest_y
// Second one is for the bottom left corner.
- for(var/thing in vis_contents)
- var/turf/T = thing
+ for(var/turf/T as anything in vis_contents)
if(T.x < lowest_x)
lowest_x = T.x
if(T.y < lowest_y)
@@ -182,8 +180,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec
// Connects both sides of a portal together.
/obj/effect/map_effect/portal/master/proc/find_counterparts()
- for(var/thing in GLOB.all_portal_masters)
- var/obj/effect/map_effect/portal/master/M = thing
+ for(var/obj/effect/map_effect/portal/master/M as anything in GLOB.all_portal_masters)
if(M == src)
continue
if(M.counterpart)
@@ -205,8 +202,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec
/obj/effect/map_effect/portal/master/proc/make_visuals()
var/list/observed_turfs = list()
- for(var/thing in portal_lines + src)
- var/obj/effect/map_effect/portal/P = thing
+ for(var/obj/effect/map_effect/portal/P as anything in portal_lines + src)
P.name = null
P.icon_state = null
@@ -230,8 +226,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec
// Shifts the portal's pixels in order to line up properly, as BYOND offsets the sprite when it holds multiple turfs inside `vis_contents`.
// This undos the shift that BYOND did.
/obj/effect/map_effect/portal/master/proc/apply_offset()
- for(var/thing in portal_lines + src)
- var/obj/effect/map_effect/portal/P = thing
+ for(var/obj/effect/map_effect/portal/P as anything in portal_lines + src)
P.pixel_x = WORLD_ICON_SIZE * P.portal_distance_x
P.pixel_y = WORLD_ICON_SIZE * P.portal_distance_y
@@ -245,8 +240,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec
var/list/in_range = get_mobs_and_objs_in_view_fast(T, world.view, 0)
var/list/mobs_to_relay = in_range["mobs"]
- for(var/thing in mobs_to_relay)
- var/mob/mob = thing
+ for(var/mob/mob as anything in mobs_to_relay)
var/rendered = "[text]"
mob.show_message(rendered)
@@ -261,8 +255,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec
var/list/in_range = get_mobs_and_objs_in_view_fast(T, world.view, 0)
var/list/mobs_to_relay = in_range["mobs"]
- for(var/thing in mobs_to_relay)
- var/mob/mob = thing
+ for(var/mob/mob as anything in mobs_to_relay)
mob.show_message(rendered)
..()
@@ -275,8 +268,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec
var/list/in_range = get_mobs_and_objs_in_view_fast(T, world.view, 0)
var/list/mobs_to_relay = in_range["mobs"]
- for(var/thing in mobs_to_relay)
- var/mob/mob = thing
+ for(var/mob/mob as anything in mobs_to_relay)
var/list/combined = mob.combine_message(message_pieces, verb, M)
var/message = combined["formatted"]
var/name_used = M.GetVoice()
@@ -296,8 +288,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec
var/obj/effect/map_effect/portal/master/other_master = counterpart
var/in_vis_contents = FALSE
- for(var/thing in other_master.portal_lines + other_master)
- var/obj/effect/map_effect/portal/P = thing
+ for(var/obj/effect/map_effect/portal/P as anything in other_master.portal_lines + other_master)
if(P in true_turf.vis_locs)
in_vis_contents = TRUE
break
diff --git a/code/game/objects/effects/map_effects/screen_shaker.dm b/code/game/objects/effects/map_effects/screen_shaker.dm
index 29568242e5..c8f5d413bd 100644
--- a/code/game/objects/effects/map_effects/screen_shaker.dm
+++ b/code/game/objects/effects/map_effects/screen_shaker.dm
@@ -11,8 +11,7 @@
var/shake_strength = 1 // How much it shakes.
/obj/effect/map_effect/interval/screen_shaker/trigger()
- for(var/A in player_list)
- var/mob/M = A
+ for(var/mob/M as anything in player_list)
if(M.z == src.z && get_dist(src, M) <= shake_radius)
shake_camera(M, shake_duration, shake_strength)
..()
\ No newline at end of file
diff --git a/code/game/objects/effects/temporary_visuals/projectiles/tracer.dm b/code/game/objects/effects/temporary_visuals/projectiles/tracer.dm
index 76e8015976..4c2f6b6e73 100644
--- a/code/game/objects/effects/temporary_visuals/projectiles/tracer.dm
+++ b/code/game/objects/effects/temporary_visuals/projectiles/tracer.dm
@@ -23,8 +23,7 @@
if(light_range > 0 && light_intensity > 0)
var/list/turf/line = getline(starting.return_turf(), ending.return_turf())
tracing_line:
- for(var/i in line)
- var/turf/T = i
+ for(var/turf/T as anything in line)
for(var/obj/effect/projectile_lighting/PL in T)
if(PL.owner == instance_key)
continue tracing_line
diff --git a/code/game/objects/items/devices/communicator/UI_tgui.dm b/code/game/objects/items/devices/communicator/UI_tgui.dm
index 989d68078e..3759d23d4e 100644
--- a/code/game/objects/items/devices/communicator/UI_tgui.dm
+++ b/code/game/objects/items/devices/communicator/UI_tgui.dm
@@ -24,8 +24,7 @@
cam_plane_masters = get_tgui_plane_masters()
- for(var/plane in cam_plane_masters)
- var/obj/screen/instance = plane
+ for(var/obj/screen/instance as anything in cam_plane_masters)
instance.assigned_map = map_name
instance.del_on_map_removal = FALSE
instance.screen_loc = "[map_name]:CENTER"
diff --git a/code/game/objects/items/devices/hacktool.dm b/code/game/objects/items/devices/hacktool.dm
index b221ff875c..e92c45e151 100644
--- a/code/game/objects/items/devices/hacktool.dm
+++ b/code/game/objects/items/devices/hacktool.dm
@@ -15,8 +15,7 @@
hack_state = new(src)
/obj/item/device/multitool/hacktool/Destroy()
- for(var/T in known_targets)
- var/atom/target = T
+ for(var/atom/target as anything in known_targets)
target.unregister(OBSERVER_EVENT_DESTROY, src)
known_targets.Cut()
qdel(hack_state)
diff --git a/code/game/objects/items/devices/radio/jammer.dm b/code/game/objects/items/devices/radio/jammer.dm
index ed52707904..ace17fa07d 100644
--- a/code/game/objects/items/devices/radio/jammer.dm
+++ b/code/game/objects/items/devices/radio/jammer.dm
@@ -4,8 +4,7 @@ var/global/list/active_radio_jammers = list()
var/turf/Tr = get_turf(radio)
if(!Tr) return 0 //Nullspace radios don't get jammed.
- for(var/jammer in active_radio_jammers)
- var/obj/item/device/radio_jammer/J = jammer
+ for(var/obj/item/device/radio_jammer/J as anything in active_radio_jammers)
var/turf/Tj = get_turf(J)
if(J.on && Tj.z == Tr.z) //If we're on the same Z, it's worth checking.
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index 79f38554b8..1fac4f3226 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -133,8 +133,7 @@ HALOGEN COUNTER - Radcount on mobs
var/unknown = 0
var/reagentdata[0]
var/unknownreagents[0]
- for(var/A in C.reagents.reagent_list)
- var/datum/reagent/R = A
+ for(var/datum/reagent/R as anything in C.reagents.reagent_list)
if(R.scannable)
reagentdata["[R.id]"] = "\t[round(C.reagents.get_reagent_amount(R.id), 1)]u [R.name][(R.overdose && R.volume > R.overdose) ? " - Overdose" : ""]
"
else
@@ -155,8 +154,7 @@ HALOGEN COUNTER - Radcount on mobs
var/unknown = 0
var/stomachreagentdata[0]
var/stomachunknownreagents[0]
- for(var/B in C.ingested.reagent_list)
- var/datum/reagent/R = B
+ for(var/datum/reagent/R as anything in C.ingested.reagent_list)
if(R.scannable)
stomachreagentdata["[R.id]"] = "\t[round(C.ingested.get_reagent_amount(R.id), 1)]u [R.name][(R.overdose && R.volume > R.overdose) ? " - Overdose" : ""]
"
if (advscan == 0 || showadvscan == 0)
@@ -179,8 +177,7 @@ HALOGEN COUNTER - Radcount on mobs
var/unknown = 0
var/touchreagentdata[0]
var/touchunknownreagents[0]
- for(var/B in C.touching.reagent_list)
- var/datum/reagent/R = B
+ for(var/datum/reagent/R as anything in C.touching.reagent_list)
if(R.scannable)
touchreagentdata["[R.id]"] = "\t[round(C.touching.get_reagent_amount(R.id), 1)]u [R.name][(R.overdose && R.can_overdose_touch && R.volume > R.overdose) ? " - Overdose" : ""]
"
if (advscan == 0 || showadvscan == 0)
diff --git a/code/game/objects/items/devices/scanners_vr.dm b/code/game/objects/items/devices/scanners_vr.dm
index b0c928e5a2..1722617106 100644
--- a/code/game/objects/items/devices/scanners_vr.dm
+++ b/code/game/objects/items/devices/scanners_vr.dm
@@ -54,8 +54,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob
// Gather potential subtargets
var/list/choices = list(M)
if(istype(M))
- for(var/belly in M.vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in M.vore_organs)
for(var/mob/living/carbon/human/H in B) // I do want an istype
choices += H
// Subtargets
diff --git a/code/game/objects/items/stacks/medical_vr.dm b/code/game/objects/items/stacks/medical_vr.dm
index 4599bb43f9..9ba54cea33 100644
--- a/code/game/objects/items/stacks/medical_vr.dm
+++ b/code/game/objects/items/stacks/medical_vr.dm
@@ -43,16 +43,14 @@
var/clotted = 0
var/too_far_gone = 0
- for(var/org in H.organs) //'organs' is just external organs, as opposed to 'internal_organs'
- var/obj/item/organ/external/affecting = org
+ for(var/obj/item/organ/external/affecting as anything in H.organs) //'organs' is just external organs, as opposed to 'internal_organs'
// No amount of clotting is going to help you here.
if(affecting.open)
too_far_gone++
continue
- for(var/wnd in affecting.wounds)
- var/datum/wound/W = wnd
+ for(var/datum/wound/W as anything in affecting.wounds)
// No need
if(W.bandaged)
continue
diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm
index 38e173e3ff..67d76a8c89 100644
--- a/code/game/objects/structures.dm
+++ b/code/game/objects/structures.dm
@@ -252,6 +252,5 @@
return TRUE
/obj/structure/proc/refresh_neighbors()
- for(var/thing in RANGE_TURFS(1, src))
- var/turf/T = thing
+ for(var/turf/T as anything in RANGE_TURFS(1, src))
T.update_icon()
diff --git a/code/game/objects/structures/electricchair.dm b/code/game/objects/structures/electricchair.dm
index ca515e230f..2859d55dfb 100644
--- a/code/game/objects/structures/electricchair.dm
+++ b/code/game/objects/structures/electricchair.dm
@@ -65,8 +65,7 @@
s.set_up(12, 1, src)
s.start()
if(has_buckled_mobs())
- for(var/a in buckled_mobs)
- var/mob/living/L = a
+ for(var/mob/living/L as anything in buckled_mobs)
L.burn_skin(85)
to_chat(L, "You feel a deep shock course through your body!")
sleep(1)
diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm
index 87f568f703..46a888e55f 100644
--- a/code/game/objects/structures/janicart.dm
+++ b/code/game/objects/structures/janicart.dm
@@ -456,8 +456,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
..()
update_layer()
if(has_buckled_mobs())
- for(var/A in buckled_mobs)
- var/mob/living/L = A
+ for(var/mob/living/L as anything in buckled_mobs)
if(L.loc != loc)
L.buckled = null //Temporary, so Move() succeeds.
L.buckled = src //Restoring
@@ -467,8 +466,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
/obj/structure/bed/chair/janicart/proc/update_mob()
if(has_buckled_mobs())
- for(var/A in buckled_mobs)
- var/mob/living/L = A
+ for(var/mob/living/L as anything in buckled_mobs)
L.set_dir(dir)
switch(dir)
if(SOUTH)
diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
index 164554652b..4a3c5b53ff 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
@@ -63,8 +63,7 @@
..()
update_layer()
if(has_buckled_mobs())
- for(var/A in buckled_mobs)
- var/mob/living/L = A
+ for(var/mob/living/L as anything in buckled_mobs)
L.set_dir(dir)
/obj/structure/bed/chair/verb/rotate_clockwise()
@@ -151,8 +150,7 @@
playsound(src, 'sound/effects/roll.ogg', 100, 1)
/obj/structure/bed/chair/office/handle_buckled_mob_movement(atom/new_loc, direction, movetime)
- for(var/A in buckled_mobs)
- var/mob/living/occupant = A
+ for(var/mob/living/occupant as anything in buckled_mobs)
occupant.buckled = null
occupant.Move(loc, direction, movetime)
occupant.buckled = src
diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm
index 461cc122bf..2521055dad 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm
@@ -51,8 +51,7 @@
. = ..()
if(.)
if(has_buckled_mobs())
- for(var/A in buckled_mobs)
- var/mob/living/L = A
+ for(var/mob/living/L as anything in buckled_mobs)
L.set_dir(dir)
/obj/structure/bed/chair/wheelchair/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -95,8 +94,7 @@
var/turf/T = null
//--1---Move occupant---1--//
if(has_buckled_mobs())
- for(var/A in buckled_mobs)
- var/mob/living/L = A
+ for(var/mob/living/L as anything in buckled_mobs)
L.buckled = null
step(L, direction)
L.buckled = src
@@ -128,8 +126,7 @@
. = ..()
playsound(src, 'sound/effects/roll.ogg', 75, 1)
if(has_buckled_mobs())
- for(var/A in buckled_mobs)
- var/mob/living/occupant = A
+ for(var/mob/living/occupant as anything in buckled_mobs)
if(!driving)
occupant.buckled = null
occupant.Move(src.loc)
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index 72474fea33..a8eb677840 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -265,12 +265,11 @@
/obj/machinery/shower/process()
if(!on) return
- for(var/thing in loc)
- var/atom/movable/AM = thing
- var/mob/living/L = thing
- if(istype(AM) && AM.simulated)
+ for(var/atom/movable/AM in loc)
+ if(AM.simulated)
wash(AM)
- if(istype(L))
+ if(isliving(AM))
+ var/mob/living/L = AM
process_heat(L)
wash_floor()
reagents.add_reagent("water", reagents.get_free_space())
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/game/sound.dm b/code/game/sound.dm
index 4635415058..0b2cf4b80e 100644
--- a/code/game/sound.dm
+++ b/code/game/sound.dm
@@ -17,8 +17,7 @@
var/list/listeners = player_list
if(!ignore_walls) //these sounds don't carry through walls
listeners = listeners & hearers(maxdistance,turf_source)
- for(var/P in listeners)
- var/mob/M = P
+ for(var/mob/M as anything in listeners)
if(!M || !M.client)
continue
var/turf/T = get_turf(M)
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index 10e78e83ee..5a6495d638 100644
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -239,19 +239,17 @@
/turf/proc/AdjacentTurfs(var/check_blockage = TRUE)
. = list()
- for(var/t in (trange(1,src) - src))
- var/turf/T = t
+ for(var/turf/T as anything in (trange(1,src) - src))
if(check_blockage)
if(!T.density)
if(!LinkBlocked(src, T) && !TurfBlockedNonWindow(T))
- . += t
+ . += T
else
- . += t
+ . += T
/turf/proc/CardinalTurfs(var/check_blockage = TRUE)
. = list()
- for(var/ad in AdjacentTurfs(check_blockage))
- var/turf/T = ad
+ for(var/turf/T as anything in AdjacentTurfs(check_blockage))
if(T.x == src.x || T.y == src.y)
. += T
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/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm
index 0d9bceb996..60542d5a05 100644
--- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm
+++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm
@@ -238,8 +238,7 @@ Example: USING PROCCALL = BLOCKING, SELECT = FORCE_NULLS, PRIORITY = HIGH SELECT
do
CHECK_TICK
finished = TRUE
- for(var/i in running)
- var/datum/SDQL2_query/query = i
+ for(var/datum/SDQL2_query/query as anything in running)
if(QDELETED(query))
running -= query
continue
@@ -562,8 +561,7 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/SDQL2_VV_all, new(null
location = list(location)
if(type == "*")
- for(var/i in location)
- var/datum/d = i
+ for(var/datum/d as anything in location)
if(d.can_vv_get() || superuser)
out += d
SDQL2_TICK_CHECK
diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm
index 20d3bad3c7..1943147aee 100644
--- a/code/modules/admin/verbs/adminhelp.dm
+++ b/code/modules/admin/verbs/adminhelp.dm
@@ -82,8 +82,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
return
var/list/dat = list("[title]")
dat += "Refresh
"
- for(var/I in l2b)
- var/datum/admin_help/AH = I
+ for(var/datum/admin_help/AH as anything in l2b)
dat += "Ticket #[AH.id]: [AH.initiator_key_name]: [AH.name]
"
usr << browse(dat.Join(), "window=ahelp_list[state];size=600x480")
@@ -92,8 +91,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
/datum/admin_help_tickets/proc/stat_entry()
var/num_disconnected = 0
stat("Active Tickets:", astatclick.update("[active_tickets.len]"))
- for(var/I in active_tickets)
- var/datum/admin_help/AH = I
+ for(var/datum/admin_help/AH as anything in active_tickets)
if(AH.initiator)
stat("#[AH.id]. [AH.initiator_key_name]:", AH.statclick.update())
else
@@ -119,8 +117,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
//Get a ticket given a ckey
/datum/admin_help_tickets/proc/CKey2ActiveTicket(ckey)
- for(var/I in active_tickets)
- var/datum/admin_help/AH = I
+ for(var/datum/admin_help/AH as anything in active_tickets)
if(AH.initiator_ckey == ckey)
return AH
@@ -669,8 +666,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
/proc/ircadminwho()
var/list/message = list("Admins: ")
var/list/admin_keys = list()
- for(var/adm in GLOB.admins)
- var/client/C = adm
+ for(var/client/C as anything in GLOB.admins)
admin_keys += "[C][C.holder.fakekey ? "(Stealth)" : ""][C.is_afk() ? "(AFK)" : ""]"
for(var/admin in admin_keys)
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index 754b650332..827eb3aa7f 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -282,8 +282,7 @@ Ccomp's first proc.
GLOB.respawn_timers -= target
var/found_client = FALSE
- for(var/c in GLOB.clients)
- var/client/C = c
+ for(var/client/C as anything in GLOB.clients)
if(C.ckey == target)
found_client = C
to_chat(C, "You may now respawn. You should roleplay as if you learned nothing about the round during your time with the dead.")
diff --git a/code/modules/admin/view_variables/modify_variables.dm b/code/modules/admin/view_variables/modify_variables.dm
index 6f354e9b63..8863e76533 100644
--- a/code/modules/admin/view_variables/modify_variables.dm
+++ b/code/modules/admin/view_variables/modify_variables.dm
@@ -46,8 +46,7 @@ GLOBAL_PROTECT(VVpixelmovement)
var/things = get_all_of_type(type, subtypes)
var/i = 0
- for(var/thing in things)
- var/datum/D = thing
+ for(var/datum/D as anything in things)
i++
//try one of 3 methods to shorten the type text:
// fancy type,
diff --git a/code/modules/ai/ai_holder.dm b/code/modules/ai/ai_holder.dm
index edd55a4c04..78f16a96a0 100644
--- a/code/modules/ai/ai_holder.dm
+++ b/code/modules/ai/ai_holder.dm
@@ -175,11 +175,10 @@
var/list/choices = list()
for(var/typechoice in types)
var/list/found = list()
- for(var/mob in searching) // Isnt't there a helper for this, maybe? I forget.
- var/atom/M = mob
+ for(var/atom/M as anything in searching) // Isnt't there a helper for this, maybe? I forget.
if(!(M.z in levels_working))
continue
- if(!istype(mob,typechoice))
+ if(!istype(M,typechoice))
continue
found += M
choices["[typechoice] ([found.len])"] = found // Prettified name for the user input below)
@@ -190,8 +189,7 @@
href_list["datumrefresh"] = "\ref[src]"
return
var/list/selected = choices[choice]
- for(var/mob in selected)
- var/mob/living/L = mob
+ for(var/mob/living/L as anything in selected)
if(!istype(L))
to_chat(usr,"Skipping incompatible mob: [L] [ADMIN_COORDJMP(L)]")
continue
diff --git a/code/modules/ai/ai_holder_combat.dm b/code/modules/ai/ai_holder_combat.dm
index e2e1ecbdea..760031985e 100644
--- a/code/modules/ai/ai_holder_combat.dm
+++ b/code/modules/ai/ai_holder_combat.dm
@@ -132,8 +132,7 @@
ai_log("test_projectile_safety() : Test projectile did[!would_hit_primary_target ? " NOT " : " "]hit \the [AM]", AI_LOG_DEBUG)
// Make sure we don't have a chance to shoot our friends.
- for(var/a in hit_things)
- var/atom/A = a
+ for(var/atom/A as anything in hit_things)
ai_log("test_projectile_safety() : Evaluating \the [A] ([A.type]).", AI_LOG_TRACE)
if(isliving(A)) // Don't shoot at our friends, even if they're behind the target, as RNG can make them get hit.
var/mob/living/L = A
diff --git a/code/modules/ai/ai_holder_communication.dm b/code/modules/ai/ai_holder_communication.dm
index beddb68924..caafe5c8b8 100644
--- a/code/modules/ai/ai_holder_communication.dm
+++ b/code/modules/ai/ai_holder_communication.dm
@@ -84,8 +84,7 @@
if(rand(0,200) < speak_chance)
// Check if anyone is around to 'appreciate' what we say.
var/alone = TRUE
- for(var/m in viewers(holder))
- var/mob/M = m
+ for(var/mob/M as anything in viewers(holder))
if(M.client)
alone = FALSE
break
diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm
index af697777f9..66ed0c186a 100644
--- a/code/modules/assembly/infrared.dm
+++ b/code/modules/assembly/infrared.dm
@@ -127,8 +127,7 @@
return TRUE
if("visible")
visible = !visible
- for(var/ibeam in i_beams)
- var/obj/effect/beam/i_beam/I = ibeam
+ for(var/obj/effect/beam/i_beam/I as anything in i_beams)
I.visible = visible
CHECK_TICK
return TRUE
diff --git a/code/modules/asset_cache/asset_list_items.dm b/code/modules/asset_cache/asset_list_items.dm
index e92d5b1719..88cbfa16f7 100644
--- a/code/modules/asset_cache/asset_list_items.dm
+++ b/code/modules/asset_cache/asset_list_items.dm
@@ -375,8 +375,7 @@
/datum/asset/spritesheet/vending/register()
populate_vending_products()
- for(var/k in GLOB.vending_products)
- var/atom/item = k
+ for(var/atom/item as anything in GLOB.vending_products)
if(!ispath(item, /atom))
continue
diff --git a/code/modules/awaymissions/loot_vr.dm b/code/modules/awaymissions/loot_vr.dm
index 17509ce12e..d602eb9da2 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/blob2/blobs/base_blob.dm b/code/modules/blob2/blobs/base_blob.dm
index f9c9eb588d..14f7eb54c0 100644
--- a/code/modules/blob2/blobs/base_blob.dm
+++ b/code/modules/blob2/blobs/base_blob.dm
@@ -111,8 +111,7 @@ GLOBAL_LIST_EMPTY(all_blobs)
shuffle_inplace(blobs_to_affect)
- for(var/L in blobs_to_affect)
- var/obj/structure/blob/B = L
+ for(var/obj/structure/blob/B as anything in blobs_to_affect)
if(B.faction != faction)
continue
diff --git a/code/modules/blob2/blobs/core.dm b/code/modules/blob2/blobs/core.dm
index cd4a68a308..2b5cefa89d 100644
--- a/code/modules/blob2/blobs/core.dm
+++ b/code/modules/blob2/blobs/core.dm
@@ -197,8 +197,7 @@ var/list/blob_cores = list()
if(!difficulty_threshold)
return
var/list/valid_types = list()
- for(var/thing in subtypesof(/datum/blob_type))
- var/datum/blob_type/BT = thing
+ for(var/datum/blob_type/BT as anything in subtypesof(/datum/blob_type))
if(initial(BT.difficulty) > difficulty_threshold) // Too hard.
continue
if(initial(BT.difficulty) < difficulty_floor) // Too easy.
diff --git a/code/modules/blob2/overmind/overmind.dm b/code/modules/blob2/overmind/overmind.dm
index 6df0cba629..cdfe6d766a 100644
--- a/code/modules/blob2/overmind/overmind.dm
+++ b/code/modules/blob2/overmind/overmind.dm
@@ -57,14 +57,12 @@ var/list/overminds = list()
return ..(newloc)
/mob/observer/blob/Destroy()
- for(var/BL in GLOB.all_blobs)
- var/obj/structure/blob/B = BL
+ for(var/obj/structure/blob/B as anything in GLOB.all_blobs)
if(B && B.overmind == src)
B.overmind = null
B.update_icon() //reset anything that was ours
- for(var/BLO in blob_mobs)
- var/mob/living/simple_mob/blob/spore/BM = BLO
+ for(var/mob/living/simple_mob/blob/spore/BM as anything in blob_mobs)
if(BM)
BM.overmind = null
BM.update_icons()
diff --git a/code/modules/blob2/overmind/types/synchronous_mesh.dm b/code/modules/blob2/overmind/types/synchronous_mesh.dm
index e234756b2d..acf9441b71 100644
--- a/code/modules/blob2/overmind/types/synchronous_mesh.dm
+++ b/code/modules/blob2/overmind/types/synchronous_mesh.dm
@@ -34,8 +34,7 @@
if(!istype(C, /obj/structure/blob/core) && !istype(C, /obj/structure/blob/node) && C.overmind && (C.overmind == B.overmind) ) //if it doesn't have the same 'ownership' or is a core or node, don't split damage to it
blobs_to_hurt += C
- for(var/thing in blobs_to_hurt)
- var/obj/structure/blob/C = thing
+ for(var/obj/structure/blob/C as anything in blobs_to_hurt)
if(C == B)
continue // We'll damage this later.
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/catalogue/cataloguer.dm b/code/modules/catalogue/cataloguer.dm
index 8f7f3152f3..92ed97f347 100644
--- a/code/modules/catalogue/cataloguer.dm
+++ b/code/modules/catalogue/cataloguer.dm
@@ -78,8 +78,7 @@ GLOBAL_LIST_EMPTY(all_cataloguers)
if(isturf(target) && (!target.can_catalogue()))
var/turf/T = target
- for(var/a in T) // If we can't scan the turf, see if we can scan anything on it, to help with aiming.
- var/atom/A = a
+ for(var/atom/A as anything in T) // If we can't scan the turf, see if we can scan anything on it, to help with aiming.
if(A.can_catalogue())
target = A
break
@@ -149,8 +148,7 @@ GLOBAL_LIST_EMPTY(all_cataloguers)
// Figure out who may have helped out.
var/list/contributers = list()
var/list/contributer_names = list()
- for(var/thing in player_list)
- var/mob/living/L = thing
+ for(var/mob/living/L as anything in player_list)
if(L == user)
continue
if(!istype(L))
@@ -169,8 +167,7 @@ GLOBAL_LIST_EMPTY(all_cataloguers)
if(istype(I))
var/list/discoveries = I.discover(user, list(user.name) + contributer_names) // If one discovery leads to another, the list returned will have all of them.
if(LAZYLEN(discoveries))
- for(var/D in discoveries)
- var/datum/category_item/catalogue/data = D
+ for(var/datum/category_item/catalogue/data as anything in discoveries)
points_gained += data.value
// Give out points.
@@ -208,23 +205,20 @@ GLOBAL_LIST_EMPTY(all_cataloguers)
// First, get everything able to be scanned.
var/list/scannable_atoms = list()
- for(var/a in view(world.view, user))
- var/atom/A = a
+ for(var/atom/A as anything in view(world.view, user))
if(A.can_catalogue()) // Not passing the user is intentional, so they don't get spammed.
scannable_atoms += A
// Highlight things able to be scanned.
var/filter = filter(type = "outline", size = 1, color = "#00FF00")
- for(var/a in scannable_atoms)
- var/atom/A = a
+ for(var/atom/A as anything in scannable_atoms)
A.filters += filter
to_chat(user, span("notice", "\The [src] is highlighting scannable objects in green, if any exist."))
sleep(2 SECONDS)
// Remove the highlights.
- for(var/a in scannable_atoms)
- var/atom/A = a
+ for(var/atom/A as anything in scannable_atoms)
if(QDELETED(A))
continue
A.filters -= filter
@@ -271,14 +265,12 @@ GLOBAL_LIST_EMPTY(all_cataloguers)
else
dat += "
"
- for(var/G in GLOB.catalogue_data.categories)
- var/datum/category_group/group = G
+ for(var/datum/category_group/group as anything in GLOB.catalogue_data.categories)
var/list/group_dat = list()
var/show_group = FALSE
group_dat += "[group.name]"
- for(var/I in group.items)
- var/datum/category_item/catalogue/item = I
+ for(var/datum/category_item/catalogue/item as anything in group.items)
if(item.visible || debug)
group_dat += "[item.name]"
show_group = TRUE
diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm
index bd905205f4..f68ddc011d 100644
--- a/code/modules/client/client procs.dm
+++ b/code/modules/client/client procs.dm
@@ -74,13 +74,12 @@
if(href_list["discord_reg"])
var/their_id = html_decode(href_list["discord_reg"])
var/sane = FALSE
- for(var/item in GLOB.pending_discord_registrations)
- var/list/L = item
+ for(var/list/L as anything in GLOB.pending_discord_registrations)
if(!islist(L))
- GLOB.pending_discord_registrations -= item
+ GLOB.pending_discord_registrations -= L
continue
if(L["ckey"] == ckey && L["id"] == their_id)
- GLOB.pending_discord_registrations -= list(item)
+ GLOB.pending_discord_registrations -= list(L)
var/time = L["time"]
if((world.realtime - time) > 10 MINUTES)
to_chat(src, "Sorry, that link has expired. Please request another on Discord.")
diff --git a/code/modules/client/preference_setup/global/02_settings.dm b/code/modules/client/preference_setup/global/02_settings.dm
index f213c15a8a..8f047985c7 100644
--- a/code/modules/client/preference_setup/global/02_settings.dm
+++ b/code/modules/client/preference_setup/global/02_settings.dm
@@ -29,8 +29,7 @@
// Arrange preferences that have never been enabled/disabled.
var/list/client_preference_keys = list()
- for(var/cp in get_client_preferences())
- var/datum/client_preference/client_pref = cp
+ for(var/datum/client_preference/client_pref as anything in get_client_preferences())
client_preference_keys += client_pref.key
if((client_pref.key in pref.preferences_enabled) || (client_pref.key in pref.preferences_disabled))
continue
@@ -57,8 +56,7 @@
. += "Preferences
"
. += ""
var/mob/pref_mob = preference_mob()
- for(var/cp in get_client_preferences())
- var/datum/client_preference/client_pref = cp
+ for(var/datum/client_preference/client_pref as anything in get_client_preferences())
if(!client_pref.may_toggle(pref_mob))
continue
diff --git a/code/modules/client/preference_setup/global/setting_datums.dm b/code/modules/client/preference_setup/global/setting_datums.dm
index 24ce8f1d33..7138d28626 100644
--- a/code/modules/client/preference_setup/global/setting_datums.dm
+++ b/code/modules/client/preference_setup/global/setting_datums.dm
@@ -5,8 +5,7 @@ var/list/_client_preferences_by_type
/proc/get_client_preferences()
if(!_client_preferences)
_client_preferences = list()
- for(var/ct in subtypesof(/datum/client_preference))
- var/datum/client_preference/client_type = ct
+ for(var/datum/client_preference/client_type as anything in subtypesof(/datum/client_preference))
if(initial(client_type.description))
_client_preferences += new client_type()
return _client_preferences
@@ -21,16 +20,14 @@ var/list/_client_preferences_by_type
/proc/get_client_preference_by_key(var/preference)
if(!_client_preferences_by_key)
_client_preferences_by_key = list()
- for(var/ct in get_client_preferences())
- var/datum/client_preference/client_pref = ct
+ for(var/datum/client_preference/client_pref as anything in get_client_preferences())
_client_preferences_by_key[client_pref.key] = client_pref
return _client_preferences_by_key[preference]
/proc/get_client_preference_by_type(var/preference)
if(!_client_preferences_by_type)
_client_preferences_by_type = list()
- for(var/ct in get_client_preferences())
- var/datum/client_preference/client_pref = ct
+ for(var/datum/client_preference/client_pref as anything in get_client_preferences())
_client_preferences_by_type[client_pref.type] = client_pref
return _client_preferences_by_type[preference]
diff --git a/code/modules/client/preference_setup/loadout/loadout.dm b/code/modules/client/preference_setup/loadout/loadout.dm
index e01d5f0b24..f16815d356 100644
--- a/code/modules/client/preference_setup/loadout/loadout.dm
+++ b/code/modules/client/preference_setup/loadout/loadout.dm
@@ -12,9 +12,8 @@ var/list/gear_datums = list()
/hook/startup/proc/populate_gear_list()
//create a list of gear datums to sort
- for(var/geartype in typesof(/datum/gear)-/datum/gear)
- var/datum/gear/G = geartype
- if(initial(G.type_category) == geartype)
+ for(var/datum/gear/G as anything in subtypesof(/datum/gear))
+ if(initial(G.type_category) == G)
continue
var/use_name = initial(G.display_name)
var/use_category = initial(G.sort_category)
@@ -32,7 +31,7 @@ var/list/gear_datums = list()
if(!loadout_categories[use_category])
loadout_categories[use_category] = new /datum/loadout_category(use_category)
var/datum/loadout_category/LC = loadout_categories[use_category]
- gear_datums[use_name] = new geartype
+ gear_datums[use_name] = new G
LC.gear[use_name] = gear_datums[use_name]
loadout_categories = sortAssoc(loadout_categories)
diff --git a/code/modules/client/preference_setup/loadout/loadout_accessories.dm b/code/modules/client/preference_setup/loadout/loadout_accessories.dm
index b9c446fb87..07c1b7f1be 100644
--- a/code/modules/client/preference_setup/loadout/loadout_accessories.dm
+++ b/code/modules/client/preference_setup/loadout/loadout_accessories.dm
@@ -13,8 +13,7 @@
/datum/gear/accessory/armband/New()
..()
var/list/armbands = list()
- for(var/armband in (typesof(/obj/item/clothing/accessory/armband) - typesof(/obj/item/clothing/accessory/armband/med/color)))
- var/obj/item/clothing/accessory/armband_type = armband
+ for(var/obj/item/clothing/accessory/armband_type as anything in (typesof(/obj/item/clothing/accessory/armband) - typesof(/obj/item/clothing/accessory/armband/med/color)))
armbands[initial(armband_type.name)] = armband_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(armbands))
@@ -71,8 +70,7 @@
/datum/gear/accessory/wcoat/New()
..()
var/list/wcoats = list()
- for(var/wcoat in typesof(/obj/item/clothing/accessory/wcoat))
- var/obj/item/clothing/accessory/wcoat_type = wcoat
+ for(var/obj/item/clothing/accessory/wcoat_type as anything in typesof(/obj/item/clothing/accessory/wcoat))
wcoats[initial(wcoat_type.name)] = wcoat_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(wcoats))
@@ -84,8 +82,7 @@
/datum/gear/accessory/holster/New()
..()
var/list/holsters = list()
- for(var/holster in typesof(/obj/item/clothing/accessory/holster))
- var/obj/item/clothing/accessory/holster_type = holster
+ for(var/obj/item/clothing/accessory/holster_type as anything in typesof(/obj/item/clothing/accessory/holster))
holsters[initial(holster_type.name)] = holster_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(holsters))
@@ -97,8 +94,7 @@
/datum/gear/accessory/tie/New()
..()
var/list/ties = list()
- for(var/tie in typesof(/obj/item/clothing/accessory/tie))
- var/obj/item/clothing/accessory/tie_type = tie
+ for(var/obj/item/clothing/accessory/tie_type as anything in typesof(/obj/item/clothing/accessory/tie))
ties[initial(tie_type.name)] = tie_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(ties))
@@ -110,8 +106,7 @@
/datum/gear/accessory/scarf/New()
..()
var/list/scarfs = list()
- for(var/scarf in typesof(/obj/item/clothing/accessory/scarf))
- var/obj/item/clothing/accessory/scarf_type = scarf
+ for(var/obj/item/clothing/accessory/scarf_type as anything in typesof(/obj/item/clothing/accessory/scarf))
scarfs[initial(scarf_type.name)] = scarf_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(scarfs))
@@ -132,8 +127,7 @@
/datum/gear/accessory/jacket/New()
..()
var/list/jackets = list()
- for(var/jacket in typesof(/obj/item/clothing/accessory/jacket))
- var/obj/item/clothing/accessory/jacket_type = jacket
+ for(var/obj/item/clothing/accessory/jacket_type as anything in typesof(/obj/item/clothing/accessory/jacket))
jackets[initial(jacket_type.name)] = jacket_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(jackets))
@@ -179,8 +173,7 @@
/datum/gear/accessory/fannypack/New()
..()
var/list/fannys = list()
- for(var/fanny in typesof(/obj/item/weapon/storage/belt/fannypack))
- var/obj/item/weapon/storage/belt/fannypack/fanny_type = fanny
+ for(var/obj/item/weapon/storage/belt/fannypack/fanny_type as anything in typesof(/obj/item/weapon/storage/belt/fannypack))
fannys[initial(fanny_type.name)] = fanny_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(fannys))
@@ -280,8 +273,7 @@
/datum/gear/accessory/asym/New()
..()
var/list/asyms = list()
- for(var/asym in typesof(/obj/item/clothing/accessory/asymmetric))
- var/obj/item/clothing/accessory/asymmetric_type = asym
+ for(var/obj/item/clothing/accessory/asymmetric_type as anything in typesof(/obj/item/clothing/accessory/asymmetric))
asyms[initial(asymmetric_type.name)] = asymmetric_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(asyms))
diff --git a/code/modules/client/preference_setup/loadout/loadout_general.dm b/code/modules/client/preference_setup/loadout/loadout_general.dm
index 719eb6fcfc..8b566fe3c9 100644
--- a/code/modules/client/preference_setup/loadout/loadout_general.dm
+++ b/code/modules/client/preference_setup/loadout/loadout_general.dm
@@ -53,8 +53,7 @@
/datum/gear/plushie/New()
..()
var/list/plushies = list()
- for(var/plushie in subtypesof(/obj/item/toy/plushie/) - /obj/item/toy/plushie/therapy)
- var/obj/item/toy/plushie/plushie_type = plushie
+ 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))
@@ -66,8 +65,7 @@
/datum/gear/figure/New()
..()
var/list/figures = list()
- for(var/figure in typesof(/obj/item/toy/figure/) - /obj/item/toy/figure)
- var/obj/item/toy/figure/figure_type = 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 94739c56bb..9b72d27aba 100644
--- a/code/modules/client/preference_setup/loadout/loadout_general_vr.dm
+++ b/code/modules/client/preference_setup/loadout/loadout_general_vr.dm
@@ -6,8 +6,7 @@
/datum/gear/ball/New()
..()
var/list/balls = list()
- for(var/ball in typesof(/obj/item/toy/tennis/))
- var/obj/item/toy/tennis/ball_type = ball
+ for(var/obj/item/toy/tennis/ball_type as anything in typesof(/obj/item/toy/tennis/))
balls[initial(ball_type.name)] = ball_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(balls))
@@ -19,8 +18,7 @@
/datum/gear/character/New()
..()
var/list/characters = list()
- for(var/character in typesof(/obj/item/toy/character/) - /obj/item/toy/character)
- var/obj/item/toy/character/character_type = 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))
@@ -32,8 +30,7 @@
/datum/gear/mechtoy/New()
..()
var/list/mechs = list()
- for(var/mech in typesof(/obj/item/toy/mecha/) - /obj/item/toy/mecha/)
- var/obj/item/toy/mecha/mech_type = mech
+ 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/preference_setup/loadout/loadout_head.dm b/code/modules/client/preference_setup/loadout/loadout_head.dm
index ee161f598d..ba7d818dbd 100644
--- a/code/modules/client/preference_setup/loadout/loadout_head.dm
+++ b/code/modules/client/preference_setup/loadout/loadout_head.dm
@@ -169,8 +169,7 @@
/datum/gear/head/pin/New()
..()
var/list/pins = list()
- for(var/pin in typesof(/obj/item/clothing/head/pin))
- var/obj/item/clothing/head/pin/pin_type = pin
+ for(var/obj/item/clothing/head/pin/pin_type as anything in typesof(/obj/item/clothing/head/pin))
pins[initial(pin_type.name)] = pin_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(pins))
@@ -182,8 +181,7 @@
/datum/gear/head/hardhat/New()
..()
var/list/hardhats = list()
- for(var/hardhat in typesof(/obj/item/clothing/head/hardhat))
- var/obj/item/clothing/head/hardhat/hardhat_type = hardhat
+ for(var/obj/item/clothing/head/hardhat/hardhat_type as anything in typesof(/obj/item/clothing/head/hardhat))
hardhats[initial(hardhat_type.name)] = hardhat_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(hardhats))
@@ -223,8 +221,7 @@
/datum/gear/head/santahat/New()
..()
var/list/santahats = list()
- for(var/santahat in typesof(/obj/item/clothing/head/santa))
- var/obj/item/clothing/head/santa/santahat_type = santahat
+ for(var/obj/item/clothing/head/santa/santahat_type as anything in typesof(/obj/item/clothing/head/santa))
santahats[initial(santahat_type.name)] = santahat_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(santahats))
diff --git a/code/modules/client/preference_setup/loadout/loadout_smoking.dm b/code/modules/client/preference_setup/loadout/loadout_smoking.dm
index 96db8bf2fe..f9442518b2 100644
--- a/code/modules/client/preference_setup/loadout/loadout_smoking.dm
+++ b/code/modules/client/preference_setup/loadout/loadout_smoking.dm
@@ -48,7 +48,6 @@
/datum/gear/cigarettes/New()
..()
var/list/cigarettes = list()
- for(var/cigarette in (typesof(/obj/item/weapon/storage/fancy/cigarettes) - typesof(/obj/item/weapon/storage/fancy/cigarettes/killthroat)))
- var/obj/item/weapon/storage/fancy/cigarettes/cigarette_brand = cigarette
+ for(var/obj/item/weapon/storage/fancy/cigarettes/cigarette_brand as anything in (typesof(/obj/item/weapon/storage/fancy/cigarettes) - typesof(/obj/item/weapon/storage/fancy/cigarettes/killthroat)))
cigarettes[initial(cigarette_brand.name)] = cigarette_brand
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(cigarettes))
diff --git a/code/modules/client/preference_setup/loadout/loadout_uniform.dm b/code/modules/client/preference_setup/loadout/loadout_uniform.dm
index 4d9e530992..5b7bc83757 100644
--- a/code/modules/client/preference_setup/loadout/loadout_uniform.dm
+++ b/code/modules/client/preference_setup/loadout/loadout_uniform.dm
@@ -16,8 +16,7 @@
/datum/gear/uniform/cheongsam/New()
..()
var/list/cheongasms = list()
- for(var/cheongasm in typesof(/obj/item/clothing/under/cheongsam))
- var/obj/item/clothing/under/cheongsam/cheongasm_type = cheongasm
+ for(var/obj/item/clothing/under/cheongsam/cheongasm_type as anything in typesof(/obj/item/clothing/under/cheongsam))
cheongasms[initial(cheongasm_type.name)] = cheongasm_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(cheongasms))
@@ -28,8 +27,7 @@
/datum/gear/uniform/croptop/New()
..()
var/list/croptops = list()
- for(var/croptop in typesof(/obj/item/clothing/under/croptop))
- var/obj/item/clothing/under/croptop/croptop_type = croptop
+ for(var/obj/item/clothing/under/croptop/croptop_type as anything in typesof(/obj/item/clothing/under/croptop))
croptops[initial(croptop_type.name)] = croptop_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(croptops))
@@ -52,8 +50,7 @@
/datum/gear/uniform/jumpsuit/New()
..()
var/list/jumpclothes = list()
- for(var/jump in typesof(/obj/item/clothing/under/color))
- var/obj/item/clothing/under/color/jumps = jump
+ for(var/obj/item/clothing/under/color/jumps as anything in typesof(/obj/item/clothing/under/color))
jumpclothes[initial(jumps.name)] = jumps
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(jumpclothes))
@@ -78,8 +75,7 @@
/datum/gear/uniform/pants/New()
..()
var/list/pants = list()
- for(var/pant in typesof(/obj/item/clothing/under/pants))
- var/obj/item/clothing/under/pants/pant_type = pant
+ for(var/obj/item/clothing/under/pants/pant_type as anything in typesof(/obj/item/clothing/under/pants))
pants[initial(pant_type.name)] = pant_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(pants))
@@ -90,8 +86,7 @@
/datum/gear/uniform/shorts/New()
..()
var/list/shorts = list()
- for(var/short in typesof(/obj/item/clothing/under/shorts))
- var/obj/item/clothing/under/pants/short_type = short
+ for(var/obj/item/clothing/under/pants/short_type as anything in typesof(/obj/item/clothing/under/shorts))
shorts[initial(short_type.name)] = short_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(shorts))
@@ -212,8 +207,7 @@
/datum/gear/uniform/suit/lawyer/New()
..()
var/list/lsuits = list()
- for(var/lsuit in typesof(/obj/item/clothing/under/lawyer))
- var/obj/item/clothing/suit/lsuit_type = lsuit
+ for(var/obj/item/clothing/suit/lsuit_type as anything in typesof(/obj/item/clothing/under/lawyer))
lsuits[initial(lsuit_type.name)] = lsuit_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(lsuits))
@@ -273,8 +267,7 @@
/datum/gear/uniform/scrub/New()
..()
var/list/scrubs = list()
- for(var/scrub in typesof(/obj/item/clothing/under/rank/medical/scrubs))
- var/obj/item/clothing/under/rank/medical/scrubs/scrub_type = scrub
+ for(var/obj/item/clothing/under/rank/medical/scrubs/scrub_type as anything in typesof(/obj/item/clothing/under/rank/medical/scrubs))
scrubs[initial(scrub_type.name)] = scrub_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(scrubs))
@@ -396,8 +389,7 @@
/datum/gear/uniform/dresses/maid/New()
..()
var/list/maids = list()
- for(var/maid in typesof(/obj/item/clothing/under/dress/maid))
- var/obj/item/clothing/under/dress/maid/maid_type = maid
+ for(var/obj/item/clothing/under/dress/maid/maid_type as anything in typesof(/obj/item/clothing/under/dress/maid))
maids[initial(maid_type.name)] = maid_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(maids))
diff --git a/code/modules/client/preference_setup/loadout/loadout_uniform_vr.dm b/code/modules/client/preference_setup/loadout/loadout_uniform_vr.dm
index a165232e1a..448b7747e4 100644
--- a/code/modules/client/preference_setup/loadout/loadout_uniform_vr.dm
+++ b/code/modules/client/preference_setup/loadout/loadout_uniform_vr.dm
@@ -183,8 +183,7 @@ Swimsuits
/datum/gear/uniform/swimsuits/New()
..()
var/list/swimsuits = list()
- for(var/swimsuit in typesof(/obj/item/weapon/storage/box/fluff/swimsuit))
- var/obj/item/weapon/storage/box/fluff/swimsuit/swimsuit_type = swimsuit
+ for(var/obj/item/weapon/storage/box/fluff/swimsuit/swimsuit_type as anything in typesof(/obj/item/weapon/storage/box/fluff/swimsuit))
swimsuits[initial(swimsuit_type.name)] = swimsuit_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(swimsuits))
diff --git a/code/modules/client/preference_setup/loadout/loadout_utility.dm b/code/modules/client/preference_setup/loadout/loadout_utility.dm
index 4798a4b994..d185ca2608 100644
--- a/code/modules/client/preference_setup/loadout/loadout_utility.dm
+++ b/code/modules/client/preference_setup/loadout/loadout_utility.dm
@@ -21,8 +21,7 @@
/datum/gear/utility/communicator/New()
..()
var/list/communicators = list()
- for(var/communicator in typesof(/obj/item/device/communicator) - list(/obj/item/device/communicator/integrated,/obj/item/device/communicator/commlink)) //VOREStation Edit - Remove Commlink
- var/obj/item/device/communicator_type = communicator
+ for(var/obj/item/device/communicator_type as anything in typesof(/obj/item/device/communicator) - list(/obj/item/device/communicator/integrated,/obj/item/device/communicator/commlink)) //VOREStation Edit - Remove Commlink
communicators[initial(communicator_type.name)] = communicator_type
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(communicators))
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/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm
index c0cde563a8..a69eee2e7f 100644
--- a/code/modules/clothing/chameleon.dm
+++ b/code/modules/clothing/chameleon.dm
@@ -24,15 +24,14 @@
. = list()
var/i = 1 //in case there is a collision with both name AND icon_state
- for(var/typepath in typesof(basetype) - blacklist)
- var/obj/O = typepath
+ for(var/obj/O as anything in typesof(basetype) - blacklist)
if(initial(O.icon) && initial(O.icon_state))
var/name = initial(O.name)
if(name in .)
name += " ([initial(O.icon_state)])"
if(name in .)
name += " \[[i++]\]"
- .[name] = typepath
+ .[name] = O
/obj/item/clothing/under/chameleon
//starts off as black
diff --git a/code/modules/clothing/clothing_accessories.dm b/code/modules/clothing/clothing_accessories.dm
index d7415c4a75..c67d63e6a8 100644
--- a/code/modules/clothing/clothing_accessories.dm
+++ b/code/modules/clothing/clothing_accessories.dm
@@ -9,8 +9,7 @@
//Find all consumed slots
var/consumed_slots = 0
- for(var/thing in accessories)
- var/obj/item/clothing/accessory/AC = thing
+ for(var/obj/item/clothing/accessory/AC as anything in accessories)
consumed_slots |= AC.slot
//Mask to just consumed restricted
diff --git a/code/modules/clothing/head/pilot_helmet.dm b/code/modules/clothing/head/pilot_helmet.dm
index f2c3956e47..590cba4dd1 100644
--- a/code/modules/clothing/head/pilot_helmet.dm
+++ b/code/modules/clothing/head/pilot_helmet.dm
@@ -166,8 +166,7 @@
I.color = newcolor
/obj/item/clothing/head/pilot/Destroy()
- for(var/img in raw_images)
- var/image/I = img
+ for(var/image/I as anything in raw_images)
I.loc = null
shuttle_comp = null
qdel(pilot_hud)
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/emotes/emote_mob.dm b/code/modules/emotes/emote_mob.dm
index 2003fac6d6..7516be2eff 100644
--- a/code/modules/emotes/emote_mob.dm
+++ b/code/modules/emotes/emote_mob.dm
@@ -194,8 +194,7 @@
var/list/m_viewers = in_range["mobs"]
var/list/o_viewers = in_range["objs"]
- for(var/mob in m_viewers)
- var/mob/M = mob
+ for(var/mob/M as anything in m_viewers)
spawn(0) // It's possible that it could be deleted in the meantime, or that it runtimes.
if(M)
if(isobserver(M))
@@ -203,8 +202,7 @@
M.show_message(message, m_type)
M.create_chat_message(src, "[runemessage]", FALSE, list("emote"), (m_type == AUDIBLE_MESSAGE))
- for(var/obj in o_viewers)
- var/obj/O = obj
+ for(var/obj/O as anything in o_viewers)
spawn(0)
if(O)
O.see_emote(src, message, m_type)
diff --git a/code/modules/entopics_vr/alternate_appearance.dm b/code/modules/entopics_vr/alternate_appearance.dm
index 4fd7d31ed0..42b6d697f9 100644
--- a/code/modules/entopics_vr/alternate_appearance.dm
+++ b/code/modules/entopics_vr/alternate_appearance.dm
@@ -24,8 +24,7 @@
/datum/alternate_appearance/proc/display_to(list/displayTo)
if(!displayTo || !displayTo.len)
return
- for(var/m in displayTo)
- var/mob/M = m
+ for(var/mob/M as anything in displayTo)
if(!M.viewing_alternate_appearances)
M.viewing_alternate_appearances = list()
viewers |= M
@@ -42,8 +41,7 @@
if(hideFrom)
hiding = hideFrom
- for(var/m in hiding)
- var/mob/M = m
+ for(var/mob/M as anything in hiding)
if(M.client)
M.client.images -= img
if(M.viewing_alternate_appearances && M.viewing_alternate_appearances.len)
diff --git a/code/modules/entopics_vr/entopics.dm b/code/modules/entopics_vr/entopics.dm
index 1e146e0c05..a3ea9e35ab 100644
--- a/code/modules/entopics_vr/entopics.dm
+++ b/code/modules/entopics_vr/entopics.dm
@@ -77,8 +77,7 @@ var/global/list/alt_farmanimals = list()
registered = TRUE
entopic_images += my_image
- for(var/m in entopic_users)
- var/mob/M = m
+ for(var/mob/M as anything in entopic_users)
if(M.client)
M.client.images += my_image
@@ -88,8 +87,7 @@ var/global/list/alt_farmanimals = list()
registered = FALSE
entopic_images -= my_image
- for(var/m in entopic_users)
- var/mob/M = m
+ for(var/mob/M as anything in entopic_users)
if(M.client)
M.client.images -= my_image
diff --git a/code/modules/events/carp_migration.dm b/code/modules/events/carp_migration.dm
index 77612bbd25..fcbd1d951b 100644
--- a/code/modules/events/carp_migration.dm
+++ b/code/modules/events/carp_migration.dm
@@ -79,8 +79,7 @@
// Counts living carp spawned by this event.
/datum/event/carp_migration/proc/count_spawned_carps()
. = 0
- for(var/I in spawned_carp)
- var/mob/living/simple_mob/animal/M = I
+ for(var/mob/living/simple_mob/animal/M as anything in spawned_carp)
if(!QDELETED(M) && M.stat != DEAD)
. += 1
diff --git a/code/modules/events/grubinfestation_vr.dm b/code/modules/events/grubinfestation_vr.dm
index 685d59f3f2..8dcf1a20b1 100644
--- a/code/modules/events/grubinfestation_vr.dm
+++ b/code/modules/events/grubinfestation_vr.dm
@@ -32,8 +32,7 @@
/datum/event/grub_infestation/end()
var/list/area_names = list()
- for(var/grub in existing_solargrubs)
- var/mob/living/G = grub
+ for(var/mob/living/G as anything in existing_solargrubs)
if(!G || G.stat == DEAD)
continue
var/area/grub_area = get_area(G)
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/food/lunch.dm b/code/modules/food/food/lunch.dm
index 6bbd434e43..81e75fa254 100644
--- a/code/modules/food/food/lunch.dm
+++ b/code/modules/food/food/lunch.dm
@@ -106,9 +106,8 @@ var/list/lunchables_ethanol_reagents_ = list(/datum/reagent/ethanol/acid_spit,
/proc/init_lunchable_list(var/list/lunches)
. = list()
- for(var/lunch in lunches)
- var/obj/O = lunch
- .[initial(O.name)] = lunch
+ for(var/obj/O as anything in lunches)
+ .[initial(O.name)] = O
return sortAssoc(.)
/proc/init_lunchable_reagent_list(var/list/banned_reagents, var/reagent_types)
diff --git a/code/modules/food/food/snacks.dm b/code/modules/food/food/snacks.dm
index d1ef64d081..4b78169387 100644
--- a/code/modules/food/food/snacks.dm
+++ b/code/modules/food/food/snacks.dm
@@ -4155,8 +4155,7 @@
//Calculate the reagents of the coating needed
var/req = 0
- for (var/r in reagents.reagent_list)
- var/datum/reagent/R = r
+ for(var/datum/reagent/R as anything in reagents.reagent_list)
if (istype(R, /datum/reagent/nutriment))
req += R.volume * 0.2
else
@@ -4238,8 +4237,7 @@
if (do_coating_prefix == 1)
name = "[coating.coated_adj] [name]"
- for (var/r in reagents.reagent_list)
- var/datum/reagent/R = r
+ for(var/datum/reagent/R as anything in reagents.reagent_list)
if (istype(R, /datum/reagent/nutriment/coating))
var/datum/reagent/nutriment/coating/C = R
C.data["cooked"] = 1
diff --git a/code/modules/food/kitchen/cooking_machines/_appliance.dm b/code/modules/food/kitchen/cooking_machines/_appliance.dm
index db3025f961..8847e99580 100644
--- a/code/modules/food/kitchen/cooking_machines/_appliance.dm
+++ b/code/modules/food/kitchen/cooking_machines/_appliance.dm
@@ -53,14 +53,12 @@
if (!available_recipes)
available_recipes = new
- for(var/type in subtypesof(/datum/recipe))
- var/datum/recipe/test = type
+ for(var/datum/recipe/test as anything in subtypesof(/datum/recipe))
if((appliancetype & initial(test.appliance)))
available_recipes += new test
/obj/machinery/appliance/Destroy()
- for (var/a in cooking_objs)
- var/datum/cooking_item/CI = a
+ for(var/datum/cooking_item/CI as anything in cooking_objs)
qdel(CI.container)//Food is fragile, it probably doesnt survive the destruction of the machine
cooking_objs -= CI
qdel(CI)
@@ -74,8 +72,7 @@
/obj/machinery/appliance/proc/list_contents(var/mob/user)
if (cooking_objs.len)
var/string = "Contains..."
- for (var/a in cooking_objs)
- var/datum/cooking_item/CI = a
+ for(var/datum/cooking_item/CI as anything in cooking_objs)
string += "-\a [CI.container.label(null, CI.combine_target)], [report_progress(CI)]"
return string
else
@@ -343,8 +340,7 @@
for (var/obj/item/J in CI.container)
cookwork_by_item(J, CI)
- for (var/r in CI.container.reagents.reagent_list)
- var/datum/reagent/R = r
+ for(var/datum/reagent/R as anything in CI.container.reagents.reagent_list)
if (istype(R, /datum/reagent/nutriment))
CI.max_cookwork += R.volume *2//Added reagents contribute less than those in food items due to granular form
@@ -373,8 +369,7 @@
var/work = 0
if (istype(S))
if (S.reagents)
- for (var/r in S.reagents.reagent_list)
- var/datum/reagent/R = r
+ for(var/datum/reagent/R as anything in S.reagents.reagent_list)
if (istype(R, /datum/reagent/nutriment))
work += R.volume *3//Core nutrients contribute much more than peripheral chemicals
@@ -463,8 +458,7 @@
results += TR
- for (var/r in results)
- var/obj/item/weapon/reagent_containers/food/snacks/R = r
+ for(var/obj/item/weapon/reagent_containers/food/snacks/R as anything in results)
R.forceMove(C) //Move everything from the buffer back to the container
R.cooked |= cook_type
@@ -608,8 +602,7 @@
/obj/machinery/appliance/proc/removal_menu(var/mob/user)
if (can_remove_items(user))
var/list/menuoptions = list()
- for (var/a in cooking_objs)
- var/datum/cooking_item/CI = a
+ for(var/datum/cooking_item/CI as anything in cooking_objs)
if (CI.container)
menuoptions[CI.container.label(menuoptions.len)] = CI
diff --git a/code/modules/food/kitchen/cooking_machines/_mixer.dm b/code/modules/food/kitchen/cooking_machines/_mixer.dm
index 24b0371cfd..7d18865167 100644
--- a/code/modules/food/kitchen/cooking_machines/_mixer.dm
+++ b/code/modules/food/kitchen/cooking_machines/_mixer.dm
@@ -80,8 +80,7 @@ fundamental differences
/obj/machinery/appliance/mixer/removal_menu(var/mob/user)
if (can_remove_items(user))
var/list/menuoptions = list()
- for (var/a in cooking_objs)
- var/datum/cooking_item/CI = a
+ for(var/datum/cooking_item/CI as anything in cooking_objs)
if (CI.container)
if (!CI.container.check_contents())
to_chat(user, "There's nothing in [src] you can remove!")
diff --git a/code/modules/food/kitchen/microwave.dm b/code/modules/food/kitchen/microwave.dm
index bb9ef2a255..b781c4473b 100644
--- a/code/modules/food/kitchen/microwave.dm
+++ b/code/modules/food/kitchen/microwave.dm
@@ -43,8 +43,7 @@
if(!available_recipes)
available_recipes = new
- for(var/T in (typesof(/datum/recipe)-/datum/recipe))
- var/datum/recipe/type = T
+ for(var/datum/recipe/type as anything in subtypesof(/datum/recipe))
if((initial(type.appliance) & appliancetype))
available_recipes += new type
@@ -423,8 +422,7 @@
valid = 1
sleep(2)
- for(var/r in cooked_items)
- var/atom/movable/R = r
+ for(var/atom/movable/R as anything in cooked_items)
R.forceMove(src) //Move everything from the buffer back to the container
QDEL_NULL(temp)//Delete buffer object
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/gamemaster/event2/event.dm b/code/modules/gamemaster/event2/event.dm
index 4432be40ab..b9f1d92648 100644
--- a/code/modules/gamemaster/event2/event.dm
+++ b/code/modules/gamemaster/event2/event.dm
@@ -88,8 +88,7 @@ This allows for events that have their announcement happen after the end itself.
if(!LAZYLEN(grand_list_of_areas))
return list()
- for(var/thing in grand_list_of_areas)
- var/list/A = thing
+ for(var/list/A as anything in grand_list_of_areas)
var/list/turfs = list()
for(var/turf/T in A)
if(!T.check_density())
@@ -107,8 +106,7 @@ This allows for events that have their announcement happen after the end itself.
var/list/area/grand_list_of_areas = get_all_existing_areas_of_types(specific_areas)
. = list()
- for(var/thing in shuffle(grand_list_of_areas))
- var/area/A = thing
+ for(var/area/A as anything in shuffle(grand_list_of_areas))
if(A.forbid_events)
continue
if(!(A.z in get_location_z_levels()))
diff --git a/code/modules/gamemaster/event2/events/engineering/blob.dm b/code/modules/gamemaster/event2/events/engineering/blob.dm
index 3ace8f0894..f3b8a16f8d 100644
--- a/code/modules/gamemaster/event2/events/engineering/blob.dm
+++ b/code/modules/gamemaster/event2/events/engineering/blob.dm
@@ -111,16 +111,14 @@
log_debug("Spawned [new_blob.overmind.blob_type.name] blob at [get_area(new_blob)].")
/datum/event2/event/blob/should_end()
- for(var/WR in blobs)
- var/weakref/weakref = WR
+ for(var/weakref/weakref as anything in blobs)
if(weakref.resolve()) // If the weakref is resolvable, that means the blob hasn't been deleted yet.
return FALSE
return TRUE // Only end if all blobs die.
// Normally this does nothing, but is useful if aborted by an admin.
/datum/event2/event/blob/end()
- for(var/WR in blobs)
- var/weakref/weakref = WR
+ for(var/weakref/weakref as anything in blobs)
var/obj/structure/blob/core/B = weakref.resolve()
if(istype(B))
qdel(B)
@@ -130,8 +128,7 @@
var/danger_level = 0
var/list/blob_type_names = list()
var/multiblob = FALSE
- for(var/WR in blobs)
- var/weakref/weakref = WR
+ for(var/weakref/weakref as anything in blobs)
var/obj/structure/blob/core/B = weakref.resolve()
if(!istype(B))
continue
diff --git a/code/modules/gamemaster/event2/events/engineering/grid_check.dm b/code/modules/gamemaster/event2/events/engineering/grid_check.dm
index 8b081f29e2..b4ae7976b6 100644
--- a/code/modules/gamemaster/event2/events/engineering/grid_check.dm
+++ b/code/modules/gamemaster/event2/events/engineering/grid_check.dm
@@ -15,8 +15,7 @@
// Having the turbines be way over their rated limit makes grid checks more likely.
/datum/event2/meta/grid_check/proc/get_overpower()
var/highest_overpower = 0
- for(var/T in GLOB.all_turbines)
- var/obj/machinery/power/generator/turbine = T
+ for(var/obj/machinery/power/generator/turbine as anything in GLOB.all_turbines)
var/overpower = max((turbine.effective_gen / turbine.max_power) - 1, 0)
if(overpower > highest_overpower)
highest_overpower = overpower
@@ -35,8 +34,7 @@
/datum/event2/event/grid_check/set_up()
// Find the turbine being pushed the most.
var/obj/machinery/power/generator/most_stressed_turbine = null
- for(var/T in GLOB.all_turbines)
- var/obj/machinery/power/generator/turbine = T
+ for(var/obj/machinery/power/generator/turbine as anything in GLOB.all_turbines)
if(!most_stressed_turbine)
most_stressed_turbine = turbine
else if(turbine.effective_gen > most_stressed_turbine.effective_gen)
diff --git a/code/modules/gamemaster/event2/events/mob_spawning.dm b/code/modules/gamemaster/event2/events/mob_spawning.dm
index 78b1eac69c..4f3bcffa02 100644
--- a/code/modules/gamemaster/event2/events/mob_spawning.dm
+++ b/code/modules/gamemaster/event2/events/mob_spawning.dm
@@ -66,10 +66,9 @@
// In the future, a new AI stance that handles long distance travel using getline() could work.
var/max_distance = 8
var/turf/spawn_turf = null
- for(var/P in space_line)
- var/turf/point = P
+ for(var/turf/point as anything in space_line)
if(get_dist(point, edge_of_station) <= max_distance)
- spawn_turf = P
+ spawn_turf = point
break
if(spawn_turf)
@@ -88,8 +87,7 @@
// Counts living simple_mobs spawned by this event.
/datum/event2/event/mob_spawning/proc/count_spawned_mobs()
. = 0
- for(var/I in spawned_mobs)
- var/mob/living/simple_mob/M = I
+ for(var/mob/living/simple_mob/M as anything in spawned_mobs)
if(!QDELETED(M) && M.stat != DEAD)
. += 1
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/holomap/mapper.dm b/code/modules/holomap/mapper.dm
index b99d2928c1..40a8f433bb 100644
--- a/code/modules/holomap/mapper.dm
+++ b/code/modules/holomap/mapper.dm
@@ -280,8 +280,7 @@
extras_holder.pixel_y = bgmap.pixel_y = -1*T_y + offset_y
// Populate other mapper icons
- for(var/hc in mapping_units)
- var/obj/item/device/mapping_unit/HC = hc
+ for(var/obj/item/device/mapping_unit/HC as anything in mapping_units)
if(HC.mapper_filter != mapper_filter)
continue
var/mob_indicator = HOLOMAP_ERROR
@@ -340,8 +339,7 @@
extras += mark
// Marker beacon items
- for(var/hb in mapping_beacons)
- var/obj/item/device/holomap_beacon/HB = hb
+ for(var/obj/item/device/holomap_beacon/HB as anything in mapping_beacons)
if(HB.mapper_filter != mapper_filter)
continue
diff --git a/code/modules/hydroponics/spreading/spreading_growth.dm b/code/modules/hydroponics/spreading/spreading_growth.dm
index 99929ea360..b8f8701205 100644
--- a/code/modules/hydroponics/spreading/spreading_growth.dm
+++ b/code/modules/hydroponics/spreading/spreading_growth.dm
@@ -74,8 +74,7 @@
plant.layer = layer + 0.1
if(has_buckled_mobs())
- for(var/A in buckled_mobs)
- var/mob/living/L = A
+ for(var/mob/living/L as anything in buckled_mobs)
seed.do_sting(L,src)
if(seed.get_trait(TRAIT_CARNIVOROUS))
seed.do_thorns(L,src)
diff --git a/code/modules/hydroponics/spreading/spreading_response.dm b/code/modules/hydroponics/spreading/spreading_response.dm
index ab22ae15df..b9e64b8d32 100644
--- a/code/modules/hydroponics/spreading/spreading_response.dm
+++ b/code/modules/hydroponics/spreading/spreading_response.dm
@@ -49,8 +49,7 @@
/obj/effect/plant/proc/unbuckle()
if(has_buckled_mobs())
- for(var/A in buckled_mobs)
- var/mob/living/L = A
+ for(var/mob/living/L as anything in buckled_mobs)
if(L.buckled == src)
L.buckled = null
L.anchored = initial(L.anchored)
@@ -64,8 +63,7 @@
if(seed)
chance = round(100/(20*seed.get_trait(TRAIT_POTENCY)/100))
if(prob(chance))
- for(var/A in buckled_mobs)
- var/mob/living/L = A
+ for(var/mob/living/L as anything in buckled_mobs)
if(!(user in buckled_mobs))
L.visible_message(\
"\The [user] frees \the [L] from \the [src].",\
diff --git a/code/modules/identification/identification.dm b/code/modules/identification/identification.dm
index 6ddcdbb075..99ed8bc633 100644
--- a/code/modules/identification/identification.dm
+++ b/code/modules/identification/identification.dm
@@ -97,8 +97,7 @@
return "unidentified object"
var/list/new_name = list()
- for(var/i in naming_lists)
- var/list/current_list = i
+ for(var/list/current_list as anything in naming_lists)
new_name += pick(current_list)
return new_name.Join(" ")
diff --git a/code/modules/instruments/instrument_data/_instrument_data.dm b/code/modules/instruments/instrument_data/_instrument_data.dm
index 39d16e499f..7cede360a2 100644
--- a/code/modules/instruments/instrument_data/_instrument_data.dm
+++ b/code/modules/instruments/instrument_data/_instrument_data.dm
@@ -70,8 +70,7 @@
/datum/instrument/Destroy()
SSinstruments.instrument_data -= id
- for(var/i in songs_using)
- var/datum/song/S = i
+ for(var/datum/song/S as anything in songs_using)
S.set_instrument(null)
real_samples = null
samples = null
diff --git a/code/modules/instruments/items.dm b/code/modules/instruments/items.dm
index 455c10e5cb..31d4c396cc 100644
--- a/code/modules/instruments/items.dm
+++ b/code/modules/instruments/items.dm
@@ -296,8 +296,7 @@
/obj/item/instrument/harmonica,
/obj/item/instrument/piano_synth/headphones
)
- for(var/V in templist)
- var/atom/A = V
+ for(var/atom/A as anything in templist)
instruments[initial(A.name)] = A
return instruments
*/
diff --git a/code/modules/instruments/songs/play_legacy.dm b/code/modules/instruments/songs/play_legacy.dm
index e8666f7867..9d7ba493d4 100644
--- a/code/modules/instruments/songs/play_legacy.dm
+++ b/code/modules/instruments/songs/play_legacy.dm
@@ -80,8 +80,7 @@
if((world.time - MUSICIAN_HEARCHECK_MINDELAY) > last_hearcheck)
do_hearcheck()
var/sound/music_played = sound(soundfile)
- for(var/i in hearing_mobs)
- var/mob/M = i
+ for(var/mob/M as anything in hearing_mobs)
/* Would be nice
if(user && HAS_TRAIT(user, TRAIT_MUSICIAN) && isliving(M))
var/mob/living/L = M
diff --git a/code/modules/instruments/songs/play_synthesized.dm b/code/modules/instruments/songs/play_synthesized.dm
index d8b10654d5..63369228aa 100644
--- a/code/modules/instruments/songs/play_synthesized.dm
+++ b/code/modules/instruments/songs/play_synthesized.dm
@@ -61,8 +61,7 @@
channels_playing[channel_text] = 100
last_channel_played = channel_text
var/turf/source = get_turf(parent)
- for(var/i in hearing_mobs)
- var/mob/M = i
+ for(var/mob/M as anything in hearing_mobs)
/* Maybe someday
if(user && HAS_TRAIT(user, TRAIT_MUSICIAN) && isliving(M))
var/mob/living/L = M
@@ -142,10 +141,8 @@
if(dead)
channels_playing -= channel
channels_idle += channel
- for(var/i in hearing_mobs)
- var/mob/M = i
+ for(var/mob/M as anything in hearing_mobs)
M.stop_sound_channel(channelnumber)
else
- for(var/i in hearing_mobs)
- var/mob/M = i
+ for(var/mob/M as anything in hearing_mobs)
M.set_sound_channel_volume(channelnumber, (current_volume * 0.01) * volume * using_instrument.volume_multiplier)
diff --git a/code/modules/looking_glass/lg_area.dm b/code/modules/looking_glass/lg_area.dm
index b17c67449f..25d3bd7a3d 100644
--- a/code/modules/looking_glass/lg_area.dm
+++ b/code/modules/looking_glass/lg_area.dm
@@ -38,8 +38,7 @@
/area/looking_glass/proc/begin_program(var/image/newimage)
if(!active)
- for(var/trf in our_turfs)
- var/turf/simulated/floor/looking_glass/lgt = trf
+ for(var/turf/simulated/floor/looking_glass/lgt as anything in our_turfs)
lgt.activate()
our_landmark.take_image(newimage)
@@ -47,8 +46,7 @@
/area/looking_glass/proc/end_program()
if(active)
- for(var/trf in our_turfs)
- var/turf/simulated/floor/looking_glass/lgt = trf
+ for(var/turf/simulated/floor/looking_glass/lgt as anything in our_turfs)
lgt.deactivate()
active = FALSE
@@ -57,8 +55,7 @@
our_landmark.drop_image()
/area/looking_glass/proc/toggle_optional(var/transparent)
- for(var/trf in our_optional_turfs)
- var/turf/simulated/floor/looking_glass/lgt = trf
+ for(var/turf/simulated/floor/looking_glass/lgt as anything in our_optional_turfs)
lgt.center = !transparent
if(active)
lgt.deactivate()
diff --git a/code/modules/maps/tg/map_template.dm b/code/modules/maps/tg/map_template.dm
index 8cc742c508..3e530206a4 100644
--- a/code/modules/maps/tg/map_template.dm
+++ b/code/modules/maps/tg/map_template.dm
@@ -49,8 +49,7 @@
var/list/obj/machinery/atmospherics/atmos_machines = list()
var/list/turf/turfs = block(locate(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ]),
locate(bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ]))
- for(var/L in turfs)
- var/turf/B = L
+ for(var/turf/B as anything in turfs)
atoms += B
areas |= B.loc
for(var/A in B)
@@ -71,8 +70,7 @@
SSmachines.setup_powernets_for_cables(cables)
// Ensure all machines in loaded areas get notified of power status
- for(var/I in areas)
- var/area/A = I
+ for(var/area/A as anything in areas)
A.power_change()
if(machinery_was_awake)
diff --git a/code/modules/media/media_machinery.dm b/code/modules/media/media_machinery.dm
index 3957ff9005..bbde62a347 100644
--- a/code/modules/media/media_machinery.dm
+++ b/code/modules/media/media_machinery.dm
@@ -48,8 +48,7 @@
// Update Media Source.
A.media_source = null
// Clients
- for(var/m in mobs_in_area(A))
- var/mob/M = m
+ for(var/mob/M as anything in mobs_in_area(A))
M.update_music()
master_area = null
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/mining/fulton.dm b/code/modules/mining/fulton.dm
index f5c74a2f8b..c5c939b2f1 100644
--- a/code/modules/mining/fulton.dm
+++ b/code/modules/mining/fulton.dm
@@ -18,8 +18,7 @@ var/global/list/total_extraction_beacons = list()
/obj/item/extraction_pack/attack_self(mob/user)
var/list/possible_beacons = list()
- for(var/B in global.total_extraction_beacons)
- var/obj/structure/extraction_point/EP = B
+ for(var/obj/structure/extraction_point/EP as anything in global.total_extraction_beacons)
if(EP.beacon_network in beacon_networks)
possible_beacons += EP
diff --git a/code/modules/mining/machinery/machine_stacking.dm b/code/modules/mining/machinery/machine_stacking.dm
index 030c52f764..b0b2a7890e 100644
--- a/code/modules/mining/machinery/machine_stacking.dm
+++ b/code/modules/mining/machinery/machine_stacking.dm
@@ -89,11 +89,10 @@
/obj/machinery/mineral/stacking_machine/New()
..()
- for(var/stacktype in (subtypesof(/obj/item/stack/material) - typesof(/obj/item/stack/material/cyborg)))
- var/obj/item/stack/material/S = stacktype
+ for(var/obj/item/stack/material/S as anything in (subtypesof(/obj/item/stack/material) - typesof(/obj/item/stack/material/cyborg)))
var/s_matname = initial(S.default_type)
stack_storage[s_matname] = 0
- stack_paths[s_matname] = stacktype
+ stack_paths[s_matname] = S
spawn( 5 )
for (var/dir in cardinal)
diff --git a/code/modules/mob/animations.dm b/code/modules/mob/animations.dm
index 9b9ce3957f..fe64242795 100644
--- a/code/modules/mob/animations.dm
+++ b/code/modules/mob/animations.dm
@@ -237,8 +237,7 @@ note dizziness decrements automatically in the mob's Life() proc.
//Check for clients with pref enabled
var/list/viewing = list()
- for(var/m in viewers(A))
- var/mob/M = m
+ for(var/mob/M as anything in viewers(A))
var/client/C = M.client
if(C && C.is_preference_enabled(/datum/client_preference/attack_icons))
viewing += M.client
diff --git a/code/modules/mob/freelook/ai/chunk.dm b/code/modules/mob/freelook/ai/chunk.dm
index 2a689c1473..ebd68a6206 100644
--- a/code/modules/mob/freelook/ai/chunk.dm
+++ b/code/modules/mob/freelook/ai/chunk.dm
@@ -7,8 +7,7 @@
var/list/cameras = list()
/datum/chunk/camera/acquireVisibleTurfs(var/list/visible)
- for(var/camera in cameras)
- var/obj/machinery/camera/c = camera
+ for(var/obj/machinery/camera/c as anything in cameras)
if(!istype(c))
cameras -= c
diff --git a/code/modules/mob/freelook/chunk.dm b/code/modules/mob/freelook/chunk.dm
index da2d84701c..4ae5d3a590 100644
--- a/code/modules/mob/freelook/chunk.dm
+++ b/code/modules/mob/freelook/chunk.dm
@@ -86,20 +86,17 @@
visibleTurfs = newVisibleTurfs
obscuredTurfs = turfs - newVisibleTurfs
- for(var/turf in visAdded)
- var/turf/t = turf
+ for(var/turf/t as anything in visAdded)
if(LAZYLEN(t.obfuscations) && t.obfuscations[obfuscation.type])
obscured -= t.obfuscations[obfuscation.type]
- for(var/eye in seenby)
- var/mob/observer/eye/m = eye
+ for(var/mob/observer/eye/m as anything in seenby)
if(!m)
continue
var/client/client = m.GetViewerClient()
if(client)
client.images -= t.obfuscations[obfuscation.type]
- for(var/turf in visRemoved)
- var/turf/t = turf
+ for(var/turf/t as anything in visRemoved)
if(obscuredTurfs[t])
LAZYINITLIST(t.obfuscations)
if(!t.obfuscations[obfuscation.type])
@@ -108,8 +105,7 @@
t.obfuscations[obfuscation.type] = ob_image
obscured += t.obfuscations[obfuscation.type]
- for(var/eye in seenby)
- var/mob/observer/eye/m = eye
+ for(var/mob/observer/eye/m as anything in seenby)
if(!m)
seenby -= m
continue
@@ -142,8 +138,7 @@
obscuredTurfs = turfs - visibleTurfs
- for(var/turf in obscuredTurfs)
- var/turf/t = turf
+ for(var/turf/t as anything in obscuredTurfs)
LAZYINITLIST(t.obfuscations)
if(!t.obfuscations[obfuscation.type])
var/image/ob_image = image(obfuscation.icon, t, obfuscation.icon_state, OBFUSCATION_LAYER)
diff --git a/code/modules/mob/freelook/visualnet.dm b/code/modules/mob/freelook/visualnet.dm
index 44cd9278cc..1508a30133 100644
--- a/code/modules/mob/freelook/visualnet.dm
+++ b/code/modules/mob/freelook/visualnet.dm
@@ -49,8 +49,7 @@
var/list/chunks_pre_seen = list()
var/list/chunks_post_seen = list()
- for(var/V in moved_eyes)
- var/mob/observer/eye/eye = V
+ for(var/mob/observer/eye/eye as anything in moved_eyes)
if(C)
chunks_pre_seen |= eye.visibleChunks
// 0xf = 15
@@ -69,31 +68,26 @@
var/list/remove = eye.visibleChunks - visibleChunks
var/list/add = visibleChunks - eye.visibleChunks
- for(var/chunk in remove)
- var/datum/chunk/c = chunk
+ for(var/datum/chunk/c as anything in remove)
c.remove(eye, FALSE)
- for(var/chunk in add)
- var/datum/chunk/c = chunk
+ for(var/datum/chunk/c as anything in add)
c.add(eye, FALSE)
if(C)
chunks_post_seen |= eye.visibleChunks
if(C)
- for(var/V in other_eyes)
- var/mob/observer/eye/eye = V
+ for(var/mob/observer/eye/eye as anything in other_eyes)
chunks_post_seen |= eye.visibleChunks
var/list/remove = chunks_pre_seen - chunks_post_seen
var/list/add = chunks_post_seen - chunks_pre_seen
- for(var/chunk in remove)
- var/datum/chunk/c = chunk
+ for(var/datum/chunk/c as anything in remove)
C.images -= c.obscured
- for(var/chunk in add)
- var/datum/chunk/c = chunk
+ for(var/datum/chunk/c as anything in add)
C.images += c.obscured
// Updates the chunks that the turf is located in. Use this when obstacles are destroyed or when doors open.
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 c61b4724d5..1ed1ad847d 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/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index 62fef2744d..e43a1de6b6 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -135,8 +135,7 @@ emp_act
siemens_coefficient *= C.siemens_coefficient
// Modifiers.
- for(var/thing in modifiers)
- var/datum/modifier/M = thing
+ for(var/datum/modifier/M as anything in modifiers)
if(!isnull(M.siemens_coefficient))
siemens_coefficient *= M.siemens_coefficient
@@ -181,8 +180,7 @@ emp_act
for(var/obj/item/clothing/gear in protective_gear)
protection += gear.armor[type]
- for(var/thing in modifiers)
- var/datum/modifier/M = thing
+ for(var/datum/modifier/M as anything in modifiers)
var/modifier_armor = LAZYACCESS(M.armor_percent, type)
if(modifier_armor)
protection += modifier_armor
@@ -197,8 +195,7 @@ emp_act
for(var/obj/item/clothing/gear in protective_gear)
soaked += gear.armorsoak[type]
- for(var/thing in modifiers)
- var/datum/modifier/M = thing
+ for(var/datum/modifier/M as anything in modifiers)
var/modifier_armor = LAZYACCESS(M.armor_flat, type)
if(modifier_armor)
soaked += modifier_armor
diff --git a/code/modules/mob/living/carbon/human/human_modular_limbs.dm b/code/modules/mob/living/carbon/human/human_modular_limbs.dm
index 81d4af05ce..4010a2d487 100644
--- a/code/modules/mob/living/carbon/human/human_modular_limbs.dm
+++ b/code/modules/mob/living/carbon/human/human_modular_limbs.dm
@@ -58,8 +58,7 @@
// Checks the organ list for limbs meeting a predicate. Way overengineered for such a limited use
// case but I can see it being expanded in the future if meat limbs or doona limbs use it.
/mob/living/carbon/human/proc/get_modular_limbs(var/return_first_found = FALSE, var/validate_proc)
- for(var/bp in organs)
- var/obj/item/organ/external/E = bp
+ for(var/obj/item/organ/external/E as anything in organs)
if(!validate_proc || call(E, validate_proc)(src) > MODULAR_BODYPART_INVALID)
LAZYADD(., E)
if(return_first_found)
@@ -67,8 +66,7 @@
// Prune children so we can't remove every individual component of an entire prosthetic arm
// piece by piece. Technically a circular dependency here would remove the limb entirely but
// if there's a parent whose child is also its parent, there's something wrong regardless.
- for(var/bp in .)
- var/obj/item/organ/external/E = bp
+ for(var/obj/item/organ/external/E as anything in .)
if(length(E.children))
. -= E.children
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index d091f43298..cc5ad6f2ff 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -846,8 +846,7 @@
. = 1 - . // Invert from 1 = immunity to 0 = immunity.
// Doing it this way makes multiplicative stacking not get out of hand, so two modifiers that give 0.5 protection will be combined to 0.75 in the end.
- for(var/thing in modifiers)
- var/datum/modifier/M = thing
+ for(var/datum/modifier/M as anything in modifiers)
if(!isnull(M.heat_protection))
. *= 1 - M.heat_protection
@@ -866,8 +865,7 @@
. = 1 - . // Invert from 1 = immunity to 0 = immunity.
// Doing it this way makes multiplicative stacking not get out of hand, so two modifiers that give 0.5 protection will be combined to 0.75 in the end.
- for(var/thing in modifiers)
- var/datum/modifier/M = thing
+ for(var/datum/modifier/M as anything in modifiers)
if(!isnull(M.cold_protection))
// Invert the modifier values so they align with the current working value.
. *= 1 - M.cold_protection
diff --git a/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm
index 6f81a53f6b..b26d57a82b 100644
--- a/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm
+++ b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm
@@ -91,8 +91,7 @@
ability_flags &= ~AB_PHASE_SHIFTED
mouse_opacity = 1
name = real_name
- for(var/belly in vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in vore_organs)
B.escapable = initial(B.escapable)
//cut_overlays()
@@ -140,8 +139,7 @@
custom_emote(1,"phases out!")
name = "Something"
- for(var/belly in vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in vore_organs)
B.escapable = FALSE
var/obj/effect/temp_visual/shadekin/phase_out/phaseanim = new /obj/effect/temp_visual/shadekin/phase_out(src.loc)
diff --git a/code/modules/mob/living/carbon/human/species/species_shapeshift_vr.dm b/code/modules/mob/living/carbon/human/species/species_shapeshift_vr.dm
index aab6fdd40b..fbd1921c55 100644
--- a/code/modules/mob/living/carbon/human/species/species_shapeshift_vr.dm
+++ b/code/modules/mob/living/carbon/human/species/species_shapeshift_vr.dm
@@ -171,8 +171,7 @@
last_special = world.time + 50
- for(var/limb in src.organs)
- var/obj/item/organ/external/L = limb
+ for(var/obj/item/organ/external/L as anything in src.organs)
L.transparent = !L.transparent
visible_message("\The [src]'s interal composition seems to change.")
update_icons_body()
diff --git a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm
index a93c887cca..b0d605af91 100644
--- a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm
+++ b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm
@@ -429,8 +429,7 @@ var/global/list/disallowed_protean_accessories = list(
//Transfer vore organs
blob.vore_organs = vore_organs
blob.vore_selected = vore_selected
- for(var/belly in vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in vore_organs)
B.forceMove(blob)
B.owner = blob
@@ -533,8 +532,7 @@ var/global/list/disallowed_protean_accessories = list(
//Transfer vore organs
vore_selected = blob.vore_selected
- for(var/belly in blob.vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in blob.vore_organs)
B.forceMove(src)
B.owner = src
diff --git a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_species.dm b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_species.dm
index 2a208e43c7..1130918ed5 100755
--- a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_species.dm
+++ b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_species.dm
@@ -236,8 +236,7 @@ CHOMP Station removal end*/
stat(null, "- -- --- REFACTORY ERROR! --- -- -")
stat(null, "- -- --- Abilities (Shift+LMB Examines) --- -- -")
- for(var/ability in abilities)
- var/obj/effect/protean_ability/A = ability
+ for(var/obj/effect/protean_ability/A as anything in abilities)
stat("[A.ability_name]",A.atom_button_text())
// Various modifiers
@@ -330,8 +329,7 @@ CHOMP Removal end*/
holder.adjustBruteLoss(-1,include_robo = TRUE) //Modified by species resistances
holder.adjustFireLoss(-0.5,include_robo = TRUE) //Modified by species resistances
var/mob/living/carbon/human/H = holder
- for(var/organ in H.internal_organs)
- var/obj/item/organ/O = organ
+ for(var/obj/item/organ/O as anything in H.internal_organs)
// Fix internal damage
if(O.damage > 0)
O.damage = max(0,O.damage-0.1)
diff --git a/code/modules/mob/living/death.dm b/code/modules/mob/living/death.dm
index b33a5d3945..94776d570e 100644
--- a/code/modules/mob/living/death.dm
+++ b/code/modules/mob/living/death.dm
@@ -17,11 +17,9 @@
//VOREStation Edit End
nest = null
- for(var/s in owned_soul_links)
- var/datum/soul_link/S = s
+ for(var/datum/soul_link/S as anything in owned_soul_links)
S.owner_died(gibbed)
- for(var/s in shared_soul_links)
- var/datum/soul_link/S = s
+ for(var/datum/soul_link/S as anything in shared_soul_links)
S.sharer_died(gibbed)
. = ..()
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 592d7d0db2..622c3965c4 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -868,9 +868,8 @@
update_transform()
//VOREStation Add
if(lying && LAZYLEN(buckled_mobs))
- for(var/rider in buckled_mobs)
- var/mob/living/L = rider
- if(buckled_mobs[rider] != "riding")
+ for(var/mob/living/L as anything in buckled_mobs)
+ if(buckled_mobs[L] != "riding")
continue // Only boot off riders
if(riding_datum)
riding_datum.force_dismount(L)
diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm
index fc7d08677b..cc66172f43 100644
--- a/code/modules/mob/living/say.dm
+++ b/code/modules/mob/living/say.dm
@@ -387,11 +387,9 @@ var/list/channel_to_radio_key = new
//Remove all those images. At least it's just ONE spawn this time.
spawn(30)
- for(var/img in images_to_clients)
- var/image/I = img
+ for(var/image/I as anything in images_to_clients)
var/list/clients_from_image = images_to_clients[I]
- for(var/client in clients_from_image)
- var/client/C = client
+ for(var/client/C as anything in clients_from_image)
if(C) //Could have disconnected after message sent, before removing bubble.
C.images -= I
qdel(I)
@@ -416,12 +414,10 @@ var/list/channel_to_radio_key = new
else
var/list/potentials = get_mobs_and_objs_in_view_fast(T, world.view)
var/list/mobs = potentials["mobs"]
- for(var/hearer in mobs)
- var/mob/M = hearer
+ for(var/mob/M as anything in mobs)
M.hear_signlang(message, verb, language, src)
var/list/objs = potentials["objs"]
- for(var/hearer in objs)
- var/obj/O = hearer
+ for(var/obj/O as anything in objs)
O.hear_signlang(message, verb, language, src)
return 1
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index 2a0a307818..38f59adbc5 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -32,8 +32,7 @@ var/list/ai_verbs_default = list(
/proc/AutoUpdateAI(obj/subject)
var/is_in_use = 0
if (subject!=null)
- for(var/A in ai_list)
- var/mob/living/silicon/ai/M = A
+ for(var/mob/living/silicon/ai/M as anything in ai_list)
if ((M.client && M.machine == subject))
is_in_use = 1
subject.attack_ai(M)
diff --git a/code/modules/mob/living/silicon/ai/ai_remote_control.dm b/code/modules/mob/living/silicon/ai/ai_remote_control.dm
index 768aba02f5..ac092ed693 100644
--- a/code/modules/mob/living/silicon/ai/ai_remote_control.dm
+++ b/code/modules/mob/living/silicon/ai/ai_remote_control.dm
@@ -25,8 +25,7 @@
var/list/possible = list()
- for(var/borgie in GLOB.available_ai_shells)
- var/mob/living/silicon/robot/R = borgie
+ for(var/mob/living/silicon/robot/R as anything in GLOB.available_ai_shells)
if(R.shell && !R.deployed && (R.stat != DEAD) && (!R.connected_ai || (R.connected_ai == src) ) && !(using_map.ai_shell_restricted && !(R.z in using_map.ai_shell_allowed_levels)) ) //VOREStation Edit: shell restrictions
possible += R
diff --git a/code/modules/mob/living/silicon/ai/multicam.dm b/code/modules/mob/living/silicon/ai/multicam.dm
index 7f84eebf6e..1a69c5f5f3 100644
--- a/code/modules/mob/living/silicon/ai/multicam.dm
+++ b/code/modules/mob/living/silicon/ai/multicam.dm
@@ -202,10 +202,8 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room)
var/list/obj/machinery/camera/add = list()
var/list/obj/machinery/camera/remove = list()
var/list/obj/machinery/camera/visible = list()
- for(var/VV in visibleChunks)
- var/datum/chunk/camera/CC = VV
- for(var/V in CC.cameras)
- var/obj/machinery/camera/C = V
+ for(var/datum/chunk/camera/CC as anything in visibleChunks)
+ for(var/obj/machinery/camera/C as anything in CC.cameras)
if (!C.can_use() || (get_dist(C, src) > telegraph_range))
continue
visible |= C
@@ -213,15 +211,13 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room)
add = visible - cameras_telegraphed
remove = cameras_telegraphed - visible
- for(var/V in remove)
- var/obj/machinery/camera/C = V
+ for(var/obj/machinery/camera/C as anything in remove)
if(QDELETED(C))
continue
cameras_telegraphed -= C
C.in_use_lights--
C.update_icon()
- for(var/V in add)
- var/obj/machinery/camera/C = V
+ for(var/obj/machinery/camera/C as anything in add)
if(QDELETED(C))
continue
cameras_telegraphed |= C
@@ -230,8 +226,7 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room)
/mob/observer/eye/aiEye/pic_in_pic/proc/disable_camera_telegraphing()
telegraph_cameras = FALSE
- for(var/V in cameras_telegraphed)
- var/obj/machinery/camera/C = V
+ for(var/obj/machinery/camera/C as anything in cameras_telegraphed)
if(QDELETED(C))
continue
C.in_use_lights--
@@ -291,8 +286,7 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room)
/mob/living/silicon/ai/proc/refresh_multicam()
reset_view(GLOB.ai_camera_room_landmark)
if(client)
- for(var/V in multicam_screens)
- var/obj/screen/movable/pic_in_pic/P = V
+ for(var/obj/screen/movable/pic_in_pic/P as anything in multicam_screens)
P.show_to(client)
/mob/living/silicon/ai/proc/end_multicam()
@@ -301,8 +295,7 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room)
multicam_on = FALSE
select_main_multicam_window(null)
if(client)
- for(var/V in multicam_screens)
- var/obj/screen/movable/pic_in_pic/P = V
+ for(var/obj/screen/movable/pic_in_pic/P as anything in multicam_screens)
P.unshow_to(client)
reset_view()
to_chat(src, "Multiple-camera viewing mode deactivated.")
diff --git a/code/modules/mob/living/silicon/pai/pai_vr.dm b/code/modules/mob/living/silicon/pai/pai_vr.dm
index 59a0fad74d..c8ab1d7e07 100644
--- a/code/modules/mob/living/silicon/pai/pai_vr.dm
+++ b/code/modules/mob/living/silicon/pai/pai_vr.dm
@@ -17,8 +17,7 @@
/mob/living/silicon/pai/proc/update_fullness_pai() //Determines if they have something in their stomach. Copied and slightly modified.
var/new_people_eaten = 0
- for(var/belly in vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in vore_organs)
for(var/mob/living/M in B)
new_people_eaten += M.size_multiplier
people_eaten = min(1, new_people_eaten)
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/living/silicon/robot/dogborg/dog_sleeper_vr.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm
index a15e2bf518..9e3bd95c86 100644
--- a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm
+++ b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm
@@ -567,8 +567,7 @@
'sound/vore/death10.ogg')
playsound(src, deathsound, vol = 100, vary = 1, falloff = 0.1, ignore_walls = TRUE, preference = /datum/client_preference/digestion_noises)
if(is_vore_predator(T))
- for(var/belly in T.vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in T.vore_organs)
for(var/atom/movable/thing in B)
thing.forceMove(src)
if(ismob(thing))
diff --git a/code/modules/mob/living/silicon/robot/examine_vr.dm b/code/modules/mob/living/silicon/robot/examine_vr.dm
index 2bebab2665..84b960050d 100644
--- a/code/modules/mob/living/silicon/robot/examine_vr.dm
+++ b/code/modules/mob/living/silicon/robot/examine_vr.dm
@@ -1,8 +1,7 @@
/mob/living/silicon/robot/proc/examine_bellies_borg()
var/list/message_list = list()
- for(var/belly in vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in vore_organs)
var/bellymessage = B.get_examine_msg()
if(bellymessage) message_list += bellymessage
bellymessage = B.get_examine_msg_absorbed()
diff --git a/code/modules/mob/living/simple_mob/defense.dm b/code/modules/mob/living/simple_mob/defense.dm
index 09d6fc7335..af37f156c5 100644
--- a/code/modules/mob/living/simple_mob/defense.dm
+++ b/code/modules/mob/living/simple_mob/defense.dm
@@ -147,8 +147,7 @@
. = 1 - . // Invert from 1 = immunity to 0 = immunity.
// Doing it this way makes multiplicative stacking not get out of hand, so two modifiers that give 0.5 protection will be combined to 0.75 in the end.
- for(var/thing in modifiers)
- var/datum/modifier/M = thing
+ for(var/datum/modifier/M as anything in modifiers)
if(!isnull(M.cold_protection))
. *= 1 - M.cold_protection
@@ -172,8 +171,7 @@
. = 1 - . // Invert from 1 = immunity to 0 = immunity.
// Doing it this way makes multiplicative stacking not get out of hand, so two modifiers that give 0.5 protection will be combined to 0.75 in the end.
- for(var/thing in modifiers)
- var/datum/modifier/M = thing
+ for(var/datum/modifier/M as anything in modifiers)
if(!isnull(M.heat_protection))
. *= 1 - M.heat_protection
@@ -199,8 +197,7 @@
. = 1 - . // Invert from 1 = immunity to 0 = immunity.
// Doing it this way makes multiplicative stacking not get out of hand, so two modifiers that give 0.5 protection will be combined to 0.75 in the end.
- for(var/thing in modifiers)
- var/datum/modifier/M = thing
+ for(var/datum/modifier/M as anything in modifiers)
if(!isnull(M.siemens_coefficient))
. *= M.siemens_coefficient
@@ -257,8 +254,7 @@
if(isnull(armorval))
armorval = 0
- for(var/thing in modifiers)
- var/datum/modifier/M = thing
+ for(var/datum/modifier/M as anything in modifiers)
var/modifier_armor = LAZYACCESS(M.armor_percent, attack_flag)
if(modifier_armor)
armorval += modifier_armor
@@ -270,8 +266,7 @@
if(isnull(armorval))
armorval = 0
- for(var/thing in modifiers)
- var/datum/modifier/M = thing
+ for(var/datum/modifier/M as anything in modifiers)
var/modifier_armor = LAZYACCESS(M.armor_flat, attack_flag)
if(modifier_armor)
armorval += modifier_armor
diff --git a/code/modules/mob/living/simple_mob/simple_mob_vr.dm b/code/modules/mob/living/simple_mob/simple_mob_vr.dm
index 59cfa2850a..305ecf70fc 100644
--- a/code/modules/mob/living/simple_mob/simple_mob_vr.dm
+++ b/code/modules/mob/living/simple_mob/simple_mob_vr.dm
@@ -67,8 +67,7 @@
// Update fullness based on size & quantity of belly contents
/mob/living/simple_mob/proc/update_fullness()
var/new_fullness = 0
- for(var/belly in vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in vore_organs)
for(var/mob/living/M in B)
new_fullness += M.size_multiplier
new_fullness = new_fullness / size_multiplier //Divided by pred's size so a macro mob won't get macro belly from a regular prey.
diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/nurse.dm b/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/nurse.dm
index 3d8401b76d..8035fb2d80 100644
--- a/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/nurse.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/nurse.dm
@@ -240,8 +240,7 @@
var/static/alternative_targets = typecacheof(list(/obj/item, /obj/structure))
- for(var/AT in typecache_filter_list(range(vision_range, holder), alternative_targets))
- var/obj/O = AT
+ for(var/obj/O as anything in typecache_filter_list(range(vision_range, holder), alternative_targets))
if(can_see(holder, O, vision_range) && !O.anchored)
. += O
diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/demon/demon_abilities.dm b/code/modules/mob/living/simple_mob/subtypes/vore/demon/demon_abilities.dm
index 56214bf58c..e6c84387c8 100644
--- a/code/modules/mob/living/simple_mob/subtypes/vore/demon/demon_abilities.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/vore/demon/demon_abilities.dm
@@ -32,8 +32,7 @@
if(shifted_out)
shifted_out = FALSE
name = real_name
- for(var/belly in vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in vore_organs)
B.escapable = initial(B.escapable)
cut_overlays()
@@ -89,8 +88,7 @@
name = "Something"
health = maxHealth //Fullheal
- for(var/belly in vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in vore_organs)
B.escapable = FALSE
cut_overlays()
@@ -145,8 +143,7 @@
real_name = name
name = "Something"
- for(var/belly in vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in vore_organs)
B.escapable = FALSE
cut_overlays()
@@ -166,8 +163,7 @@
spawn(300)
shifted_out = FALSE
name = real_name
- for(var/belly in vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in vore_organs)
B.escapable = initial(B.escapable)
cut_overlays()
diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/lamia.dm b/code/modules/mob/living/simple_mob/subtypes/vore/lamia.dm
index 880008dff9..7f525c8310 100644
--- a/code/modules/mob/living/simple_mob/subtypes/vore/lamia.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/vore/lamia.dm
@@ -54,8 +54,7 @@
/mob/living/simple_mob/vore/lamia/update_fullness()
var/new_fullness = 0
// We only want to count our upper_stomach towards capacity
- for(var/belly in vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in vore_organs)
if(B.name == "upper stomach")
for(var/mob/living/M in B)
new_fullness += M.size_multiplier
@@ -76,8 +75,7 @@
var/upper_shows = FALSE
var/tail_shows = FALSE
- for(var/belly in vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in vore_organs)
if(!(B.name in list("upper stomach", "tail stomach")))
continue
var/belly_fullness = 0
diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/ability_procs.dm b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/ability_procs.dm
index 208030125d..ec1161630a 100644
--- a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/ability_procs.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/ability_procs.dm
@@ -21,8 +21,7 @@
ability_flags &= ~AB_PHASE_SHIFTED
mouse_opacity = 1
name = real_name
- for(var/belly in vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in vore_organs)
B.escapable = initial(B.escapable)
cut_overlays()
@@ -76,8 +75,7 @@
real_name = name
name = "Something"
- for(var/belly in vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in vore_organs)
B.escapable = FALSE
cut_overlays()
diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/shadekin.dm b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/shadekin.dm
index 2f275db0f1..371fc8d241 100644
--- a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/shadekin.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/shadekin.dm
@@ -215,8 +215,7 @@
abilities_stat()
/mob/living/simple_mob/shadekin/proc/abilities_stat()
- for(var/A in shadekin_abilities)
- var/obj/effect/shadekin_ability/ability = A
+ for(var/obj/effect/shadekin_ability/ability as anything in shadekin_abilities)
stat("[ability.ability_name]",ability.atom_button_text())
//They phase back to the dark when killed
diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm
index 72e2532792..f3c200410b 100644
--- a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm
@@ -205,8 +205,7 @@ var/global/list/grub_machine_overlays = list()
var/static/potential_targets = typecacheof(list(/obj/machinery))
var/list/actual_targets = list()
- for(var/AT in typecache_filter_list(range(vision_range, holder), potential_targets))
- var/obj/machinery/M = AT
+ for(var/obj/machinery/M as anything in typecache_filter_list(range(vision_range, holder), potential_targets))
if(istype(M, /obj/machinery/atmospherics/unary/vent_pump))
var/obj/machinery/atmospherics/unary/vent_pump/V = M
if(!V.welded && prob(50))
diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/zz_vore_overrides.dm b/code/modules/mob/living/simple_mob/subtypes/vore/zz_vore_overrides.dm
index 3ea220ef8d..e1c19a2dd4 100644
--- a/code/modules/mob/living/simple_mob/subtypes/vore/zz_vore_overrides.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/vore/zz_vore_overrides.dm
@@ -271,14 +271,12 @@
return
. = ..()
var/safe = (faction == "neutral")
- for(var/belly in vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in vore_organs)
B.digest_mode = safe ? DM_HOLD : vore_default_mode
/mob/living/simple_mob/animal/space/carp/holographic/set_safety(var/safe)
. = ..()
- for(var/belly in vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in vore_organs)
B.digest_mode = safe ? DM_HOLD : vore_default_mode
/mob/living/simple_mob/animal/passive/mouse
diff --git a/code/modules/mob/living/status_indicators.dm b/code/modules/mob/living/status_indicators.dm
index a3f386b9e6..4f61b7ad34 100644
--- a/code/modules/mob/living/status_indicators.dm
+++ b/code/modules/mob/living/status_indicators.dm
@@ -67,8 +67,7 @@
current_x_position -= (icon_expected_width / 2) * (get_icon_scale_y() - 1)
// Now the indicator row can actually be built.
- for(var/thing in status_indicators)
- var/image/I = thing
+ for(var/image/I as anything in status_indicators)
// This is a semi-HUD element, in a similar manner as medHUDs, in that they're 'above' everything else in the world,
// but don't pierce obfuscation layers such as blindness or darkness, unlike actual HUD elements like inventory slots.
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index af947a7b6e..be223341b8 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -114,16 +114,13 @@
runemessage = -1 // Symmetry with mob/audible_message, despite the fact this one doesn't call parent. Maybe it should!
if(radio_message)
- for(var/obj in hearing_objs)
- var/obj/O = obj
+ for(var/obj/O as anything in hearing_objs)
O.hear_talk(src, list(new /datum/multilingual_say_piece(GLOB.all_languages["Noise"], radio_message)), null)
else
- for(var/obj in hearing_objs)
- var/obj/O = obj
+ for(var/obj/O as anything in hearing_objs)
O.show_message(message, AUDIBLE_MESSAGE, deaf_message, VISIBLE_MESSAGE)
- for(var/mob in hearing_mobs)
- var/mob/M = mob
+ for(var/mob/M as anything in hearing_mobs)
var/msg = message
if(self_message && M==src)
msg = self_message
@@ -652,8 +649,7 @@
if(length(GLOB.sdql2_queries))
if(statpanel("SDQL2"))
stat("Access Global SDQL2 List", GLOB.sdql2_vv_statobj)
- for(var/i in GLOB.sdql2_queries)
- var/datum/SDQL2_query/Q = i
+ for(var/datum/SDQL2_query/Q as anything in GLOB.sdql2_queries)
Q.generate_stat()
if(listed_turf && client)
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/mob/say_vr.dm b/code/modules/mob/say_vr.dm
index 64f65adfbb..8b06163590 100644
--- a/code/modules/mob/say_vr.dm
+++ b/code/modules/mob/say_vr.dm
@@ -49,8 +49,7 @@
var/list/vis_mobs = vis["mobs"]
var/list/vis_objs = vis["objs"]
- for(var/vismob in vis_mobs)
- var/mob/M = vismob
+ for(var/mob/M as anything in vis_mobs)
if(isobserver(M) && !is_preference_enabled(/datum/client_preference/whisubtle_vis) && !M.client?.holder)
spawn(0)
M.show_message(undisplayed_message, 2)
@@ -58,8 +57,7 @@
spawn(0)
M.show_message(message, 2)
- for(var/visobj in vis_objs)
- var/obj/O = visobj
+ for(var/obj/O as anything in vis_objs)
spawn(0)
O.see_emote(src, message, 2)
diff --git a/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm b/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm
index f2466213f3..a9a1e3456d 100644
--- a/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm
+++ b/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm
@@ -83,8 +83,7 @@
return TRUE
var/mob/living/user = usr
if(can_run(user, TRUE, access_network))
- for(var/C in ntnet_global.chat_channels)
- var/datum/ntnet_conversation/chan = C
+ for(var/datum/ntnet_conversation/chan as anything in ntnet_global.chat_channels)
chan.remove_client(src)
netadmin_mode = TRUE
return TRUE
@@ -92,8 +91,7 @@
var/newname = sanitize(params["new_name"])
if(!newname)
return
- for(var/C in ntnet_global.chat_channels)
- var/datum/ntnet_conversation/chan = C
+ for(var/datum/ntnet_conversation/chan as anything in ntnet_global.chat_channels)
if(src in chan.clients)
chan.add_status_message("[username] is now known as [newname].")
username = newname
@@ -163,8 +161,7 @@
ui_header = "ntnrc_idle.gif"
/datum/computer_file/program/chatclient/kill_program(forced = FALSE)
- for(var/C in ntnet_global.chat_channels)
- var/datum/ntnet_conversation/channel = C
+ for(var/datum/ntnet_conversation/channel as anything in ntnet_global.chat_channels)
channel.remove_client(src)
..()
@@ -180,8 +177,7 @@
var/list/data = get_header_data()
var/list/all_channels = list()
- for(var/C in ntnet_global.chat_channels)
- var/datum/ntnet_conversation/conv = C
+ for(var/datum/ntnet_conversation/conv as anything in ntnet_global.chat_channels)
if(conv && conv.title)
all_channels.Add(list(list(
"chan" = conv.title,
diff --git a/code/modules/modular_computers/hardware/network_card.dm b/code/modules/modular_computers/hardware/network_card.dm
index 86af5d9ba0..7a3a4da632 100644
--- a/code/modules/modular_computers/hardware/network_card.dm
+++ b/code/modules/modular_computers/hardware/network_card.dm
@@ -106,8 +106,7 @@ var/global/ntnet_card_uid = 1
var/list/zlevels_in_range = using_map.get_map_levels(holderz, FALSE)
var/list/zlevels_in_long_range = using_map.get_map_levels(holderz, TRUE, om_range = DEFAULT_OVERMAP_RANGE) - zlevels_in_range
var/best = 0
- for(var/relay in ntnet_global.relays)
- var/obj/machinery/ntnet_relay/R = relay
+ for(var/obj/machinery/ntnet_relay/R as anything in ntnet_global.relays)
//Relay is down
if(!R.operable())
continue
diff --git a/code/modules/nifsoft/nif.dm b/code/modules/nifsoft/nif.dm
index 8117293f90..cd2668f1d4 100644
--- a/code/modules/nifsoft/nif.dm
+++ b/code/modules/nifsoft/nif.dm
@@ -339,8 +339,7 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable
//nif_hud.process_hud(human,1) //TODO VIS
//Process all the ones that want that
- for(var/S in nifsofts_life)
- var/datum/nifsoft/nifsoft = S
+ for(var/datum/nifsoft/nifsoft as anything in nifsofts_life)
nifsoft.life(human)
if(NIF_POWFAIL)
diff --git a/code/modules/nifsoft/nif_softshop.dm b/code/modules/nifsoft/nif_softshop.dm
index 9ba72f215e..3fb2f43684 100644
--- a/code/modules/nifsoft/nif_softshop.dm
+++ b/code/modules/nifsoft/nif_softshop.dm
@@ -60,8 +60,7 @@
if(!starting_legal_nifsoft)
starting_legal_nifsoft = list()
starting_illegal_nifsoft = list()
- for(var/P in (subtypesof(/datum/nifsoft) - typesof(/datum/nifsoft/package)))
- var/datum/nifsoft/NS = P
+ for(var/datum/nifsoft/NS as anything in (subtypesof(/datum/nifsoft) - typesof(/datum/nifsoft/package)))
if(initial(NS.vended))
switch(initial(NS.illegal))
if(TRUE)
@@ -80,8 +79,7 @@
for(var/current_list in all_products)
var/category = current_list[CAT_HIDDEN]
- for(var/entry in current_list[CAT_NORMAL])
- var/datum/nifsoft/NS = entry
+ for(var/datum/nifsoft/NS as anything in current_list[CAT_NORMAL])
var/applies_to = initial(NS.applies_to)
var/context = ""
if(!(applies_to & NIF_SYNTHETIC))
@@ -89,7 +87,7 @@
else if(!(applies_to & NIF_ORGANIC))
context = " (Syn Only)"
var/name = "[initial(NS.name)][context]"
- var/datum/stored_item/vending_product/product = new/datum/stored_item/vending_product(src, entry, name)
+ var/datum/stored_item/vending_product/product = new/datum/stored_item/vending_product(src, NS, name)
product.price = initial(NS.cost)
product.amount = 10
diff --git a/code/modules/nifsoft/software/05_health.dm b/code/modules/nifsoft/software/05_health.dm
index 7ceb260b6e..5e213781fa 100644
--- a/code/modules/nifsoft/software/05_health.dm
+++ b/code/modules/nifsoft/software/05_health.dm
@@ -115,10 +115,8 @@
//Needs fixing W << 'sound/voice/nifmedsynth_injured.ogg' //CHOMP Add
activate()
- for(var/eo in nif.human.bad_external_organs)
- var/obj/item/organ/external/EO = eo
- for(var/w in EO.wounds)
- var/datum/wound/W = w
+ for(var/obj/item/organ/external/EO as anything in nif.human.bad_external_organs)
+ for(var/datum/wound/W as anything in EO.wounds)
if(W.damage <= 30) // Chomp Edit // The current limb break threshold.
W.heal_damage(0.1)
EO.update_damages()
diff --git a/code/modules/nifsoft/software/13_soulcatcher.dm b/code/modules/nifsoft/software/13_soulcatcher.dm
index 6bb9536426..750f1b7df2 100644
--- a/code/modules/nifsoft/software/13_soulcatcher.dm
+++ b/code/modules/nifsoft/software/13_soulcatcher.dm
@@ -75,10 +75,9 @@
to_chat(nif.human,"\[[bicon(nif.big_icon)]NIF\] Soulcatcher displays, \"[message]\"")
nif.human << sound
- for(var/brainmob in brainmobs)
- var/mob/living/carbon/brain/caught_soul/CS = brainmob
+ for(var/mob/living/carbon/brain/caught_soul/CS as anything in brainmobs)
to_chat(CS,"\[[bicon(nif.big_icon)]NIF\] Soulcatcher displays, \"[message]\"")
- brainmob << sound
+ CS << sound
/datum/nifsoft/soulcatcher/proc/say_into(var/message, var/mob/living/sender, var/mob/eyeobj)
var/sender_name = eyeobj ? eyeobj.name : sender.name
@@ -90,8 +89,7 @@
//Not AR Projecting
else
to_chat(nif.human,"\[[bicon(nif.big_icon)]NIF\] [sender_name] speaks, \"[message]\"")
- for(var/brainmob in brainmobs)
- var/mob/living/carbon/brain/caught_soul/CS = brainmob
+ for(var/mob/living/carbon/brain/caught_soul/CS as anything in brainmobs)
to_chat(CS,"\[[bicon(nif.big_icon)]NIF\] [sender_name] speaks, \"[message]\"")
log_nsay(message,nif.human.real_name,sender)
@@ -106,8 +104,7 @@
//Not AR Projecting
else
to_chat(nif.human,"\[[bicon(nif.big_icon)]NIF\] [sender_name] [message]")
- for(var/brainmob in brainmobs)
- var/mob/living/carbon/brain/caught_soul/CS = brainmob
+ for(var/mob/living/carbon/brain/caught_soul/CS as anything in brainmobs)
to_chat(CS,"\[[bicon(nif.big_icon)]NIF\] [sender_name] [message]")
log_nme(message,nif.human.real_name,sender)
@@ -135,8 +132,7 @@
new_flavor = sanitize(new_flavor, MAX_MESSAGE_LEN*2)
inside_flavor = new_flavor
nif.notify("Updating VR environment...")
- for(var/brain in brainmobs)
- var/mob/living/carbon/brain/caught_soul/CS = brain
+ for(var/mob/living/carbon/brain/caught_soul/CS as anything in brainmobs)
to_chat(CS,"Your surroundings change to...\n[inside_flavor]")
save_settings()
return TRUE
@@ -179,24 +175,20 @@
nif.clear_flag(NIF_O_SCOTHERS,NIF_FLAGS_OTHER)
if(NIF_SC_ALLOW_EARS)
if(setting_flags & NIF_SC_ALLOW_EARS)
- for(var/brain in brainmobs)
- var/mob/living/carbon/brain/caught_soul/brainmob = brain
+ for(var/mob/living/carbon/brain/caught_soul/brainmob as anything in brainmobs)
brainmob.ext_deaf = FALSE
notify_message = "External audio input enabled."
else
- for(var/brain in brainmobs)
- var/mob/living/carbon/brain/caught_soul/brainmob = brain
+ for(var/mob/living/carbon/brain/caught_soul/brainmob as anything in brainmobs)
brainmob.ext_deaf = TRUE
notify_message = "External audio input disabled."
if(NIF_SC_ALLOW_EYES)
if(setting_flags & NIF_SC_ALLOW_EYES)
- for(var/brain in brainmobs)
- var/mob/living/carbon/brain/caught_soul/brainmob = brain
+ for(var/mob/living/carbon/brain/caught_soul/brainmob as anything in brainmobs)
brainmob.ext_blind = FALSE
notify_message = "External video input enabled."
else
- for(var/brain in brainmobs)
- var/mob/living/carbon/brain/caught_soul/brainmob = brain
+ for(var/mob/living/carbon/brain/caught_soul/brainmob as anything in brainmobs)
brainmob.ext_blind = TRUE
notify_message = "External video input disabled."
diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm
index 01b5a7f1ef..85f76d9aa0 100644
--- a/code/modules/organs/organ_external.dm
+++ b/code/modules/organs/organ_external.dm
@@ -106,8 +106,7 @@
while(null in owner.organs)
owner.organs -= null
- for(var/imp in implants)
- var/obj/item/weapon/implant/I = imp
+ for(var/obj/item/weapon/implant/I as anything in implants)
if(!istype(I))
continue
I.imp_in = I.part = null
diff --git a/code/modules/overmap/events/event_handler.dm b/code/modules/overmap/events/event_handler.dm
index 67785e95ac..2d9c2badda 100644
--- a/code/modules/overmap/events/event_handler.dm
+++ b/code/modules/overmap/events/event_handler.dm
@@ -14,8 +14,7 @@ GLOBAL_DATUM_INIT(overmap_event_handler, /decl/overmap_event_handler, new)
// Acquire the list of not-yet utilized overmap turfs on this Z-level
var/list/overmap_turfs = block(locate(OVERMAP_EDGE, OVERMAP_EDGE, z_level), locate(overmap_size - OVERMAP_EDGE, overmap_size - OVERMAP_EDGE, z_level))
var/list/candidate_turfs = list()
- for(var/Trf in overmap_turfs)
- var/turf/T = Trf
+ for(var/turf/T as anything in overmap_turfs)
if(!(locate(/obj/effect/overmap/visitable) in T))
candidate_turfs += T
diff --git a/code/modules/overmap/sectors.dm b/code/modules/overmap/sectors.dm
index 1b422c01d3..1e4cc23634 100644
--- a/code/modules/overmap/sectors.dm
+++ b/code/modules/overmap/sectors.dm
@@ -240,8 +240,7 @@
testing("Putting overmap on [global.using_map.overmap_z]")
var/area/overmap/A = new
- for (var/square in block(locate(1,1,global.using_map.overmap_z), locate(global.using_map.overmap_size,global.using_map.overmap_size,global.using_map.overmap_z)))
- var/turf/T = square
+ for(var/turf/T as anything in block(locate(1,1,global.using_map.overmap_z), locate(global.using_map.overmap_size,global.using_map.overmap_size,global.using_map.overmap_z)))
if(T.x == 1 || T.y == 1 || T.x == global.using_map.overmap_size || T.y == global.using_map.overmap_size)
T = T.ChangeTurf(/turf/unsimulated/map/edge)
else
diff --git a/code/modules/overmap/ships/engines/gas_thruster.dm b/code/modules/overmap/ships/engines/gas_thruster.dm
index 773ed97a64..5510a803de 100644
--- a/code/modules/overmap/ships/engines/gas_thruster.dm
+++ b/code/modules/overmap/ships/engines/gas_thruster.dm
@@ -86,8 +86,7 @@
controller = new(src)
update_nearby_tiles(need_rebuild=1)
- for(var/ship in SSshuttles.ships)
- var/obj/effect/overmap/visitable/ship/S = ship
+ for(var/obj/effect/overmap/visitable/ship/S as anything in SSshuttles.ships)
if(S.check_ownership(src))
S.engines |= controller
if(dir != S.fore_dir)
diff --git a/code/modules/overmap/ships/panicbutton.dm b/code/modules/overmap/ships/panicbutton.dm
index 4e819db642..dcbcbf500f 100644
--- a/code/modules/overmap/ships/panicbutton.dm
+++ b/code/modules/overmap/ships/panicbutton.dm
@@ -66,8 +66,7 @@
var/turf/us = get_turf(src)
for(var/hz in hear_z)
- for(var/m in GLOB.players_by_zlevel[hz])
- var/mob/M = m
+ for(var/mob/M as anything in GLOB.players_by_zlevel[hz])
var/sound/SND = sound('sound/misc/emergency_beacon_launched.ogg') // Inside the loop because playsound_local modifies it for each person, so, need separate instances
var/turf/them = get_turf(M)
var/volume = max(0.20, 1-(get_dist(us,them) / mapsize*0.8))*100
diff --git a/code/modules/paperwork/paperplane.dm b/code/modules/paperwork/paperplane.dm
index 65c3bff6bf..a8cb28b873 100644
--- a/code/modules/paperwork/paperplane.dm
+++ b/code/modules/paperwork/paperplane.dm
@@ -40,8 +40,7 @@
if(!stamped)
stamped = new
else if(stamped)
- for(var/S in stamped)
- var/obj/item/weapon/stamp/ = S
+ for(var/obj/item/weapon/stamp/stamp as anything in stamped)
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi', "paperplane_[initial(stamp.icon_state)]")
add_overlay(stampoverlay)
diff --git a/code/modules/pda/cart.dm b/code/modules/pda/cart.dm
index d391419d91..596486f3df 100644
--- a/code/modules/pda/cart.dm
+++ b/code/modules/pda/cart.dm
@@ -69,11 +69,9 @@ var/list/civilian_cartridges = list(
return ..()
/obj/item/weapon/cartridge/proc/update_programs(obj/item/device/pda/pda)
- for(var/A in programs)
- var/datum/data/pda/P = A
+ for(var/datum/data/pda/P as anything in programs)
P.pda = pda
- for(var/A in messenger_plugins)
- var/datum/data/pda/messenger_plugin/P = A
+ for(var/datum/data/pda/messenger_plugin/P as anything in messenger_plugins)
P.pda = pda
/obj/item/weapon/cartridge/engineering
diff --git a/code/modules/pda/cart_apps.dm b/code/modules/pda/cart_apps.dm
index acd942aa93..857b7bbc04 100644
--- a/code/modules/pda/cart_apps.dm
+++ b/code/modules/pda/cart_apps.dm
@@ -136,8 +136,7 @@
records["general"] = general_records.fields
return records
else
- for(var/A in sortRecord(data_core.general))
- var/datum/data/record/R = A
+ for(var/datum/data/record/R as anything in sortRecord(data_core.general))
if(R)
records += list(list(Name = R.fields["name"], "ref" = "\ref[R]"))
data["recordsList"] = records
@@ -182,8 +181,7 @@
/datum/data/pda/app/crew_records/medical/load_records(datum/data/record/R)
..(R)
- for(var/A in data_core.medical)
- var/datum/data/record/E = A
+ for(var/datum/data/record/E as anything in data_core.medical)
if(E && (E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
medical_records = E
break
@@ -208,8 +206,7 @@
/datum/data/pda/app/crew_records/security/load_records(datum/data/record/R)
..(R)
- for(var/A in data_core.security)
- var/datum/data/record/E = A
+ for(var/datum/data/record/E as anything in data_core.security)
if(E && (E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
security_records = E
break
@@ -229,8 +226,7 @@
supplyData["shuttle_loc"] = shuttle.at_station() ? "Station" : "Dock"
var/supplyOrderCount = 0
var/supplyOrderData[0]
- for(var/S in SSsupply.shoppinglist)
- var/datum/supply_order/SO = S
+ for(var/datum/supply_order/SO as anything in SSsupply.shoppinglist)
supplyOrderCount++
supplyOrderData[++supplyOrderData.len] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "ApprovedBy" = SO.ordered_by, "Comment" = html_encode(SO.comment))
@@ -240,8 +236,7 @@
var/requestCount = 0
var/requestData[0]
- for(var/S in SSsupply.order_history)
- var/datum/supply_order/SO = S
+ for(var/datum/supply_order/SO as anything in SSsupply.order_history)
if(SO.status != SUP_ORDER_REQUESTED)
continue
diff --git a/code/modules/pda/messenger.dm b/code/modules/pda/messenger.dm
index efb87577d5..03996dc35c 100644
--- a/code/modules/pda/messenger.dm
+++ b/code/modules/pda/messenger.dm
@@ -33,8 +33,7 @@
else
var/convopdas[0]
var/pdas[0]
- for(var/A in PDAs)
- var/obj/item/device/pda/P = A
+ for(var/obj/item/device/pda/P as anything in PDAs)
var/datum/data/pda/app/messenger/PM = P.find_program(/datum/data/pda/app/messenger)
if(!P.owner || PM.toff || P == pda || PM.m_hidden)
@@ -49,8 +48,7 @@
var/list/plugins = list()
if(pda.cartridge)
- for(var/A in pda.cartridge.messenger_plugins)
- var/datum/data/pda/messenger_plugin/P = A
+ for(var/datum/data/pda/messenger_plugin/P as anything in pda.cartridge.messenger_plugins)
plugins += list(list(name = P.name, icon = P.icon, ref = "\ref[P]"))
data["plugins"] = plugins
@@ -148,8 +146,7 @@
//var/telecomms_intact = telecomms_process(P.owner, owner, t)
var/obj/machinery/message_server/useMS = null
if(message_servers)
- for(var/A in message_servers)
- var/obj/machinery/message_server/MS = A
+ for(var/obj/machinery/message_server/MS as anything in message_servers)
//PDAs are now dependent on the Message Server.
if(MS.active)
useMS = MS
@@ -194,8 +191,7 @@
to_chat(usr, "Turn on your receiver in order to send messages.")
return
- for(var/A in PDAs)
- var/obj/item/device/pda/P = A
+ for(var/obj/item/device/pda/P as anything in PDAs)
var/datum/data/pda/app/messenger/PM = P.find_program(/datum/data/pda/app/messenger)
if(!P.owner || !PM || PM.hidden || P == pda || PM.toff)
diff --git a/code/modules/pda/pda.dm b/code/modules/pda/pda.dm
index 274a27857a..a237436974 100644
--- a/code/modules/pda/pda.dm
+++ b/code/modules/pda/pda.dm
@@ -197,8 +197,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
shortcut_cache.Cut()
/obj/item/device/pda/proc/update_programs()
- for(var/A in programs)
- var/datum/data/pda/P = A
+ for(var/datum/data/pda/P as anything in programs)
P.pda = src
/obj/item/device/pda/proc/detonate_act(var/obj/item/device/pda/P)
diff --git a/code/modules/pda/pda_tgui.dm b/code/modules/pda/pda_tgui.dm
index 6d57a6c25e..036ec1fbe4 100644
--- a/code/modules/pda/pda_tgui.dm
+++ b/code/modules/pda/pda_tgui.dm
@@ -22,8 +22,7 @@
if(cartridge)
prog_list |= cartridge.programs
- for(var/A in prog_list)
- var/datum/data/pda/P = A
+ for(var/datum/data/pda/P as anything in prog_list)
if(P.hidden)
continue
diff --git a/code/modules/planet/sif.dm b/code/modules/planet/sif.dm
index af6f632bdc..1d2e4b0af0 100644
--- a/code/modules/planet/sif.dm
+++ b/code/modules/planet/sif.dm
@@ -499,8 +499,7 @@ var/datum/planet/sif/planet_sif = null
/datum/weather/sif/ash_storm/process_effects()
..()
- for(var/thing in living_mob_list)
- var/mob/living/L = thing
+ for(var/mob/living/L as anything in living_mob_list)
if(L.z in holder.our_planet.expected_z_levels)
var/turf/T = get_turf(L)
if(!T.outdoors)
@@ -536,8 +535,7 @@ var/datum/planet/sif/planet_sif = null
/datum/weather/sif/fallout/process_effects()
..()
- for(var/thing in living_mob_list)
- var/mob/living/L = thing
+ for(var/mob/living/L as anything in living_mob_list)
if(L.z in holder.our_planet.expected_z_levels)
irradiate_nearby_turf(L)
var/turf/T = get_turf(L)
diff --git a/code/modules/planet/virgo3b_vr.dm b/code/modules/planet/virgo3b_vr.dm
index ea441b6f38..d2faf2315d 100644
--- a/code/modules/planet/virgo3b_vr.dm
+++ b/code/modules/planet/virgo3b_vr.dm
@@ -471,8 +471,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null
/datum/weather/virgo3b/ash_storm/process_effects()
..()
- for(var/thing in living_mob_list)
- var/mob/living/L = thing
+ for(var/mob/living/L as anything in living_mob_list)
if(L.z in holder.our_planet.expected_z_levels)
var/turf/T = get_turf(L)
if(!T.outdoors)
@@ -508,8 +507,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null
/datum/weather/virgo3b/fallout/process_effects()
..()
- for(var/thing in living_mob_list)
- var/mob/living/L = thing
+ for(var/mob/living/L as anything in living_mob_list)
if(L.z in holder.our_planet.expected_z_levels)
irradiate_nearby_turf(L)
var/turf/T = get_turf(L)
diff --git a/code/modules/planet/virgo4_vr.dm b/code/modules/planet/virgo4_vr.dm
index 6ac748f421..18f4298aa1 100644
--- a/code/modules/planet/virgo4_vr.dm
+++ b/code/modules/planet/virgo4_vr.dm
@@ -444,8 +444,7 @@ var/datum/planet/virgo4/planet_virgo4 = null
/datum/weather/virgo4/ash_storm/process_effects()
..()
- for(var/thing in living_mob_list)
- var/mob/living/L = thing
+ for(var/mob/living/L as anything in living_mob_list)
if(L.z in holder.our_planet.expected_z_levels)
var/turf/T = get_turf(L)
if(!T.outdoors)
@@ -481,8 +480,7 @@ var/datum/planet/virgo4/planet_virgo4 = null
/datum/weather/virgo4/fallout/process_effects()
..()
- for(var/thing in living_mob_list)
- var/mob/living/L = thing
+ for(var/mob/living/L as anything in living_mob_list)
if(L.z in holder.our_planet.expected_z_levels)
irradiate_nearby_turf(L)
var/turf/T = get_turf(L)
diff --git a/code/modules/planet/weather.dm b/code/modules/planet/weather.dm
index 48953a97f1..bbe2318a27 100644
--- a/code/modules/planet/weather.dm
+++ b/code/modules/planet/weather.dm
@@ -202,8 +202,7 @@
return
for(var/z_level in 1 to world.maxz)
- for(var/a in GLOB.players_by_zlevel[z_level])
- var/mob/M = a
+ for(var/mob/M as anything in GLOB.players_by_zlevel[z_level])
// Check if the mob left the z-levels we control. If so, make the sounds stop for them.
if(!(z_level in holder.our_planet.expected_z_levels))
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/power/gravitygenerator_vr.dm b/code/modules/power/gravitygenerator_vr.dm
index cce22b705a..ae282b41ca 100644
--- a/code/modules/power/gravitygenerator_vr.dm
+++ b/code/modules/power/gravitygenerator_vr.dm
@@ -389,8 +389,7 @@ GLOBAL_LIST_EMPTY(gravity_generators)
// Shake everyone on the z level to let them know that gravity was enagaged/disenagaged.
/obj/machinery/gravity_generator/main/proc/shake_everyone()
var/sound/alert_sound = sound('sound/effects/alert.ogg')
- for(var/i in player_list)
- var/mob/M = i
+ for(var/mob/M as anything in player_list)
if(!(M.z in levels))
continue
M.update_gravity(M.mob_has_gravity())
diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm
index 3225030581..39d413677d 100644
--- a/code/modules/power/singularity/singularity.dm
+++ b/code/modules/power/singularity/singularity.dm
@@ -265,8 +265,7 @@ GLOBAL_LIST_BOILERPLATE(all_singularities, /obj/singularity)
return 1
/obj/singularity/proc/eat()
- for(var/T in orange(grav_pull, src))
- var/atom/X = T
+ for(var/atom/X as anything in orange(grav_pull, src))
if(!X.simulated)
continue
var/dist = get_dist(X, src)
diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm
index 8a20c9e685..17bf6a400a 100644
--- a/code/modules/power/solar.dm
+++ b/code/modules/power/solar.dm
@@ -314,8 +314,7 @@ GLOBAL_LIST_EMPTY(solars_list)
// This would use LateInitialize(), however the powernet does not appear to exist during that time.
/hook/roundstart/proc/auto_start_solars()
- for(var/a in GLOB.solars_list)
- var/obj/machinery/power/solar_control/SC = a
+ for(var/obj/machinery/power/solar_control/SC as anything in GLOB.solars_list)
SC.auto_start()
return TRUE
diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm
index e3ccafa4cc..cf7aa9e2c1 100644
--- a/code/modules/power/tesla/energy_ball.dm
+++ b/code/modules/power/tesla/energy_ball.dm
@@ -40,8 +40,7 @@
var/obj/singularity/energy_ball/EB = orbiting.orbiting
EB.orbiting_balls -= src
- for(var/ball in orbiting_balls)
- var/obj/singularity/energy_ball/EB = ball
+ for(var/obj/singularity/energy_ball/EB as anything in orbiting_balls)
qdel(EB)
. = ..()
diff --git a/code/modules/projectiles/broken.dm b/code/modules/projectiles/broken.dm
index f46f7f34e5..57809fdbd1 100644
--- a/code/modules/projectiles/broken.dm
+++ b/code/modules/projectiles/broken.dm
@@ -31,20 +31,19 @@
if(do_after(user, 5 SECONDS))
to_chat(user, "\The [src] can possibly be restored with:")
- for(var/resource in material_needs)
- var/obj/item/res = resource
- if(material_needs[resource] > 0)
+ for(var/obj/item/res as anything in material_needs)
+ if(material_needs[res] > 0)
var/res_name = ""
if(ispath(res,/obj/item/stack/material))
var/obj/item/stack/material/mat_stack = res
var/datum/material/mat = get_material_by_name("[initial(mat_stack.default_type)]")
- if(material_needs[resource]>1)
+ if(material_needs[res]>1)
res_name = "[mat.use_name] [mat.sheet_plural_name]"
else
res_name = "[mat.use_name] [mat.sheet_singular_name]"
else
res_name = initial(res.name)
- to_chat(user, "- x [material_needs[resource]] [res_name]")
+ to_chat(user, "- x [material_needs[res]] [res_name]")
/obj/item/weapon/broken_gun/proc/setup_gun(var/obj/item/weapon/gun/path)
if(ispath(path))
diff --git a/code/modules/projectiles/guns/energy/cell_loaded_vr/cell_loaded.dm b/code/modules/projectiles/guns/energy/cell_loaded_vr/cell_loaded.dm
index c819e8c603..eaa3a2d9e8 100644
--- a/code/modules/projectiles/guns/energy/cell_loaded_vr/cell_loaded.dm
+++ b/code/modules/projectiles/guns/energy/cell_loaded_vr/cell_loaded.dm
@@ -34,8 +34,7 @@
if(batt.shots_left)
return new chambered.projectile_type()
else
- for(var/B in ammo_magazine.stored_ammo)
- var/obj/item/ammo_casing/microbattery/other_batt = B
+ for(var/obj/item/ammo_casing/microbattery/other_batt as anything in ammo_magazine.stored_ammo)
if(istype(other_batt,chambered.type) && other_batt.shots_left)
switch_to(other_batt)
return new chambered.projectile_type()
@@ -54,8 +53,7 @@
charge_left = batt.shots_left
max_charge = initial(batt.shots_left)
if(ammo_magazine) //Crawl to find more
- for(var/B in ammo_magazine.stored_ammo)
- var/obj/item/ammo_casing/microbattery/bullet = B
+ for(var/obj/item/ammo_casing/microbattery/bullet as anything in ammo_magazine.stored_ammo)
if(istype(bullet,batt.type))
charge_left += bullet.shots_left
max_charge += initial(bullet.shots_left)
@@ -179,8 +177,7 @@
return //Why bother
var/current = 0
- for(var/B in stored_ammo)
- var/obj/item/ammo_casing/microbattery/batt = B
+ for(var/obj/item/ammo_casing/microbattery/batt as anything in stored_ammo)
var/image/cap = image(icon, icon_state = "[capname]_cap")
cap.color = batt.type_color
cap.pixel_x = current * x_offset //Caps don't need a pixel_y offset
diff --git a/code/modules/projectiles/guns/energy/kinetic_accelerator_vr.dm b/code/modules/projectiles/guns/energy/kinetic_accelerator_vr.dm
index 043a353015..581e05d74d 100644
--- a/code/modules/projectiles/guns/energy/kinetic_accelerator_vr.dm
+++ b/code/modules/projectiles/guns/energy/kinetic_accelerator_vr.dm
@@ -25,8 +25,7 @@
. = ..()
if(Adjacent(user) && max_mod_capacity)
. += "[get_remaining_mod_capacity()]% mod capacity remaining."
- for(var/A in get_modkits())
- var/obj/item/borg/upgrade/modkit/M = A
+ for(var/obj/item/borg/upgrade/modkit/M as anything in get_modkits())
. += "There is a [M.name] mod installed, using [M.cost]% capacity."
/obj/item/weapon/gun/energy/kinetic_accelerator/attackby(obj/item/A, mob/user)
@@ -46,8 +45,7 @@
/obj/item/weapon/gun/energy/kinetic_accelerator/proc/get_remaining_mod_capacity()
var/current_capacity_used = 0
- for(var/A in get_modkits())
- var/obj/item/borg/upgrade/modkit/M = A
+ for(var/obj/item/borg/upgrade/modkit/M as anything in get_modkits())
current_capacity_used += M.cost
return max_mod_capacity - current_capacity_used
@@ -57,8 +55,7 @@
. += A
/obj/item/weapon/gun/energy/kinetic_accelerator/proc/modify_projectile(obj/item/projectile/kinetic/K)
- for(var/A in get_modkits())
- var/obj/item/borg/upgrade/modkit/M = A
+ for(var/obj/item/borg/upgrade/modkit/M as anything in get_modkits())
M.modify_projectile(K)
/obj/item/weapon/gun/energy/kinetic_accelerator/consume_next_projectile()
@@ -185,8 +182,7 @@
. = TRUE
if(denied_type)
var/number_of_denied = 0
- for(var/A in KA.get_modkits())
- var/obj/item/borg/upgrade/modkit/M = A
+ for(var/obj/item/borg/upgrade/modkit/M as anything in KA.get_modkits())
if(istype(M, denied_type))
number_of_denied++
if(number_of_denied >= maximum_of_type)
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/holder/distilling.dm b/code/modules/reagents/holder/distilling.dm
index 1599f395d9..9fb4867901 100644
--- a/code/modules/reagents/holder/distilling.dm
+++ b/code/modules/reagents/holder/distilling.dm
@@ -8,19 +8,16 @@
var/list/effect_reactions = list()
do
reaction_occurred = FALSE
- for(var/i in reagent_list)
- var/datum/reagent/R = i
+ for(var/datum/reagent/R as anything in reagent_list)
if(SSchemistry.distilled_reactions_by_reagent[R.id])
eligible_reactions |= SSchemistry.distilled_reactions_by_reagent[R.id]
- for(var/i in eligible_reactions)
- var/decl/chemical_reaction/C = i
+ for(var/decl/chemical_reaction/C as anything in eligible_reactions)
if(C.can_happen(src) && C.process(src))
effect_reactions |= C
reaction_occurred = TRUE
eligible_reactions.len = 0
while(reaction_occurred)
- for(var/i in effect_reactions)
- var/decl/chemical_reaction/C = i
+ for(var/decl/chemical_reaction/C as anything in effect_reactions)
C.post_reaction(src)
update_total()
\ No newline at end of file
diff --git a/code/modules/reagents/holder/holder.dm b/code/modules/reagents/holder/holder.dm
index 26ad557e98..75ad9defcb 100644
--- a/code/modules/reagents/holder/holder.dm
+++ b/code/modules/reagents/holder/holder.dm
@@ -85,20 +85,17 @@
var/list/effect_reactions = list()
do
reaction_occurred = FALSE
- for(var/i in reagent_list)
- var/datum/reagent/R = i
+ for(var/datum/reagent/R as anything in reagent_list)
if(SSchemistry.instant_reactions_by_reagent[R.id])
eligible_reactions |= SSchemistry.instant_reactions_by_reagent[R.id]
- for(var/i in eligible_reactions)
- var/decl/chemical_reaction/C = i
+ for(var/decl/chemical_reaction/C as anything in eligible_reactions)
if(C.can_happen(src) && C.process(src))
effect_reactions |= C
reaction_occurred = TRUE
eligible_reactions.len = 0
while(reaction_occurred)
- for(var/i in effect_reactions)
- var/decl/chemical_reaction/C = i
+ for(var/decl/chemical_reaction/C as anything in effect_reactions)
C.post_reaction(src)
update_total()
@@ -145,8 +142,7 @@
return 0
/datum/reagents/proc/isolate_reagent(reagent)
- for(var/A in reagent_list)
- var/datum/reagent/R = A
+ for(var/datum/reagent/R as anything in reagent_list)
if(R.id != reagent)
del_reagent(R.id)
update_total()
@@ -484,19 +480,17 @@
objs += O
if (objs.len)
var/objportion = (amount * 0.2) / objs.len
- for (var/o in objs)
- var/obj/O = o
+ for(var/obj/O as anything in objs)
trans_to(O, objportion, multiplier, copy)
amount = min(amount, total_volume)
if (mobs.len)
var/mobportion = (amount * 0.5) / mobs.len
- for (var/m in mobs)
- var/mob/M = m
+ for(var/mob/M as anything in mobs)
trans_to(M, mobportion, multiplier, copy)
trans_to(T, total_volume, multiplier, copy)
if (total_volume <= 0)
qdel(src)
-
+
/**
* Calls [/datum/reagent/proc/on_update] on every reagent in this holder
*
diff --git a/code/modules/reagents/machinery/grinder.dm b/code/modules/reagents/machinery/grinder.dm
index 014305a8f1..3b5ea9e4fd 100644
--- a/code/modules/reagents/machinery/grinder.dm
+++ b/code/modules/reagents/machinery/grinder.dm
@@ -56,8 +56,7 @@
. += "\The [src] contains:"
if(beaker)
. += "- \A [beaker]."
- for(var/i in holdingitems)
- var/obj/item/O = i
+ for(var/obj/item/O as anything in holdingitems)
. += "- \A [O.name]."
if(!(stat & (NOPOWER|BROKEN)))
diff --git a/code/modules/reagents/reactions/instant/instant_vr.dm b/code/modules/reagents/reactions/instant/instant_vr.dm
index a014c0d45f..4eef9c3492 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/reagents/reagents/vore_vr.dm b/code/modules/reagents/reagents/vore_vr.dm
index 5bb366fbe4..0fb3a74b61 100644
--- a/code/modules/reagents/reagents/vore_vr.dm
+++ b/code/modules/reagents/reagents/vore_vr.dm
@@ -76,8 +76,7 @@
M.make_dizzy(1)
M.adjustHalLoss(2)
- for(var/belly in M.vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in M.vore_organs)
for(var/atom/movable/A in B)
if(isliving(A))
var/mob/living/P = A
@@ -102,8 +101,7 @@
M.confused = max(M.confused, 20)
M.hallucination += 15
- for(var/belly in M.vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in M.vore_organs)
if(B.digest_mode == DM_ABSORB) //Turn off absorbing on bellies
B.digest_mode = DM_HOLD
diff --git a/code/modules/research/research.dm b/code/modules/research/research.dm
index e8ad090e10..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()
@@ -120,8 +120,7 @@ GLOBAL_LIST_INIT(design_datums, list())
// A simple helper proc to find the name of a tech with a given ID.
/proc/CallTechName(var/ID)
- for(var/T in subtypesof(/datum/tech))
- var/datum/tech/check_tech = T
+ for(var/datum/tech/check_tech as anything in subtypesof(/datum/tech))
if(initial(check_tech.id) == ID)
return initial(check_tech.name)
diff --git a/code/modules/resleeving/infocore_records.dm b/code/modules/resleeving/infocore_records.dm
index 5f3cb027c5..0f16a2b3b7 100644
--- a/code/modules/resleeving/infocore_records.dm
+++ b/code/modules/resleeving/infocore_records.dm
@@ -182,8 +182,7 @@
organ_data[org] = I.robotic
//Genetic modifiers
- for(var/modifier in M.modifiers)
- var/datum/modifier/mod = modifier
+ for(var/datum/modifier/mod as anything in M.modifiers)
if(mod.flags & MODIFIER_GENETIC)
genetic_modifiers.Add(mod.type)
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/rogueminer_vr/zonemaster.dm b/code/modules/rogueminer_vr/zonemaster.dm
index 2b1f3728f5..15d1887803 100644
--- a/code/modules/rogueminer_vr/zonemaster.dm
+++ b/code/modules/rogueminer_vr/zonemaster.dm
@@ -191,8 +191,7 @@
return
var/farEnough = 1
- for(var/A in SSxenoarch.digsite_spawning_turfs)
- var/turf/T = A
+ for(var/turf/T as anything in SSxenoarch.digsite_spawning_turfs)
if(T in range(5, M))
farEnough = 0
break
diff --git a/code/modules/security levels/security levels.dm b/code/modules/security levels/security levels.dm
index aed060d18e..3ce724f87e 100644
--- a/code/modules/security levels/security levels.dm
+++ b/code/modules/security levels/security levels.dm
@@ -76,8 +76,7 @@
if(FA.z in using_map.contact_levels)
FA.on_alert_changed(newlevel)
//VOREStation Add
- for(var/hp in GLOB.holoposters)
- var/obj/machinery/holoposter/HP = hp
+ for(var/obj/machinery/holoposter/HP as anything in GLOB.holoposters)
HP.update_icon()
//VOREStation Add End
diff --git a/code/modules/shuttles/crashes.dm b/code/modules/shuttles/crashes.dm
index 6f6c66e177..a71ab5e07e 100644
--- a/code/modules/shuttles/crashes.dm
+++ b/code/modules/shuttles/crashes.dm
@@ -52,8 +52,7 @@
return // Lucky!
// Hide people
- for(var/living in victims)
- var/mob/living/L = living
+ for(var/mob/living/L as anything in victims)
victims[L] = get_turf(L)
L.Sleeping(rand(10,20))
L.Life()
@@ -70,8 +69,7 @@
command_announcement.Announce("[crash_message]", "Shuttle Alert")
// Put people back
- for(var/living in victims)
- var/mob/living/L = living
+ for(var/mob/living/L as anything in victims)
L.loc = victims[L]
L.adjustBruteLoss(5)
L.adjustBruteLoss(10)
diff --git a/code/modules/shuttles/shuttle_console.dm b/code/modules/shuttles/shuttle_console.dm
index 9deff67d7d..5f4dda17be 100644
--- a/code/modules/shuttles/shuttle_console.dm
+++ b/code/modules/shuttles/shuttle_console.dm
@@ -151,8 +151,7 @@
GLOBAL_LIST_BOILERPLATE(papers_dockingcode, /obj/item/weapon/paper/dockingcodes)
/hook/roundstart/proc/populate_dockingcodes()
- for(var/paper in GLOB.papers_dockingcode)
- var/obj/item/weapon/paper/dockingcodes/dcp = paper
+ for(var/obj/item/weapon/paper/dockingcodes/dcp as anything in GLOB.papers_dockingcode)
dcp.populate_info()
return TRUE
diff --git a/code/modules/shuttles/shuttles_web.dm b/code/modules/shuttles/shuttles_web.dm
index f871f49bdd..935b47ca72 100644
--- a/code/modules/shuttles/shuttles_web.dm
+++ b/code/modules/shuttles/shuttles_web.dm
@@ -112,8 +112,7 @@
web_master.process_autopath()
/datum/shuttle/autodock/web_shuttle/proc/update_helmets()
- for(var/helm in helmets)
- var/obj/item/clothing/head/pilot/H = helm
+ for(var/obj/item/clothing/head/pilot/H as anything in helmets)
if(QDELETED(H))
helmets -= H
continue
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 4ccfc1a8a6..25b171bb52 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
@@ -32,8 +32,7 @@
/datum/tgs_api/v3210/proc/HandleServiceCustomCommand(command, sender, params)
if(!cached_custom_tgs_chat_commands)
cached_custom_tgs_chat_commands = list()
- for(var/I in typesof(/datum/tgs_chat_command) - /datum/tgs_chat_command)
- var/datum/tgs_chat_command/stc = I
+ for(var/datum/tgs_chat_command/stc as anything in subtypesof(/datum/tgs_chat_command))
cached_custom_tgs_chat_commands[lowertext(initial(stc.name))] = stc
var/command_type = cached_custom_tgs_chat_commands[command]
diff --git a/code/modules/tgs/v4/api.dm b/code/modules/tgs/v4/api.dm
index 0e37a7aa24..5e338aaa56 100644
--- a/code/modules/tgs/v4/api.dm
+++ b/code/modules/tgs/v4/api.dm
@@ -260,8 +260,7 @@
var/list/ids
if(length(channels))
ids = list()
- for(var/I in channels)
- var/datum/tgs_chat_channel/channel = I
+ for(var/datum/tgs_chat_channel/channel as anything in channels)
ids += channel.id
message = list("message" = message, "channelIds" = ids)
if(intercepted_message_queue)
@@ -271,8 +270,7 @@
/datum/tgs_api/v4/ChatTargetedBroadcast(message, admin_only)
var/list/channels = list()
- for(var/I in ChatChannelInfo())
- var/datum/tgs_chat_channel/channel = I
+ for(var/datum/tgs_chat_channel/channel as anything in ChatChannelInfo())
if (!channel.is_private_channel && ((channel.is_admin_channel && admin_only) || (!channel.is_admin_channel && !admin_only)))
channels += channel.id
message = list("message" = message, "channelIds" = channels)
diff --git a/code/modules/tgs/v4/commands.dm b/code/modules/tgs/v4/commands.dm
index 4ca1500167..770b4864b1 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/api.dm b/code/modules/tgs/v5/api.dm
index 704ff873c0..0d5adf2fe5 100644
--- a/code/modules/tgs/v5/api.dm
+++ b/code/modules/tgs/v5/api.dm
@@ -302,8 +302,7 @@
channels = ChatChannelInfo()
var/list/ids = list()
- for(var/I in channels)
- var/datum/tgs_chat_channel/channel = I
+ for(var/datum/tgs_chat_channel/channel as anything in channels)
ids += channel.id
message = list(DMAPI5_CHAT_MESSAGE_TEXT = message, DMAPI5_CHAT_MESSAGE_CHANNEL_IDS = ids)
@@ -314,8 +313,7 @@
/datum/tgs_api/v5/ChatTargetedBroadcast(message, admin_only)
var/list/channels = list()
- for(var/I in ChatChannelInfo())
- var/datum/tgs_chat_channel/channel = I
+ for(var/datum/tgs_chat_channel/channel as anything in ChatChannelInfo())
if (!channel.is_private_channel && ((channel.is_admin_channel && admin_only) || (!channel.is_admin_channel && !admin_only)))
channels += channel.id
message = list(DMAPI5_CHAT_MESSAGE_TEXT = message, DMAPI5_CHAT_MESSAGE_CHANNEL_IDS = channels)
diff --git a/code/modules/tgs/v5/commands.dm b/code/modules/tgs/v5/commands.dm
index 6d31dd3422..e5b2562efe 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/tgui/modules/admin_shuttle_controller.dm b/code/modules/tgui/modules/admin_shuttle_controller.dm
index a40dec8fca..d03e78b32d 100644
--- a/code/modules/tgui/modules/admin_shuttle_controller.dm
+++ b/code/modules/tgui/modules/admin_shuttle_controller.dm
@@ -19,8 +19,7 @@
data["shuttles"] = shuttles
var/list/overmap_ships = list()
- for(var/ship in SSshuttles.ships)
- var/obj/effect/overmap/visitable/ship/S = ship
+ for(var/obj/effect/overmap/visitable/ship/S as anything in SSshuttles.ships)
overmap_ships.Add(list(list(
"name" = S.name,
"ref" = REF(S),
diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm
index 3b84e95d53..fe7bb95440 100644
--- a/code/modules/tgui/modules/appearance_changer.dm
+++ b/code/modules/tgui/modules/appearance_changer.dm
@@ -45,8 +45,7 @@
cam_plane_masters = get_tgui_plane_masters()
- for(var/plane in cam_plane_masters)
- var/obj/screen/instance = plane
+ for(var/obj/screen/instance as anything in cam_plane_masters)
instance.assigned_map = map_name
instance.del_on_map_removal = FALSE
instance.screen_loc = "[map_name]:CENTER"
diff --git a/code/modules/tgui/modules/camera.dm b/code/modules/tgui/modules/camera.dm
index abfef14be1..fa67030d55 100644
--- a/code/modules/tgui/modules/camera.dm
+++ b/code/modules/tgui/modules/camera.dm
@@ -37,8 +37,7 @@
cam_plane_masters = get_tgui_plane_masters()
- for(var/plane in cam_plane_masters)
- var/obj/screen/instance = plane
+ for(var/obj/screen/instance as anything in cam_plane_masters)
instance.assigned_map = map_name
instance.del_on_map_removal = FALSE
instance.screen_loc = "[map_name]:CENTER"
diff --git a/code/modules/tgui/modules/ntos-only/cardmod.dm b/code/modules/tgui/modules/ntos-only/cardmod.dm
index fc77417996..8a8ace688f 100644
--- a/code/modules/tgui/modules/ntos-only/cardmod.dm
+++ b/code/modules/tgui/modules/ntos-only/cardmod.dm
@@ -49,8 +49,7 @@
data["target_name"] = id_card ? id_card.name : "-----"
var/list/departments = list()
- for(var/D in SSjob.get_all_department_datums())
- var/datum/department/dept = D
+ for(var/datum/department/dept as anything in SSjob.get_all_department_datums())
if(!dept.assignable) // No AI ID cards for you.
continue
if(dept.centcom_only && !is_centcom)
diff --git a/code/modules/tgui/modules/ntos-only/uav.dm b/code/modules/tgui/modules/ntos-only/uav.dm
index b9288457e5..54dcda1675 100644
--- a/code/modules/tgui/modules/ntos-only/uav.dm
+++ b/code/modules/tgui/modules/ntos-only/uav.dm
@@ -30,8 +30,7 @@
var/list/paired_map = list()
var/obj/item/modular_computer/mc_host = tgui_host()
if(istype(mc_host))
- for(var/puav in mc_host.paired_uavs)
- var/weakref/wr = puav
+ for(var/weakref/wr as anything in mc_host.paired_uavs)
var/obj/item/device/uav/U = wr.resolve()
paired_map.Add(list(list("name" = "[U ? U.nickname : "!!Missing!!"]", "uavref" = "\ref[U]")))
@@ -148,8 +147,7 @@
var/list/zlevels_in_long_range = using_map.get_map_levels(their_z, TRUE, om_range = DEFAULT_OVERMAP_RANGE) - zlevels_in_range
var/their_signal = 0
// Measure z-distance between the AM passed in and the nearest relay
- for(var/relay in ntnet_global.relays)
- var/obj/machinery/ntnet_relay/R = relay
+ for(var/obj/machinery/ntnet_relay/R as anything in ntnet_global.relays)
if(!R.operable())
continue
if(R.z == their_z)
diff --git a/code/modules/virus2/admin.dm b/code/modules/virus2/admin.dm
index b0e92139b4..dd9ae7ead7 100644
--- a/code/modules/virus2/admin.dm
+++ b/code/modules/virus2/admin.dm
@@ -57,10 +57,9 @@
var/list/L = list()
- for(var/e in (typesof(/datum/disease2/effect) - /datum/disease2/effect))
- var/datum/disease2/effect/f = e
+ for(var/datum/disease2/effect/f as anything in subtypesof(/datum/disease2/effect))
if(initial(f.stage) <= stage)
- L[initial(f.name)] = e
+ L[initial(f.name)] = f
var/datum/disease2/effect/Eff = s[stage]
diff --git a/code/modules/virus2/effect.dm b/code/modules/virus2/effect.dm
index dd19e5e3f4..5e3e955574 100644
--- a/code/modules/virus2/effect.dm
+++ b/code/modules/virus2/effect.dm
@@ -15,9 +15,8 @@
/datum/disease2/effectholder/proc/getrandomeffect(var/badness = 1, exclude_types=list())
var/list/datum/disease2/effect/list = list()
- for(var/e in (typesof(/datum/disease2/effect) - /datum/disease2/effect))
- var/datum/disease2/effect/f = e
- if(e in exclude_types)
+ for(var/datum/disease2/effect/f as anything in subtypesof(/datum/disease2/effect))
+ if(f in exclude_types)
continue
if(initial(f.badness) > badness) //we don't want such strong effects
continue
diff --git a/code/modules/vore/eating/belly_obj_vr.dm b/code/modules/vore/eating/belly_obj_vr.dm
index 92724d0f86..16d1280b21 100644
--- a/code/modules/vore/eating/belly_obj_vr.dm
+++ b/code/modules/vore/eating/belly_obj_vr.dm
@@ -326,8 +326,7 @@
var/count = 0
//Iterate over contents and move them all
- for(var/thing in contents)
- var/atom/movable/AM = thing
+ for(var/atom/movable/AM as anything in contents)
if(isliving(AM))
var/mob/living/L = AM
if(L.absorbed && !include_absorbed)
@@ -639,8 +638,7 @@
//This in particular will recurse oddly because if there is absorbed prey of prey of prey...
//it will just move them up one belly. This should never happen though since... when they were
//absobred, they should have been absorbed as well!
- for(var/belly in M.vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in M.vore_organs)
for(var/mob/living/Mm in B)
if(Mm.absorbed)
absorb_living(Mm)
@@ -777,8 +775,7 @@
else if(prob(transferchance) && transferlocation) //Next, let's have it see if they end up getting into an even bigger mess then when they started.
var/obj/belly/dest_belly
- for(var/belly in owner.vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in owner.vore_organs)
if(B.name == transferlocation)
dest_belly = B
break
diff --git a/code/modules/vore/eating/bellymodes_vr.dm b/code/modules/vore/eating/bellymodes_vr.dm
index aec57913ee..4687fb30cc 100644
--- a/code/modules/vore/eating/bellymodes_vr.dm
+++ b/code/modules/vore/eating/bellymodes_vr.dm
@@ -85,11 +85,11 @@
///////////////////// Time to actually process mobs /////////////////////
- for(var/target in touchable_mobs)
- var/mob/living/L = target
+ for(var/mob/living/L as anything in touchable_mobs)
if(!istype(L))
+ stack_trace("Touchable mobs had a nonmob: [L]")
continue
- var/list/returns = DM.process_mob(src, target)
+ var/list/returns = DM.process_mob(src, L)
if(istype(returns) && returns["to_update"])
to_update = TRUE
if(istype(returns) && returns["soundToPlay"] && !play_sound)
diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm
index a5bd3eff04..8654f648e7 100644
--- a/code/modules/vore/eating/living_vr.dm
+++ b/code/modules/vore/eating/living_vr.dm
@@ -251,8 +251,7 @@
var/list/serialized = list()
- for(var/belly in src.vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in src.vore_organs)
serialized += list(B.serialize()) //Can't add a list as an object to another list in Byond. Thanks.
P.belly_prefs = serialized
@@ -305,8 +304,7 @@
// Release everything in every vore organ
//
/mob/living/proc/release_vore_contents(var/include_absorbed = TRUE, var/silent = FALSE)
- for(var/belly in vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in vore_organs)
B.release_all_contents(include_absorbed, silent)
//
@@ -317,8 +315,7 @@
return list()
var/list/message_list = list()
- for (var/belly in vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in vore_organs)
var/bellymessage = B.get_examine_msg()
if(bellymessage) message_list += bellymessage
diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm
index c506ff98af..82133bf126 100644
--- a/code/modules/vore/eating/vorepanel_vr.dm
+++ b/code/modules/vore/eating/vorepanel_vr.dm
@@ -139,8 +139,7 @@
data["inside"] = inside
var/list/our_bellies = list()
- for(var/belly in host.vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in host.vore_organs)
our_bellies.Add(list(list(
"selected" = (B == host.vore_selected),
"name" = B.name,
@@ -320,8 +319,7 @@
failure_msg = "Entered belly name length invalid (must be longer than [BELLIES_NAME_MIN], no more than than [BELLIES_NAME_MAX])."
// else if(whatever) //Next test here.
else
- for(var/belly in host.vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in host.vore_organs)
if(lowertext(new_name) == lowertext(B.name))
failure_msg = "No duplicate belly names, please."
break
@@ -694,8 +692,7 @@
failure_msg = "Entered belly name length invalid (must be longer than [BELLIES_NAME_MIN], no more than than [BELLIES_NAME_MAX])."
// else if(whatever) //Next test here.
else
- for(var/belly in host.vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in host.vore_organs)
if(lowertext(new_name) == lowertext(B.name))
failure_msg = "No duplicate belly names, please."
break
@@ -1034,8 +1031,7 @@
var/failure_msg = ""
var/dest_for //Check to see if it's the destination of another vore organ.
- for(var/belly in host.vore_organs)
- var/obj/belly/B = belly
+ for(var/obj/belly/B as anything in host.vore_organs)
if(B.transferlocation == host.vore_selected)
dest_for = B.name
failure_msg += "This is the destiantion for at least '[dest_for]' belly transfers. Remove it as the destination from any bellies before deleting it. "
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/xenoarcheaology/tools/tools.dm b/code/modules/xenoarcheaology/tools/tools.dm
index f16eae5458..14bda53ca2 100644
--- a/code/modules/xenoarcheaology/tools/tools.dm
+++ b/code/modules/xenoarcheaology/tools/tools.dm
@@ -58,8 +58,7 @@
var/turf/cur_turf = get_turf(src)
if(SSxenoarch) //Sanity check due to runtimes ~Z
- for(var/A in SSxenoarch.artifact_spawning_turfs)
- var/turf/simulated/mineral/T = A
+ for(var/turf/simulated/mineral/T as anything in SSxenoarch.artifact_spawning_turfs)
if(T.density && T.artifact_find)
if(T.z == cur_turf.z)
var/cur_dist = get_dist(cur_turf, T) * 2
@@ -69,8 +68,7 @@
else
SSxenoarch.artifact_spawning_turfs.Remove(T)
- for(var/A in SSxenoarch.digsite_spawning_turfs)
- var/turf/simulated/mineral/T = A
+ for(var/turf/simulated/mineral/T as anything in SSxenoarch.digsite_spawning_turfs)
if(T.density && T.finds && T.finds.len)
if(T.z == cur_turf.z)
var/cur_dist = get_dist(cur_turf, T) * 2
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/integrated_circuits/prefabs.dm b/code/unit_tests/integrated_circuits/prefabs.dm
index 04b3136640..1436e7d097 100644
--- a/code/unit_tests/integrated_circuits/prefabs.dm
+++ b/code/unit_tests/integrated_circuits/prefabs.dm
@@ -10,8 +10,7 @@
var/available_size = initial(assembly.max_components)
var/available_complexity = initial(assembly.max_complexity)
- for(var/ic in prefab.integrated_circuits)
- var/datum/ic_assembly_integrated_circuits/iaic = ic
+ for(var/datum/ic_assembly_integrated_circuits/iaic as anything in prefab.integrated_circuits)
var/obj/item/integrated_circuit/circuit = iaic.circuit_type
available_size -= initial(circuit.size)
available_complexity -= initial(circuit.complexity)
diff --git a/code/unit_tests/loadout_tests.dm b/code/unit_tests/loadout_tests.dm
index aba7184229..f6bfd19d5a 100644
--- a/code/unit_tests/loadout_tests.dm
+++ b/code/unit_tests/loadout_tests.dm
@@ -3,8 +3,7 @@
/datum/unit_test/loadout_test_shall_have_name_cost_path/start_test()
var/failed = 0
- for(var/geartype in typesof(/datum/gear) - /datum/gear)
- var/datum/gear/G = geartype
+ for(var/datum/gear/G as anything in subtypesof(/datum/gear))
if(!initial(G.display_name))
log_unit_test("[G]: Loadout - Missing display name.")
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/tether/tether_shuttles.dm b/maps/tether/tether_shuttles.dm
index 0481ba9741..f8e126d024 100644
--- a/maps/tether/tether_shuttles.dm
+++ b/maps/tether/tether_shuttles.dm
@@ -94,8 +94,7 @@
/datum/shuttle/ferry/tether_backup/process_longjump(var/area/origin, var/area/intended_destination)
var/failures = engines.len
- for(var/engine in engines)
- var/obj/structure/shuttle/engine/E = engine
+ for(var/obj/structure/shuttle/engine/E as anything in engines)
failures -= E.jump()
#define MOVE_PER(x) move_time*(x/100) SECONDS
diff --git a/maps/~map_system/maps.dm b/maps/~map_system/maps.dm
index 12a31b74a1..9c3839f46c 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