Two as anything greps (and some other cleanup) (#92974)

This commit is contained in:
MrMelbert
2025-09-20 12:44:28 -05:00
committed by GitHub
parent ae3274238c
commit 750ca9d2ec
86 changed files with 128 additions and 127 deletions

View File

@@ -250,19 +250,19 @@ GLOBAL_LIST_INIT(wounding_types_to_series, list(
RETURN_TYPE(/datum/wound) // note that just because its set to return this doesnt mean its non-nullable
var/list/wounding_type_list = list()
for (var/wounding_type as anything in wounding_types)
for (var/wounding_type in wounding_types)
wounding_type_list += GLOB.wounding_types_to_series[wounding_type]
if (!length(wounding_type_list))
return null
var/list/datum/wound/paths_to_pick_from = list()
for (var/series as anything in shuffle(wounding_type_list))
for (var/series in shuffle(wounding_type_list))
var/list/severity_list = GLOB.wound_series_collections[series]
if (!length(severity_list))
continue
var/picked_severity
for (var/severity_text as anything in shuffle(GLOB.wound_severities_chronological))
for (var/severity_text in shuffle(GLOB.wound_severities_chronological))
var/severity = text2num(severity_text)
if (!ISINRANGE(severity, severity_min, severity_max))
continue

View File

@@ -6,9 +6,7 @@
var/gun_neurons_activated = controller.blackboard[BB_MONKEY_GUN_NEURONS_ACTIVATED]
var/top_force = 0
var/obj/item/top_force_item
for(var/obj/item/item as anything in held_weapons)
if(!item)
continue
for(var/obj/item/item in held_weapons)
if(HAS_TRAIT(item, TRAIT_NEEDS_TWO_HANDS) || controller.blackboard[BB_MONKEY_BLACKLISTITEMS][item])
continue
if(gun_neurons_activated && isgun(item))
@@ -19,9 +17,7 @@
top_force = item.force
top_force_item = item
for(var/obj/item/item as anything in choices)
if(!item)
continue
for(var/obj/item/item in choices)
if(HAS_TRAIT(item, TRAIT_NEEDS_TWO_HANDS) || controller.blackboard[BB_MONKEY_BLACKLISTITEMS][item])
continue
if(gun_neurons_activated && isgun(item))

View File

@@ -89,7 +89,7 @@
var/list/material_map_amounts = list()
for(var/atom/object as anything in reccursive_contents)
var/list/item_materials = object.custom_materials
for(var/mat as anything in custom_materials)
for(var/mat in custom_materials)
var/mat_amount = 1 //no materials mean we assign this default amount
if(length(item_materials))
mat_amount = item_materials[mat] || 1 //if this object doesn't have our material type then assign a default value of 1
@@ -104,7 +104,7 @@
mat_list_per_item += mat_amount
//Step 3: normalize & scale material_map_amounts with material_map_sum
for(var/mat as anything in material_map_amounts)
for(var/mat in material_map_amounts)
var/mat_sum = material_map_sum[mat]
var/list/mat_per_item = material_map_amounts[mat]
for(var/i in 1 to mat_per_item.len)
@@ -114,7 +114,7 @@
var/index = 1
for(var/atom/object as anything in reccursive_contents)
var/list/final_material_list = list()
for(var/mat as anything in material_map_amounts)
for(var/mat in material_map_amounts)
var/list/mat_per_item = material_map_amounts[mat]
final_material_list[mat] = mat_per_item[index]
object.set_custom_materials(final_material_list, multiplier)

View File

@@ -159,7 +159,7 @@
/proc/init_subtypes_w_path_keys(prototype, list/L)
if(!istype(L))
L = list()
for(var/path as anything in subtypesof(prototype))
for(var/path in subtypesof(prototype))
L[path] = new path()
return L

View File

@@ -7,7 +7,7 @@
playsound(origin_turf, 'sound/items/airhorn/airhorn.ogg', 100, TRUE)
for(var/mob/living/carbon/victim as anything in hearers(max(light_range, medium_range, heavy_range), origin_turf))
for(var/mob/living/carbon/victim in hearers(max(light_range, medium_range, heavy_range), origin_turf))
if(!victim.can_hear())
continue
var/distance = get_dist(origin_turf, victim.loc)

View File

@@ -105,7 +105,7 @@ GLOBAL_LIST_INIT(plant_traits, init_plant_traits())
// So instead, we're gonna wing it
var/list/reagent_to_react_count = list()
for(var/datum/chemical_reaction/reaction as anything in reactions)
for(var/reagent_id as anything in reaction.required_reagents)
for(var/reagent_id in reaction.required_reagents)
reagent_to_react_count[reagent_id] += 1
var/list/reaction_lookup = GLOB.chemical_reactions_list_reactant_index
@@ -114,7 +114,7 @@ GLOBAL_LIST_INIT(plant_traits, init_plant_traits())
// Doing this separately because it relies on the loop above, and this is easier to parse
for(var/datum/chemical_reaction/reaction as anything in reactions)
var/preferred_id = null
for(var/reagent_id as anything in reaction.required_reagents)
for(var/reagent_id in reaction.required_reagents)
if(isnull(preferred_id))
preferred_id = reagent_id
continue
@@ -191,5 +191,5 @@ GLOBAL_LIST_INIT(plant_traits, init_plant_traits())
only_names = sort_list(only_names)
//build map with sorted keys
for(var/name as anything in only_names)
for(var/name in only_names)
.[name] = name_to_reagent[name]

View File

@@ -183,7 +183,7 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
if(should_sight_scale(new_sight) == should_sight_scale(old_sight))
return
for(var/group_key as anything in master_groups)
for(var/group_key in master_groups)
var/datum/plane_master_group/group = master_groups[group_key]
group.build_planes_offset(src, current_plane_offset)
@@ -207,7 +207,7 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
current_plane_offset = new_offset
SEND_SIGNAL(src, COMSIG_HUD_OFFSET_CHANGED, old_offset, new_offset)
for(var/group_key as anything in master_groups)
for(var/group_key in master_groups)
var/datum/plane_master_group/group = master_groups[group_key]
group.build_planes_offset(src, new_offset)

View File

@@ -346,7 +346,7 @@ ADMIN_VERB(cmd_controller_view_ui, R_SERVER|R_DEBUG, "Controller Overview", "Vie
// Allows subsystems to declare other subsystems that must initialize after them.
for(var/datum/controller/subsystem/subsystem as anything in subsystems)
for(var/dependent_type as anything in subsystem.dependents)
for(var/dependent_type in subsystem.dependents)
if(!ispath(dependent_type, /datum/controller/subsystem))
stack_trace("ERROR: MC: subsystem `[subsystem.type]` has an invalid dependent: `[dependent_type]`. Skipping")
continue
@@ -356,7 +356,7 @@ ADMIN_VERB(cmd_controller_view_ui, R_SERVER|R_DEBUG, "Controller Overview", "Vie
// Constructs a reverse-dependency graph.
for(var/datum/controller/subsystem/subsystem as anything in subsystems)
for(var/dependency_type as anything in subsystem.dependencies)
for(var/dependency_type in subsystem.dependencies)
if(!ispath(dependency_type, /datum/controller/subsystem))
stack_trace("ERROR: MC: subsystem `[subsystem.type]` has an invalid dependency: `[dependency_type]`. Skipping")
continue
@@ -1035,4 +1035,3 @@ ADMIN_VERB(cmd_controller_view_ui, R_SERVER|R_DEBUG, "Controller Overview", "Vie
return FALSE
last_profiled = REALTIMEOFDAY
SSprofiler.DumpFile(allow_yield = FALSE)

View File

@@ -419,7 +419,7 @@ Versioning
/datum/controller/subsystem/blackbox/proc/ReportRoundstartManifest(list/characters)
var/list/query_rows = list()
var/list/special_columns = list("server_ip" = "INET_ATON(?)")
for(var/mob_ckey as anything in characters)
for(var/mob_ckey in characters)
var/mob/living/new_character = characters[mob_ckey]
query_rows += list(list(
"server_ip" = world.internet_address || 0,

View File

@@ -14,6 +14,6 @@ MOVEMENT_SUBSYSTEM_DEF(ai_movement)
/datum/controller/subsystem/movement/ai_movement/proc/SetupAIMovementInstances()
movement_types = list()
for(var/key as anything in subtypesof(/datum/ai_movement))
for(var/key in subtypesof(/datum/ai_movement))
var/datum/ai_movement/ai_movement = new key
movement_types[key] = ai_movement

View File

@@ -117,7 +117,7 @@ PROCESSING_SUBSYSTEM_DEF(fishing)
continue
LAZYOR(fish_safe_turfs_by_type[fish_path], source.associated_safe_turfs)
//If a subtype doesn't have set safe turfs, it'll inherit them from the parent type.
for(var/fish_type as anything in fish_safe_turfs_by_type)
for(var/fish_type in fish_safe_turfs_by_type)
for(var/fish_subtype in subtypesof(fish_type))
if(!length(fish_safe_turfs_by_type[fish_subtype]))
fish_safe_turfs_by_type[fish_subtype] = fish_safe_turfs_by_type[fish_type]

View File

@@ -34,7 +34,7 @@ PROCESSING_SUBSYSTEM_DEF(greyscale)
#endif
// This final verification step is for things that need other greyscale configurations to be finished loading
for(var/greyscale_type as anything in configurations)
for(var/greyscale_type in configurations)
CHECK_TICK
var/datum/greyscale_config/config = configurations[greyscale_type]
config.CrossVerify()

View File

@@ -91,7 +91,7 @@ GLOBAL_LIST_INIT(target_interested_atoms, typecacheof(list(/mob, /obj/machinery/
/datum/ai_behavior/find_potential_targets/proc/new_turf_found(turf/found, datum/ai_controller/controller, datum/targeting_strategy/strategy)
var/valid_found = FALSE
var/mob/pawn = controller.pawn
for(var/maybe_target as anything in found)
for(var/maybe_target in found)
if(maybe_target == pawn)
continue
if(!is_type_in_typecache(maybe_target, GLOB.target_interested_atoms))
@@ -120,7 +120,7 @@ GLOBAL_LIST_INIT(target_interested_atoms, typecacheof(list(/mob, /obj/machinery/
/datum/ai_behavior/find_potential_targets/proc/new_atoms_found(list/atom/movable/found, datum/ai_controller/controller, target_key, datum/targeting_strategy/strategy, hiding_location_key)
var/mob/pawn = controller.pawn
var/list/accepted_targets = list()
for(var/maybe_target as anything in found)
for(var/maybe_target in found)
if(maybe_target == pawn)
continue
// Need to better handle viewers here

View File

@@ -97,7 +97,7 @@
if (!length(required_traits))
return TRUE
for (var/trait as anything in required_traits)
for (var/trait in required_traits)
if (HAS_TRAIT(the_target, trait))
return TRUE
return FALSE

View File

@@ -95,7 +95,7 @@
var/mob/living/living_pawn = controller.pawn
var/list/nearby_items = list()
for (var/obj/new_friend as anything in oview(search_range, controller.pawn))
for (var/obj/new_friend in oview(search_range, controller.pawn))
if (!isitem(new_friend) && !isstructure(new_friend))
continue
if (is_type_in_list(new_friend, GLOB.animatable_blacklist))

View File

@@ -198,7 +198,7 @@
var/list/alarms_cache = alarms //Cache for sonic speec
for(var/alarm_type in alarms_cache)
var/list/alarms_of_type = alarms_cache[alarm_type] //Sonic cache speed forads
for(var/area_name as anything in alarms_of_type)
for(var/area_name in alarms_of_type)
var/list/alarm_packet = alarms_of_type[area_name]
var/list/cameras = alarm_packet[2]
if(cameras)

View File

@@ -183,7 +183,7 @@ GLOBAL_LIST_INIT(armor_by_type, generate_armor_type_cache())
/// Checks if any of the armor values are non-zero, so this technically also counts negative armor!
/datum/armor/proc/has_any_armor()
for(var/rating as anything in ARMOR_LIST_ALL())
for(var/rating in ARMOR_LIST_ALL())
if(vars[rating])
return TRUE
return FALSE

View File

@@ -540,7 +540,7 @@
var/list/highest_val_list = list(tracked_fish_by_type[1]) //In case there's only one type of fish in here...
var/highest_val = -1
for(var/fish_type as anything in can_survive_with)
for(var/fish_type in can_survive_with)
var/list/compatible_types = can_survive_with[fish_type]
var/fish_amount = fish_alive_by_type[fish_type]
for(var/obj/item/fish/fish_instance as anything in tracked_fish_by_type[fish_type])

View File

@@ -58,7 +58,7 @@
ingredient_names = processed_holder.ingredient_names
custom_name = processed_holder.custom_name
atom_parent.name = "[custom_adjective()] [custom_name] [atom_parent.name]"
for(var/fillcol as anything in processed_holder.filling_colors)
for(var/fillcol in processed_holder.filling_colors)
apply_fill(fillcol)
/datum/component/ingredients_holder/Destroy(force)

View File

@@ -460,10 +460,10 @@
//we now summarize the chat msgs collected
if(!(mat_container_flags & MATCONTAINER_SILENT))
for(var/status as anything in chat_msgs)
for(var/status in chat_msgs)
var/list/status_data = chat_msgs[status]
for(var/item_name as anything in status_data)
for(var/item_name in status_data)
//read the params
var/list/chat_data = status_data[item_name]
var/count = chat_data["count"]

View File

@@ -52,7 +52,7 @@
SIGNAL_HANDLER
RegisterSignal(new_friend, COMSIG_KB_LIVING_VIEW_PET_COMMANDS, PROC_REF(on_key_pressed))
RegisterSignal(new_friend, DEACTIVATE_KEYBIND(COMSIG_KB_LIVING_VIEW_PET_COMMANDS), PROC_REF(on_key_unpressed))
for (var/command_name as anything in available_commands)
for (var/command_name in available_commands)
var/datum/pet_command/command = available_commands[command_name]
INVOKE_ASYNC(command, TYPE_PROC_REF(/datum/pet_command, add_new_friend), new_friend)
@@ -71,7 +71,7 @@
COMSIG_KB_LIVING_VIEW_PET_COMMANDS,
DEACTIVATE_KEYBIND(COMSIG_KB_LIVING_VIEW_PET_COMMANDS),
))
for (var/command_name as anything in available_commands)
for (var/command_name in available_commands)
var/datum/pet_command/command = available_commands[command_name]
INVOKE_ASYNC(command, TYPE_PROC_REF(/datum/pet_command, remove_friend), old_friend)
@@ -116,7 +116,7 @@
/// Actually display the radial menu and then do something with the result
/datum/component/obeys_commands/proc/display_radial_menu(mob/living/friend)
var/list/radial_options = list()
for (var/command_name as anything in available_commands)
for (var/command_name in available_commands)
var/datum/pet_command/command = available_commands[command_name]
var/datum/radial_menu_choice/choice = command.provide_radial_data()
if (!choice)

View File

@@ -107,7 +107,7 @@
* if check_verbosity is true, skip the match if there spoken_text is way longer than the match
*/
/datum/pet_command/proc/find_command_in_text(spoken_text, check_verbosity = FALSE)
for (var/command as anything in speech_commands)
for (var/command in speech_commands)
if (!findtext(spoken_text, command))
continue
if(check_verbosity && length(spoken_text) > length(command) + MAX_NAME_LEN)
@@ -220,5 +220,3 @@
return FALSE
parent.visible_message(span_warning("[parent] follows [friend]'s gesture towards [potential_target] [pointed_reaction]!"))
return TRUE

View File

@@ -19,7 +19,7 @@
src.regeneration_time = regeneration_time
var/atom/movable/living_parent = parent
for(var/type_path as anything in shield_overlays)
for(var/type_path in shield_overlays)
if(!ispath(type_path))
continue
var/obj/effect/overlay/new_effect = new type_path()

View File

@@ -210,7 +210,7 @@
))
var/list/remaining_stock = list()
for(var/item as anything in stock_list)
for(var/item in stock_list)
remaining_stock[item] = stock_list[item]
data["extra_purchasable"] = extra_purchasable
data["extra_purchasable_stock"] = extra_purchasable_stock

View File

@@ -70,7 +70,7 @@
/datum/element/art/commoner/apply_moodlet(atom/source, mob/living/user, impress)
var/msg
var/list/haters = list()
for(var/hater_department_type as anything in list(/datum/job_department/security, /datum/job_department/command))
for(var/hater_department_type in list(/datum/job_department/security, /datum/job_department/command))
var/datum/job_department/hater_department = SSjob.get_department_type(hater_department_type)
for(var/datum/job/hater_job as anything in hater_department.department_jobs)
haters += hater_job.title

View File

@@ -45,7 +45,7 @@ GLOBAL_DATUM_INIT(manifest, /datum/manifest, new)
"trim" = trim,
)
continue
for(var/department_type as anything in job.departments_list)
for(var/department_type in job.departments_list)
//Jobs under multiple departments should only be displayed if this is their first department or the command department
if(job.departments_list[1] != department_type && !(job.departments_bitflags & DEPARTMENT_BITFLAG_COMMAND))
continue
@@ -223,4 +223,3 @@ GLOBAL_DATUM_INIT(manifest, /datum/manifest, new)
"manifest" = get_manifest(),
"positions" = positions
)

View File

@@ -158,7 +158,7 @@
if (!length(suggested_wounding_types))
return FALSE
for (var/iter_wounding_type as anything in suggested_wounding_types)
for (var/iter_wounding_type in suggested_wounding_types)
if (!(iter_wounding_type in required_wounding_types))
if (match_all_wounding_types)
return FALSE

View File

@@ -725,7 +725,7 @@
// fleshy burns will look for flesh then bone
// dislocations will look for flesh, then bone, then metal
var/file = default_scar_file
for (var/biotype as anything in pregen_data.scar_priorities)
for (var/biotype in pregen_data.scar_priorities)
if (scarred_limb.biological_state & text2num(biotype))
file = GLOB.biotypes_to_scar_file[biotype]
break

View File

@@ -1056,7 +1056,7 @@
var/list/part_list = replacer_tool.get_sorted_parts(ignore_stacks = TRUE)
if(!part_list.len)
return FALSE
for(var/primary_part_base as anything in component_parts)
for(var/primary_part_base in component_parts)
//we exchanged all we could time to bail
if(!part_list.len)
break
@@ -1156,7 +1156,7 @@
// we infer the required stack stuff inside the machine from the circuitboards requested components
if(istype(component_ref, /obj/item/circuitboard/machine))
var/obj/item/circuitboard/machine/board = component_ref
for(var/component as anything in board.req_components)
for(var/component in board.req_components)
if(!ispath(component, /obj/item/stack))
continue
part_count[component] = board.req_components[component]

View File

@@ -391,7 +391,7 @@
data["enemy_mp"] = enemy_mp
data["equipped_gear"] = list()
for(var/gear_slot as anything in equipped_gear)
for(var/gear_slot in equipped_gear)
var/datum/battle_arcade_gear/user_gear = equipped_gear[gear_slot]
if(!istype(user_gear))
continue

View File

@@ -212,7 +212,7 @@
if(energy_used)
use_energy(energy_used)
for(var/spawnable_item as anything in dispense_type)
for(var/spawnable_item in dispense_type)
var/atom/spawned_atom = new spawnable_item(loc)
spawned_atom.flags_1 |= (flags_1 & ADMIN_SPAWNED_1)
@@ -237,7 +237,7 @@
/obj/machinery/drone_dispenser/proc/count_shells()
. = 0
for(var/actual_shell in loc)
for(var/potential_item as anything in dispense_type)
for(var/potential_item in dispense_type)
if(istype(actual_shell, potential_item))
.++

View File

@@ -69,10 +69,10 @@
dna.copy_dna(subject.dna, COPY_DNA_SE|COPY_DNA_SPECIES)
for (var/quirk_type as anything in quirks)
for (var/quirk_type in quirks)
subject.add_quirk(quirk_type, add_unique = FALSE, announce = FALSE)
for (var/trauma_type as anything in brain_traumas)
for (var/trauma_type in brain_traumas)
subject.gain_trauma(trauma_type)
for (var/obj/item/bodypart/limb as anything in subject.bodyparts)

View File

@@ -235,7 +235,7 @@
inserted_board = attacking_item
//compute the needed mats from its stock parts
for(var/type as anything in inserted_board.req_components)
for(var/type in inserted_board.req_components)
//these don't count to the final cost as they have to inserted manually
if(type in inserted_board.flatpack_components)
continue

View File

@@ -344,7 +344,7 @@
data["selected_root"] = root_category
data["categories"] = list()
for(var/sub_category as anything in GLOB.rcd_designs[root_category])
for(var/sub_category in GLOB.rcd_designs[root_category])
var/list/target_category = GLOB.rcd_designs[root_category][sub_category]
if(!length(target_category))
continue

View File

@@ -160,7 +160,7 @@
data["selected_root"] = root_category
data["categories"] = list()
for(var/sub_category as anything in GLOB.floor_designs[root_category])
for(var/sub_category in GLOB.floor_designs[root_category])
var/list/target_category = GLOB.floor_designs[root_category][sub_category]
var/list/designs = list() //initialize all designs under this category

View File

@@ -128,7 +128,7 @@
/obj/item/borg/projectile_dampen/proc/process_usage(seconds_per_tick)
var/usage = 0
for(var/projectile as anything in tracked_bullet_cost)
for(var/projectile in tracked_bullet_cost)
usage += projectile_tick_speed_ecost * seconds_per_tick
usage += tracked_bullet_cost[projectile] * projectile_damage_tick_ecost_coefficient * seconds_per_tick
energy = clamp(energy - usage, 0, maxenergy)

View File

@@ -47,7 +47,7 @@
if(!istype(item, /obj/item/syndicrate_key) || created_items)
return ..()
created_items = TRUE
for(var/item_path as anything in unlock_contents)
for(var/item_path in unlock_contents)
new item_path(src)
unlock_contents = list()
qdel(item)

View File

@@ -45,8 +45,8 @@
var/turf/turfloc = loc
. = ..()
if(isturf(turfloc))
for(var/thing_that_falls as anything in turfloc) // as anything because turfloc can only contain movables
turfloc.zFall((thing_that_falls))
for(var/thing_that_falls in turfloc)
turfloc.zFall(thing_that_falls)
/obj/structure/lattice/proc/deconstruction_hints(mob/user)
return span_notice("The rods look like they could be <b>cut</b>. There's space for more <i>rods</i> or a <i>tile</i>.")

View File

@@ -115,7 +115,7 @@ GLOBAL_PROTECT(lua_state_stack)
if(timer_enabled)
var/result = call_function("__Timer_timer_process", seconds_per_tick)
log_result(result, verbose = FALSE)
for(var/function as anything in functions_to_execute)
for(var/function in functions_to_execute)
result = call_function(list("__Timer_callbacks", function))
log_result(result, verbose = FALSE)
functions_to_execute.Cut()

View File

@@ -126,7 +126,7 @@
var/list/plane_info = list()
var/list/our_planes = our_hud?.get_planes_from(current_group)
for (var/plane_string as anything in our_planes)
for (var/plane_string in our_planes)
var/list/this_plane = list()
var/atom/movable/screen/plane_master/plane = our_planes[plane_string]
this_plane["name"] = plane.name

View File

@@ -88,7 +88,7 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(select_equipment, R_FUN, "Select Equipment", mob/ta
/datum/select_equipment/proc/make_outfit_entries(category="General", list/outfit_list)
var/list/entries = list()
for(var/path as anything in outfit_list)
for(var/path in outfit_list)
var/datum/outfit/outfit = path
entries += list(outfit_entry(category, path, initial(outfit.name)))
return entries

View File

@@ -38,7 +38,7 @@
/datum/action/cooldown/spell/conjure/cosmic_expansion/proc/get_turfs(turf/target_turf)
var/list/target_turfs = list()
for (var/direction as anything in GLOB.cardinals)
for (var/direction in GLOB.cardinals)
target_turfs += get_ranged_target_turf(target_turf, direction, 2)
target_turfs += get_ranged_target_turf(target_turf, direction, 3)
return target_turfs

View File

@@ -49,7 +49,7 @@
var/list/target_turfs = list(get_turf(owner))
var/range = ascended ? 2 : 1
var/list/directions = list(turn(owner.dir, 90), turn(owner.dir, 270))
for (var/direction as anything in directions)
for (var/direction in directions)
for (var/i in 1 to range)
target_turfs += get_ranged_target_turf(owner, direction, i)
return target_turfs

View File

@@ -49,7 +49,7 @@
/obj/structure/void_conduit/proc/build_view_turfs()
for(var/turf/affected_turf as anything in overlayed_turfs)
affected_turf.cut_overlay(void_overlay)
for(var/turf/affected_turf as anything in view(effect_range, src))
for(var/turf/affected_turf in view(effect_range, src))
if(!isopenturf(affected_turf))
continue
affected_turf.add_overlay(void_overlay)
@@ -72,7 +72,7 @@
///Sends out a pulse
/obj/structure/void_conduit/proc/do_conduit_pulse()
var/list/turfs_to_affect = list()
for(var/turf/affected_turf as anything in view(effect_range, loc))
for(var/turf/affected_turf in view(effect_range, loc))
var/distance = get_dist(loc, affected_turf)
if(!turfs_to_affect["[distance]"])
turfs_to_affect["[distance]"] = list()

View File

@@ -37,7 +37,6 @@
),
)
for(var/icon_file as anything in essentials)
for(var/icon_state as anything in essentials[icon_file])
for(var/icon_file in essentials)
for(var/icon_state in essentials[icon_file])
insert_icon(icon_state, uni_icon(icon_file, icon_state))

View File

@@ -11,7 +11,7 @@
populate_rtd_datums()
var/datum/tile_info/tile_data = design["datum"]
var/list/directions = tile_data.tile_directions_numbers || list(SOUTH)
for(var/direction as anything in directions)
for(var/direction in directions)
var/sprite_name = sanitize_css_class_name("[tile_data.icon_file]-[tile_data.icon_state]-[dir2text(direction)]")
if(registered[sprite_name])
continue

View File

@@ -351,7 +351,7 @@
. = ..()
var/static/list/meta_data = list()
if(length(meta_data) == 0)
for(var/typepath as anything in GLOB.meta_gas_info)
for(var/typepath in GLOB.meta_gas_info)
meta_data += GLOB.meta_gas_info[typepath][META_GAS_ID]
. += create_table_notices(meta_data, column_name = "Gas", column_name_plural = "Gases")

View File

@@ -94,6 +94,6 @@
/obj/item/modular_computer/laptop/gamer/install_default_programs()
// Only install starting programs, we don't want the software downloading program from default programs
for(var/programs as anything in starting_programs)
for(var/programs in starting_programs)
var/datum/computer_file/program/program_type = new programs
store_file(program_type)

View File

@@ -27,7 +27,7 @@
var/static/list/choices
if(isnull(choices))
choices = list()
for(var/boxtype as anything in typesof(/obj/item/storage/box/donkpockets))
for(var/boxtype in typesof(/obj/item/storage/box/donkpockets))
choices[boxtype] = 3
choices[/obj/item/storage/box/donkpockets/donkpocketgondola] = 1
item = pick_weight(choices)

View File

@@ -204,7 +204,7 @@
return
/datum/supply_order/proc/append_order(list/new_contents, cost_increase)
for(var/i as anything in new_contents)
for(var/i in new_contents)
if(pack.contains[i])
pack.contains[i] += new_contents[i]
else

View File

@@ -31,7 +31,7 @@
/datum/preference/numeric/volume/sound_radio_noise = savefile.get_entry("sound_radio_noise"),
)
for(var/entry as anything in entries)
for(var/entry in entries)
var/pref_data = entries[entry]
if(pref_data <= 1)
pref_data *= 100

View File

@@ -11,6 +11,6 @@
if(!my_hud)
return
for(var/group_key as anything in my_hud.master_groups)
for(var/group_key in my_hud.master_groups)
var/datum/plane_master_group/group = my_hud.master_groups[group_key]
group.build_planes_offset(my_hud, my_hud.current_plane_offset)

View File

@@ -16,6 +16,6 @@
if(!my_hud)
return
for(var/group_key as anything in my_hud.master_groups)
for(var/group_key in my_hud.master_groups)
var/datum/plane_master_group/group = my_hud.master_groups[group_key]
group.build_planes_offset(my_hud, my_hud.current_plane_offset)

View File

@@ -42,13 +42,13 @@
/obj/item/clothing/glasses/hud/proc/toggle_hud_display(mob/living/carbon/eye_owner)
if(display_active)
display_active = FALSE
for(var/hud_trait as anything in clothing_traits)
for(var/hud_trait in clothing_traits)
REMOVE_CLOTHING_TRAIT(eye_owner, hud_trait)
balloon_alert(eye_owner, "hud disabled")
return
display_active = TRUE
for(var/hud_trait as anything in clothing_traits)
for(var/hud_trait in clothing_traits)
ADD_CLOTHING_TRAIT(eye_owner, hud_trait)
balloon_alert(eye_owner, "hud enabled")

View File

@@ -70,7 +70,7 @@
)
if(fields)
data_to_list["fields"] = list()
for(var/data as anything in fields)
for(var/data in fields)
if(!fields[data])
continue
data_to_list["fields"] += list(list(

View File

@@ -68,7 +68,7 @@ GLOBAL_LIST_INIT_TYPED(chasm_detritus_types, /datum/chasm_detritus, init_chasm_d
/datum/chasm_detritus/proc/get_chasm_contents(turf/fishing_spot)
. = list()
for(var/obj/effect/abstract/chasm_storage/storage in range(5, fishing_spot))
for (var/thing as anything in storage.contents)
for (var/thing in storage.contents)
. += thing
/// Variant of the chasm detritus that allows for an easier time at fishing out
@@ -81,7 +81,7 @@ GLOBAL_LIST_INIT_TYPED(chasm_detritus_types, /datum/chasm_detritus, init_chasm_d
/datum/chasm_detritus/restricted/get_chasm_contents(turf/fishing_spot)
. = list()
for(var/obj/effect/abstract/chasm_storage/storage in range(5, fishing_spot))
for (var/thing as anything in storage.contents)
for (var/thing in storage.contents)
if(!istype(thing, chasm_storage_restricted_type))
continue
. += thing

View File

@@ -9,7 +9,7 @@ GLOBAL_LIST_INIT(spontaneous_fish_traits, populate_spontaneous_fish_traits())
/proc/populate_spontaneous_fish_traits()
var/list/list = list()
for(var/trait_path as anything in GLOB.fish_traits)
for(var/trait_path in GLOB.fish_traits)
var/datum/fish_trait/trait = GLOB.fish_traits[trait_path]
if(isnull(trait.spontaneous_manifest_types))
continue

View File

@@ -615,7 +615,7 @@ GLOBAL_LIST_INIT(specific_fish_icons, generate_specific_fish_icons())
table_copy -= FISHING_DUD
var/exponent = weight_leveling_exponents[trait]
var/multiplier = weight_result_multiplier[trait]
for(var/fish as anything in table_copy)
for(var/fish in table_copy)
if(!ispath(fish, /obj/item/fish))
continue
table_copy[fish] = round(table_copy[fish] * multiplier, 1)

View File

@@ -205,7 +205,7 @@
var/static/list/weighted_traits
if(!weighted_traits)
weighted_traits = list()
for(var/trait_type as anything in GLOB.fish_traits)
for(var/trait_type in GLOB.fish_traits)
var/datum/fish_trait/trait = GLOB.fish_traits[trait_type]
weighted_traits[trait.type] = round(trait.inheritability**2/100)

View File

@@ -130,7 +130,7 @@
created.pixel_y += 8
// Re-add required reagents that were not used in this step
if(created_volume > ingredient_max_multiplier)
for(var/reagent_path as anything in required_reagents)
for(var/reagent_path in required_reagents)
holder.add_reagent(reagent_path,(required_reagents[reagent_path])*(created_volume-ingredient_max_multiplier))

View File

@@ -96,7 +96,7 @@
if(prob(33))
cone_type = /obj/item/food/icecream/chocolate
var/static/list/possible_flavors = list()
for(var/flavour as anything in GLOB.ice_cream_flavours)
for(var/flavour in GLOB.ice_cream_flavours)
//only request standard flavors that are available from the ice cream vat
if(!GLOB.ice_cream_flavours[flavour].hidden && flavour != ICE_CREAM_CUSTOM)
possible_flavors += flavour

View File

@@ -140,7 +140,7 @@
.["view_raw"] = view_raw
.["show_deleted"] = show_deleted
var/list/histories = list()
for(var/id as anything in book_history)
for(var/id in book_history)
var/list/insert = list()
for(var/datum/book_history_entry/entry in book_history[id])
insert += list(entry.serialize())

View File

@@ -120,7 +120,7 @@
if(SSquirks?.initialized)
// And yes we need to clean all the quirk datums every time
mannequin.cleanse_quirk_datums()
for(var/quirk_name as anything in all_quirks)
for(var/quirk_name in all_quirks)
var/datum/quirk/quirk_type = SSquirks.quirks[quirk_name]
if(!(initial(quirk_type.quirk_flags) & QUIRK_CHANGES_APPEARANCE))
continue

View File

@@ -543,7 +543,7 @@
recent_speech[spoken_memory] = splittext(say_log[spoken_memory], "\"", 1, 0, TRUE)[3]
var/list/raw_lines = list()
for (var/key as anything in recent_speech)
for (var/key in recent_speech)
raw_lines += recent_speech[key]
return raw_lines

View File

@@ -70,7 +70,7 @@
apps_to_download += default_programs + pda_programs
apps_to_download += starting_programs
for(var/programs as anything in apps_to_download)
for(var/programs in apps_to_download)
var/datum/computer_file/program/program_type = new programs
store_file(program_type)

View File

@@ -81,7 +81,7 @@
to_chat(user, span_notice("You can't send credits to yourself."))
return NT_PAY_SATUS_SENDER_IS_RECEIVER
for(var/account as anything in SSeconomy.bank_accounts_by_id)
for(var/account in SSeconomy.bank_accounts_by_id)
var/datum/bank_account/acc = SSeconomy.bank_accounts_by_id[account]
if(acc.pay_token == token)
recipient = acc

View File

@@ -434,7 +434,7 @@ GLOBAL_LIST_EMPTY(virtual_pets_list)
/datum/computer_file/program/virtual_pet/ui_static_data(mob/user)
var/list/data = list()
data["pet_state_icons"] = list()
for(var/list_index as anything in pet_state_icons)
for(var/list_index in pet_state_icons)
var/list/sprite_location = pet_state_icons[list_index]
data["pet_state_icons"] += list(list(
"name" = list_index,
@@ -446,7 +446,7 @@ GLOBAL_LIST_EMPTY(virtual_pets_list)
"hat_name" = "none",
))
for(var/type_index as anything in hat_selections)
for(var/type_index in hat_selections)
if(level >= hat_selections[type_index])
var/obj/item/hat = type_index
var/hat_name = initial(hat.name)

View File

@@ -101,7 +101,7 @@
/obj/item/circuit_component/mod_program/ntnetmonitor/proc/get_pdas(datum/port/port)
var/list/computers_with_messenger = list()
for(var/messenger_ref as anything in GLOB.pda_messengers)
for(var/messenger_ref in GLOB.pda_messengers)
var/datum/computer_file/program/messenger/messenger = GLOB.pda_messengers[messenger_ref]
computers_with_messenger |= WEAKREF(messenger.computer)
all_messengers.set_output(computers_with_messenger)

View File

@@ -452,7 +452,7 @@
var/mode = tgui_alert(usr, "Play all or a specific reaction?","Select Reaction", list("All", "Specific"))
if(mode == "All")
reactions_to_test.Cut()
for(var/reaction as anything in all_reaction_list)
for(var/reaction in all_reaction_list)
reactions_to_test += all_reaction_list[reaction]
current_reaction_index = 0
return TRUE

View File

@@ -97,7 +97,7 @@
total_weight += target.w_class
if(to_process.len)
. += span_notice("Currently holding:")
for(var/target_name as anything in to_process)
for(var/target_name in to_process)
. += span_notice("[to_process[target_name]] [target_name]")
. += span_notice("Filled to <b>[round((total_weight / maximum_weight) * 100)]%</b> capacity.")

View File

@@ -661,9 +661,9 @@ Basically, we fill the time between now and 2s from now with hands based off the
)
traumalist -= abstracttraumas
for (var/type as anything in forbiddentraumas)
for (var/type in forbiddentraumas)
traumalist -= typesof(type)
for (var/type as anything in forbiddensubtypes)
for (var/type in forbiddensubtypes)
traumalist -= subtypesof(type)
traumalist = shuffle(traumalist)

View File

@@ -405,9 +405,7 @@
holder.my_atom.audible_message("The [holder.my_atom] suddenly explodes, sending a shockwave rippling through the air!")
playsound(this_turf, 'sound/effects/chemistry/shockwave_explosion.ogg', 80, TRUE)
//Modified goonvortex
for(var/atom/movable/movey as anything in orange(range, this_turf))
if(!istype(movey, /atom/movable))
continue
for(var/atom/movable/movey in orange(range, this_turf))
if(isliving(movey) && damage)
var/mob/living/live = movey
live.apply_damage(damage)//Since this can be called multiple times

View File

@@ -30,7 +30,7 @@
if(purge_power >= 1)
var/has_purging_chemical = FALSE
// They need one of the purge reagents in them
for(var/purging_chem as anything in PURGING_REAGENTS)
for(var/purging_chem in PURGING_REAGENTS)
if(holder.has_reagent(purging_chem))
// We have a purging chemical
has_purging_chemical = TRUE

View File

@@ -610,7 +610,7 @@
var/bio_status = NONE
for (var/state as anything in GLOB.bio_state_anatomy)
for (var/state in GLOB.bio_state_anatomy)
var/flag = text2num(state)
if (!(biological_state & flag))
continue

View File

@@ -90,7 +90,7 @@
var/obj/item/offhand = user.get_inactive_held_item()
if(istype(offhand, /obj/item/photo) && istype(surgery, /datum/surgery/plastic_surgery/advanced))
var/obj/item/photo/disguises = offhand
for(var/namelist as anything in disguises.picture?.names_seen)
for(var/namelist in disguises.picture?.names_seen)
names += namelist
else
to_chat(user, span_warning("You have no picture to base the appearance on, reverting to random appearances."))

View File

@@ -86,7 +86,7 @@
// Construct the signals
LAZYINITLIST(repair_signals)
for(var/tool_method as anything in methods_to_fix)
for(var/tool_method in methods_to_fix)
repair_signals += COMSIG_ATOM_TOOL_ACT(how_do_we_fix_it[tool_method])
// Register signals to make it fixable
@@ -100,7 +100,7 @@
/obj/machinery/transport/examine(mob/user)
. = ..()
if(methods_to_fix)
for(var/tool_method as anything in methods_to_fix)
for(var/tool_method in methods_to_fix)
. += span_warning("It needs someone to [EXAMINE_HINT(tool_method)].")
if(panel_open)
. += span_notice("It can be deconstructed with a [EXAMINE_HINT("crowbar.")]")

View File

@@ -101,13 +101,13 @@ GLOBAL_LIST_EMPTY(elevator_music)
/// Start sound loops playing
/datum/proximity_monitor/advanced/elevator_music_area/proc/turn_on()
enabled = TRUE
for (var/mob as anything in tracked_mobs)
for (var/mob in tracked_mobs)
var/datum/looping_sound/loop = tracked_mobs[mob]
loop.start()
/// Stop active sound loops
/datum/proximity_monitor/advanced/elevator_music_area/proc/turn_off()
enabled = FALSE
for (var/mob as anything in tracked_mobs)
for (var/mob in tracked_mobs)
var/datum/looping_sound/loop = tracked_mobs[mob]
loop.stop()

View File

@@ -67,7 +67,7 @@
for (var/obj/item/disk/surgery/design_disk as anything in subtypesof(/obj/item/disk/surgery))
design_disk = new design_disk()
for (var/surgery_type as anything in design_disk.surgeries)
for (var/surgery_type in design_disk.surgeries)
for (var/design_id in all_designs)
var/datum/design/surgery/design = all_designs[design_id]
if (ispath(design, /datum/design/surgery) && design::surgery == surgery_type)

View File

@@ -3,7 +3,7 @@
/datum/unit_test/valid_dna_infusion/Run()
for(var/datum/infuser_entry/infuser_entry as anything in flatten_list(GLOB.infuser_entries))
for(var/input_type as anything in infuser_entry.input_obj_or_mob)
for(var/input_type in infuser_entry.input_obj_or_mob)
if(ispath(input_type, /mob/living))
continue
var/atom/movable/movable = allocate(input_type)

View File

@@ -449,7 +449,7 @@
/datum/fish_source/unit_test_all_fish
/datum/fish_source/unit_test_all_fish/New()
for(var/fish_type as anything in subtypesof(/obj/item/fish))
for(var/fish_type in subtypesof(/obj/item/fish))
fish_table[fish_type] = 10
return ..()

View File

@@ -9,7 +9,7 @@
/datum/unit_test/geyser/Run()
//While we're at it just check em all
var/list/geysers = subtypesof(/obj/structure/geyser)
for(var/geyser_type as anything in geysers)
for(var/geyser_type in geysers)
var/obj/structure/geyser/wittel/geyser = allocate(geyser_type)
geyser.potency = geyser.max_volume //make it recharge in 1 tick

View File

@@ -13,13 +13,13 @@
// Generates a list of render target -> PM for future use
var/list/render_target_to_plane = list()
for(var/plane_key as anything in our_group.plane_masters)
for(var/plane_key in our_group.plane_masters)
var/atom/movable/screen/plane_master/plane = our_group.plane_masters[plane_key]
if(plane.render_target)
render_target_to_plane[plane.render_target] = plane
for(var/plane_key as anything in our_group.plane_masters)
for(var/plane_key in our_group.plane_masters)
var/atom/movable/screen/plane_master/plane = our_group.plane_masters[plane_key]
if(!plane.multiz_scaled)
@@ -41,4 +41,3 @@
if(target.multiz_scaled)
TEST_FAIL("[plane.type] draws a render relay into [target.type]. Both are scaled by multiz, so this will cause strange transforms.\n\
consider making a new render plate that they can both draw to instead, or something of that nature.")

View File

@@ -6,8 +6,8 @@
// Exclude soup from this test, they all have the same "reagents" just about
var/list/reactions_sans_soup = GLOB.chemical_reactions_list - subtypesof(/datum/chemical_reaction/food/soup)
for(var/reaction_type_a as anything in reactions_sans_soup)
for(var/reaction_type_b as anything in reactions_sans_soup)
for(var/reaction_type_a in reactions_sans_soup)
for(var/reaction_type_b in reactions_sans_soup)
if(reaction_type_a == reaction_type_b)
continue
var/datum/chemical_reaction/reaction_a = reactions_sans_soup[reaction_type_a]

View File

@@ -262,9 +262,8 @@
return FALSE
COOLDOWN_START(src, area_scan_cooldown, 15 SECONDS)
for(var/mob/living/driver in chassis.return_drivers())
for(var/obj/structure/ore_vent/vent as anything in range(5, chassis))
if(istype(vent, /obj/structure/ore_vent))
vent.scan_and_confirm(driver, TRUE)
for(var/obj/structure/ore_vent/vent in range(5, chassis))
vent.scan_and_confirm(driver, TRUE)
return TRUE
#undef DRILL_BASIC

View File

@@ -231,14 +231,14 @@ GLOBAL_LIST_EMPTY_TYPED(integrated_circuits, /obj/item/integrated_circuit)
* * to_check - The component to check.
**/
/obj/item/integrated_circuit/proc/is_duplicate(obj/item/circuit_component/to_check)
for(var/component as anything in attached_components)
for(var/component in attached_components)
if(component == to_check)
continue
if(istype(component, to_check.type))
return TRUE
if(istype(component, /obj/item/circuit_component/module))
var/obj/item/circuit_component/module/module = component
for(var/module_component as anything in module.internal_circuit.attached_components)
for(var/module_component in module.internal_circuit.attached_components)
if(module_component == to_check)
continue
if(istype(module_component, to_check.type))

View File

@@ -218,6 +218,20 @@ if $grep 'forceMove\(\s*(\w+\(\)|\w+)\s*,\s*(\w+\(\)|\w+)\s*\)' $code_files; the
st=1
fi;
part "as anything on typeless loops"
if $grep 'var/[^/]+ as anything' $code_files; then
echo
echo -e "${RED}ERROR: 'as anything' used in a typeless for loop. This doesn't do anything and should be removed.${NC}"
st=1
fi;
part "as anything on internal functions"
if $grep 'var\/(turf|mob|obj|atom\/movable).+ as anything in o?(view|range|hearers)\(' $code_files; then
echo
echo -e "${RED}ERROR: 'as anything' typed for loop over an internal function. These functions have some internal optimization that relies on the loop not having 'as anything' in it.${NC}"
st=1
fi;
part "common spelling mistakes"
if $grep -i 'centcomm' $code_files; then
echo