diff --git a/code/game/objects/items/storage/secure.dm b/code/game/objects/items/storage/secure.dm index fdab4426a5c..340a2942f79 100644 --- a/code/game/objects/items/storage/secure.dm +++ b/code/game/objects/items/storage/secure.dm @@ -151,7 +151,7 @@ /obj/item/storage/secure/briefcase/syndie/PopulateContents() ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) - for(var/i = 0, i < STR.max_items - 2, i++) + for(var/i in 1 to STR.max_items - 2) new /obj/item/stack/spacecash/c1000(src) diff --git a/code/game/objects/items/tanks/watertank.dm b/code/game/objects/items/tanks/watertank.dm index e6c7f2a4791..0b3c5376586 100644 --- a/code/game/objects/items/tanks/watertank.dm +++ b/code/game/objects/items/tanks/watertank.dm @@ -316,7 +316,7 @@ var/obj/effect/resin_container/A = new (get_turf(src)) log_game("[key_name(user)] used Resin Launcher at [AREACOORD(user)].") playsound(src,'sound/items/syringeproj.ogg',40,TRUE) - for(var/a=0, a<5, a++) + for(var/i in 1 to 5) step_towards(A, target) sleep(2) A.Smoke() diff --git a/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm b/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm index 11255b24bd5..e2cebad7f79 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm @@ -36,7 +36,7 @@ /obj/structure/closet/secure_closet/freezer/kitchen/PopulateContents() ..() - for(var/i = 0, i < 3, i++) + for(var/i in 1 to 3) new /obj/item/reagent_containers/food/condiment/flour(src) new /obj/item/reagent_containers/food/condiment/rice(src) new /obj/item/reagent_containers/food/condiment/sugar(src) @@ -48,11 +48,10 @@ /obj/structure/closet/secure_closet/freezer/kitchen/maintenance/PopulateContents() ..() - for(var/i = 0, i < 5, i++) + for(var/i in 1 to 5) new /obj/item/reagent_containers/food/condiment/milk(src) - for(var/i = 0, i < 5, i++) new /obj/item/reagent_containers/food/condiment/soymilk(src) - for(var/i = 0, i < 2, i++) + for(var/i in 1 to 2) new /obj/item/storage/fancy/egg_box(src) /obj/structure/closet/secure_closet/freezer/kitchen/mining @@ -64,7 +63,7 @@ /obj/structure/closet/secure_closet/freezer/meat/PopulateContents() ..() - for(var/i = 0, i < 4, i++) + for(var/i in 1 to 4) new /obj/item/food/meat/slab/monkey(src) /obj/structure/closet/secure_closet/freezer/meat/open @@ -85,11 +84,10 @@ /obj/structure/closet/secure_closet/freezer/fridge/PopulateContents() ..() - for(var/i = 0, i < 5, i++) + for(var/i in 1 to 5) new /obj/item/reagent_containers/food/condiment/milk(src) - for(var/i = 0, i < 5, i++) new /obj/item/reagent_containers/food/condiment/soymilk(src) - for(var/i = 0, i < 2, i++) + for(var/i in 1 to 2) new /obj/item/storage/fancy/egg_box(src) /obj/structure/closet/secure_closet/freezer/fridge/open @@ -103,11 +101,11 @@ /obj/structure/closet/secure_closet/freezer/money/PopulateContents() ..() - for(var/i = 0, i < 3, i++) + for(var/i in 1 to 3) new /obj/item/stack/spacecash/c1000(src) - for(var/i = 0, i < 5, i++) + for(var/i in 1 to 5) new /obj/item/stack/spacecash/c500(src) - for(var/i = 0, i < 6, i++) + for(var/i in 1 to 6) new /obj/item/stack/spacecash/c200(src) /obj/structure/closet/secure_closet/freezer/cream_pie diff --git a/code/game/objects/structures/crates_lockers/closets/syndicate.dm b/code/game/objects/structures/crates_lockers/closets/syndicate.dm index 73533963b6b..5d5d7da9027 100644 --- a/code/game/objects/structures/crates_lockers/closets/syndicate.dm +++ b/code/game/objects/structures/crates_lockers/closets/syndicate.dm @@ -117,7 +117,7 @@ /obj/item/stack/sheet/mineral/wood ) - for(var/i = 0, i<2, i++) + for(var/i in 1 to 2) for(var/res in resources) var/obj/item/stack/R = res new res(src, initial(R.max_amount)) diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm index a31aedcaf5a..cd631b688f5 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm @@ -983,8 +983,9 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/sdql2_vv_all, new(null /proc/SDQL_testout(list/query_tree, indent = 0) var/static/whitespace = "    " var/spaces = "" - for(var/s = 0, s < indent, s++) - spaces += whitespace + if(indent > 0) + for(var/i in 1 to indent) + spaces += whitespace for(var/item in query_tree) if(istype(item, /list)) diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index d6584a37666..9f54602a142 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -714,7 +714,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) surname_found = i break //forenames - for(var/i=1, i 0) laws.ion[index] = temp laws.hacked.len = master.hacked.len - for (var/index = 1, index <= master.hacked.len, index++) + for (var/index in 1 to master.hacked.len) temp = master.hacked[index] if (length(temp) > 0) laws.hacked[index] = temp @@ -59,13 +59,13 @@ laws.zeroth = temp laws.inherent.len = master.inherent.len - for (var/index = 1, index <= master.inherent.len, index++) + for (var/index in 1 to master.inherent.len) temp = master.inherent[index] if (length(temp) > 0) laws.inherent[index] = temp laws.supplied.len = master.supplied.len - for (var/index = 1, index <= master.supplied.len, index++) + for (var/index in 1 to master.supplied.len) temp = master.supplied[index] if (length(temp) > 0) laws.supplied[index] = temp diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 7bd0e3f35e6..40fa42c7457 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -253,7 +253,7 @@ lawcheck[1] = "No" //Given Law 0's usual nature, it defaults to NOT getting reported. --NeoFite list += {"[lawcheck[1]] 0: [laws.zeroth]
"} - for (var/index = 1, index <= laws.hacked.len, index++) + for (var/index in 1 to laws.hacked.len) var/law = laws.hacked[index] if (length(law) > 0) if (!hackedcheck[index]) @@ -261,7 +261,7 @@ list += {"[hackedcheck[index]] [ion_num()]: [law]
"} hackedcheck.len += 1 - for (var/index = 1, index <= laws.ion.len, index++) + for (var/index in 1 to laws.ion.len) var/law = laws.ion[index] if (length(law) > 0) @@ -271,7 +271,7 @@ ioncheck.len += 1 var/number = 1 - for (var/index = 1, index <= laws.inherent.len, index++) + for (var/index in 1 to laws.inherent.len) var/law = laws.inherent[index] if (length(law) > 0) @@ -282,7 +282,7 @@ list += {"[lawcheck[number+1]] [number]: [law]
"} number++ - for (var/index = 1, index <= laws.supplied.len, index++) + for (var/index in 1 to laws.supplied.len) var/law = laws.supplied[index] if (length(law) > 0) lawcheck.len += 1 diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index 7703eb35aa5..a4a7e03eb66 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -531,8 +531,8 @@ Pass a positive integer as an argument to override a bot's default speed. var/step_count = move_speed ? move_speed : base_speed //If a value is passed into move_speed, use that instead of the default speed var. if(step_count >= 1 && tries < BOT_STEP_MAX_RETRIES) - for(var/step_number = 0, step_number < step_count,step_number++) - addtimer(CALLBACK(src, .proc/bot_step), BOT_STEP_DELAY*step_number) + for(var/step_number in 1 to step_count) + addtimer(CALLBACK(src, .proc/bot_step), BOT_STEP_DELAY*(step_number-1)) else return FALSE return TRUE diff --git a/code/modules/mob/living/simple_animal/slime/powers.dm b/code/modules/mob/living/simple_animal/slime/powers.dm index 82cbbe1849f..737da2ba7ba 100644 --- a/code/modules/mob/living/simple_animal/slime/powers.dm +++ b/code/modules/mob/living/simple_animal/slime/powers.dm @@ -177,7 +177,7 @@ var/new_powerlevel = round(powerlevel / 4) var/turf/drop_loc = drop_location() - for(var/i=1,i<=4,i++) + for(var/i in 1 to 4) var/child_colour if(mutation_chance >= 100) child_colour = "rainbow" diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index b88a46d3171..72eacc0788e 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -222,7 +222,7 @@ if(reproduce) var/number = pick(14;2,3,4) //reproduce (has a small chance of producing 3 or 4 offspring) var/list/babies = list() - for(var/i=1,i<=number,i++) + for(var/i in 1 to number) var/mob/living/simple_animal/slime/M = new/mob/living/simple_animal/slime(loc) M.set_nutrition(round(nutrition/number)) step_away(M,src) diff --git a/code/modules/power/lighting/light.dm b/code/modules/power/lighting/light.dm index 455b39f2162..b1e43142e24 100644 --- a/code/modules/power/lighting/light.dm +++ b/code/modules/power/lighting/light.dm @@ -406,7 +406,7 @@ return flickering = TRUE if(on && status == LIGHT_OK) - for(var/i = 0; i < amount; i++) + for(var/i in 1 to amount) if(status != LIGHT_OK) break on = !on diff --git a/code/modules/procedural_mapping/mapGenerator.dm b/code/modules/procedural_mapping/mapGenerator.dm index 355a5eb23ac..546a5bfdbc8 100644 --- a/code/modules/procedural_mapping/mapGenerator.dm +++ b/code/modules/procedural_mapping/mapGenerator.dm @@ -69,7 +69,7 @@ if(bigZ % 2 == 0) offByOneOffset = 0 - for(var/i = lilZ, i <= bigZ+offByOneOffset, i++) + for(var/i in lilZ to bigZ+offByOneOffset) var/theRadius = radius if(i != sphereMagic) theRadius = max(radius/max((2*abs(sphereMagic-i)),1),1) diff --git a/code/modules/procedural_mapping/mapGenerators/cellular.dm b/code/modules/procedural_mapping/mapGenerators/cellular.dm index 6c5be6fd426..c5a14ce960d 100644 --- a/code/modules/procedural_mapping/mapGenerators/cellular.dm +++ b/code/modules/procedural_mapping/mapGenerators/cellular.dm @@ -30,10 +30,10 @@ /datum/map_generator/ca/proc/initialize() old_state = new/list(width) - for(var/i = 1,i<=width,i++) - old_state[i] = new/list(height) - for(var/j = 1,j<=height,j++) - old_state[i][j] = rand(0,1) + for(var/x in 1 to width) + old_state[x] = new/list(height) + for(var/y in 1 to height) + old_state[x][y] = rand(0,1) current_state = old_state.Copy() @@ -42,25 +42,25 @@ //Maybe some less basic implemetation later, but this is just simple admin tool initialize() - for(var/generation = 0,generation width || n_y <1 || n_y > height) if(loop_edges) if(n_x < 1) @@ -75,12 +75,12 @@ value += edge_value continue value += old_state[n_x][n_y] - value -= old_state[i][j] + value -= old_state[x][y] if(value in b_rule) return 1 if(value in s_rule) - return old_state[i][j] + return old_state[x][y] return 0 /datum/map_generator/ca/caves diff --git a/code/modules/projectiles/boxes_magazines/_box_magazine.dm b/code/modules/projectiles/boxes_magazines/_box_magazine.dm index 7dce9b47d70..a193d80d7f6 100644 --- a/code/modules/projectiles/boxes_magazines/_box_magazine.dm +++ b/code/modules/projectiles/boxes_magazines/_box_magazine.dm @@ -75,7 +75,7 @@ stack_trace("Tried loading unsupported ammocasing type [load_type] into ammo box [type].") return - for(var/i = max(1, stored_ammo.len), i <= max_ammo, i++) + for(var/i in max(1, stored_ammo.len) to max_ammo) stored_ammo += new round_check(src) update_ammo_count() diff --git a/code/modules/projectiles/boxes_magazines/internal/_cylinder.dm b/code/modules/projectiles/boxes_magazines/internal/_cylinder.dm index c84ae96b9d8..c4509b917c7 100644 --- a/code/modules/projectiles/boxes_magazines/internal/_cylinder.dm +++ b/code/modules/projectiles/boxes_magazines/internal/_cylinder.dm @@ -55,7 +55,7 @@ if(!load_type) load_type = ammo_type - for(var/i = 1, i <= max_ammo, i++) + for(var/i in 1 to max_ammo) if(!give_round(new load_type(src))) break update_appearance() diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index 5e0f7379cfb..a870cb51535 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -98,7 +98,7 @@ /obj/item/gun/energy/proc/update_ammo_types() var/obj/item/ammo_casing/energy/shot - for (var/i = 1, i <= ammo_type.len, i++) + for (var/i in 1 to ammo_type.len) var/shottype = ammo_type[i] shot = new shottype(src) ammo_type[i] = shot diff --git a/code/modules/reagents/chem_splash.dm b/code/modules/reagents/chem_splash.dm index 1375e937f95..36231075d58 100644 --- a/code/modules/reagents/chem_splash.dm +++ b/code/modules/reagents/chem_splash.dm @@ -37,7 +37,7 @@ var/list/viewable = view(affected_range, epicenter) var/list/accessible = list(epicenter) - for(var/i=1; i<=affected_range; i++) + for(var/i in 1 to affected_range) var/list/turflist = list() for(var/turf/T in (orange(i, epicenter) - orange(i-1, epicenter))) turflist |= T diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index b4785614cd3..de25ebdbeab 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -362,8 +362,8 @@ if(STRB) drop_threshold = STRB.max_items - bottle.contents.len target_loc = bottle - for(var/i = 0; i < amount; i++) - if(i < drop_threshold) + for(var/i in 1 to amount) + if(i-1 < drop_threshold) P = new/obj/item/reagent_containers/pill(target_loc) else P = new/obj/item/reagent_containers/pill(drop_location()) @@ -379,7 +379,7 @@ return TRUE if(item_type == "patch") var/obj/item/reagent_containers/pill/patch/P - for(var/i = 0; i < amount; i++) + for(var/i in 1 to amount) P = new/obj/item/reagent_containers/pill/patch(drop_location()) P.name = trim("[name] patch") adjust_item_drop_location(P) @@ -387,7 +387,7 @@ return TRUE if(item_type == "bottle") var/obj/item/reagent_containers/glass/bottle/P - for(var/i = 0; i < amount; i++) + for(var/i in 1 to amount) P = new/obj/item/reagent_containers/glass/bottle(drop_location()) P.name = trim("[name] bottle") adjust_item_drop_location(P) @@ -395,7 +395,7 @@ return TRUE if(item_type == "condimentPack") var/obj/item/reagent_containers/food/condiment/pack/P - for(var/i = 0; i < amount; i++) + for(var/i in 1 to amount) P = new/obj/item/reagent_containers/food/condiment/pack(drop_location()) P.originalname = name P.name = trim("[name] pack") @@ -404,7 +404,7 @@ return TRUE if(item_type == "condimentBottle") var/obj/item/reagent_containers/food/condiment/P - for(var/i = 0; i < amount; i++) + for(var/i in 1 to amount) P = new/obj/item/reagent_containers/food/condiment(drop_location()) if (style) apply_condi_style(P, style) diff --git a/code/modules/reagents/chemistry/recipes.dm b/code/modules/reagents/chemistry/recipes.dm index 7447f37c625..bc133b55a48 100644 --- a/code/modules/reagents/chemistry/recipes.dm +++ b/code/modules/reagents/chemistry/recipes.dm @@ -258,7 +258,7 @@ spawned_mob = new mob_class(get_turf(holder.my_atom))//Spawn our specific mob_class spawned_mob.faction |= mob_faction if(prob(50)) - for(var/j = 1, j <= rand(1, 3), j++) + for(var/j in 1 to rand(1, 3)) step(spawned_mob, pick(NORTH,SOUTH,EAST,WEST)) /** diff --git a/code/modules/reagents/chemistry/recipes/drugs.dm b/code/modules/reagents/chemistry/recipes/drugs.dm index f5bafbd5560..0a820469dd1 100644 --- a/code/modules/reagents/chemistry/recipes/drugs.dm +++ b/code/modules/reagents/chemistry/recipes/drugs.dm @@ -128,7 +128,7 @@ /datum/chemical_reaction/moon_rock/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume) var/location = get_turf(holder.my_atom) - for(var/i = 1, i <= created_volume, i++) + for(var/i in 1 to created_volume) var/obj/item/food/drug/moon_rock/new_rock = new(location) new_rock.pixel_x = rand(-6, 6) new_rock.pixel_y = rand(-6, 6) @@ -140,7 +140,7 @@ /datum/chemical_reaction/blastoff_ampoule/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume) var/location = get_turf(holder.my_atom) - for(var/iteration = 1, iteration <= created_volume, iteration++) + for(var/iteration in 1 to created_volume) var/obj/item/reagent_containers/glass/blastoff_ampoule/new_ampoule = new(location) new_ampoule.pixel_x = rand(-6, 6) new_ampoule.pixel_y = rand(-6, 6) @@ -152,7 +152,7 @@ /datum/chemical_reaction/saturnx_glob/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume) var/location = get_turf(holder.my_atom) - for(var/iteration = 1, iteration <= created_volume, iteration++) + for(var/iteration in 1 to created_volume) var/obj/item/food/drug/saturnx/new_glob = new(location) new_glob.pixel_x = rand(-6, 6) new_glob.pixel_y = rand(-6, 6) diff --git a/code/modules/reagents/chemistry/recipes/medicine.dm b/code/modules/reagents/chemistry/recipes/medicine.dm index c924ac608a4..4a0856d91b4 100644 --- a/code/modules/reagents/chemistry/recipes/medicine.dm +++ b/code/modules/reagents/chemistry/recipes/medicine.dm @@ -350,7 +350,7 @@ /datum/chemical_reaction/medicine/medsuture/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume) var/location = get_turf(holder.my_atom) - for(var/i = 1, i <= created_volume, i++) + for(var/i in 1 to created_volume) new /obj/item/stack/medical/suture/medicated(location) /datum/chemical_reaction/medicine/medmesh @@ -359,7 +359,7 @@ /datum/chemical_reaction/medicine/medmesh/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume) var/location = get_turf(holder.my_atom) - for(var/i = 1, i <= created_volume, i++) + for(var/i in 1 to created_volume) new /obj/item/stack/medical/mesh/advanced(location) /datum/chemical_reaction/medicine/poultice diff --git a/code/modules/reagents/chemistry/recipes/others.dm b/code/modules/reagents/chemistry/recipes/others.dm index 75826f67ddd..9978a38b0d7 100644 --- a/code/modules/reagents/chemistry/recipes/others.dm +++ b/code/modules/reagents/chemistry/recipes/others.dm @@ -53,7 +53,7 @@ /datum/chemical_reaction/plasma_solidification/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume) var/location = get_turf(holder.my_atom) - for(var/i = 1, i <= created_volume, i++) + for(var/i in 1 to created_volume) new /obj/item/stack/sheet/mineral/plasma(location) /datum/chemical_reaction/gold_solidification @@ -64,7 +64,7 @@ /datum/chemical_reaction/gold_solidification/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume) var/location = get_turf(holder.my_atom) - for(var/i = 1, i <= created_volume, i++) + for(var/i in 1 to created_volume) new /obj/item/stack/sheet/mineral/gold(location) /datum/chemical_reaction/uranium_solidification @@ -75,7 +75,7 @@ /datum/chemical_reaction/uranium_solidification/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume) var/location = get_turf(holder.my_atom) - for(var/i = 1, i <= created_volume, i++) + for(var/i in 1 to created_volume) new /obj/item/stack/sheet/mineral/uranium(location) /datum/chemical_reaction/capsaicincondensation @@ -92,7 +92,7 @@ /datum/chemical_reaction/soapification/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume) var/location = get_turf(holder.my_atom) - for(var/i = 1, i <= created_volume, i++) + for(var/i in 1 to created_volume) new /obj/item/soap/homemade(location) /datum/chemical_reaction/omegasoapification @@ -106,7 +106,7 @@ /datum/chemical_reaction/omegasoapification/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume) var/location = get_turf(holder.my_atom) - for(var/i = 1, i <= created_volume, i++) + for(var/i in 1 to created_volume) new /obj/item/soap/omega(location) /datum/chemical_reaction/candlefication @@ -118,7 +118,7 @@ /datum/chemical_reaction/candlefication/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume) var/location = get_turf(holder.my_atom) - for(var/i = 1, i <= created_volume, i++) + for(var/i in 1 to created_volume) new /obj/item/candle(location) /datum/chemical_reaction/meatification @@ -129,7 +129,7 @@ /datum/chemical_reaction/meatification/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume) var/location = get_turf(holder.my_atom) - for(var/i = 1, i <= created_volume, i++) + for(var/i in 1 to created_volume) new /obj/item/food/meat/slab/meatproduct(location) return @@ -559,7 +559,7 @@ /datum/chemical_reaction/corgium/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume) var/location = get_turf(holder.my_atom) - for(var/i = rand(1, created_volume), i <= created_volume, i++) // More lulz. + for(var/i in rand(1, created_volume) to created_volume) // More lulz. new /mob/living/simple_animal/pet/dog/corgi(location) ..() @@ -598,7 +598,7 @@ /datum/chemical_reaction/butterflium/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume) var/location = get_turf(holder.my_atom) - for(var/i = rand(1, created_volume), i <= created_volume, i++) + for(var/i in rand(1, created_volume) to created_volume) new /mob/living/simple_animal/butterfly(location) ..() //scream powder diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index c149f2774a0..ed972ef22b5 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -359,7 +359,7 @@ var/turf/T2 = get_step(T,turn(direction, -90)) var/list/the_targets = list(T,T1,T2) - for(var/i=1, i<=3, i++) // intialize sprays + for(var/i in 1 to 3) // intialize sprays if(reagents.total_volume < 1) return ..(the_targets[i], user) diff --git a/code/modules/research/xenobiology/crossbreeding/burning.dm b/code/modules/research/xenobiology/crossbreeding/burning.dm index b6f5909dae4..b3f90a48e6a 100644 --- a/code/modules/research/xenobiology/crossbreeding/burning.dm +++ b/code/modules/research/xenobiology/crossbreeding/burning.dm @@ -137,7 +137,7 @@ Burning extracts: var/list/turfs = list() for(var/turf/open/T in range(1,get_turf(user))) turfs += T - for(var/i = 0, i < amount, i++) + for(var/i in 1 to amount) var/path = get_random_food() var/obj/item/O = new path(pick(turfs)) O.reagents.add_reagent(/datum/reagent/toxin/slimejelly,5) //Oh god it burns @@ -250,7 +250,7 @@ Burning extracts: var/mob/living/spawned_mob = create_random_mob(get_turf(user), HOSTILE_SPAWN) spawned_mob.faction |= "[REF(user)]" if(prob(50)) - for(var/j = 1, j <= rand(1, 3), j++) + for(var/j in 1 to rand(1, 3)) step(spawned_mob, pick(NORTH,SOUTH,EAST,WEST)) ..() diff --git a/code/modules/research/xenobiology/crossbreeding/industrial.dm b/code/modules/research/xenobiology/crossbreeding/industrial.dm index 46e0735201c..d5087bf804e 100644 --- a/code/modules/research/xenobiology/crossbreeding/industrial.dm +++ b/code/modules/research/xenobiology/crossbreeding/industrial.dm @@ -42,7 +42,7 @@ Industrial extracts: if(plasmaabsorbed >= plasmarequired) playsound(src, 'sound/effects/attackblob.ogg', 50, TRUE) plasmaabsorbed -= plasmarequired - for(var/i = 0, i < itemamount, i++) + for(var/i in 1 to itemamount) do_after_spawn(new itempath(get_turf(src))) else if(IsWorking) playsound(src, 'sound/effects/bubbles.ogg', 5, TRUE) diff --git a/code/modules/research/xenobiology/crossbreeding/selfsustaining.dm b/code/modules/research/xenobiology/crossbreeding/selfsustaining.dm index da67881218e..94e1b13dc39 100644 --- a/code/modules/research/xenobiology/crossbreeding/selfsustaining.dm +++ b/code/modules/research/xenobiology/crossbreeding/selfsustaining.dm @@ -18,7 +18,7 @@ Self-sustaining extracts: /obj/item/slimecross/selfsustaining/Initialize(mapload) ..() visible_message(span_warning("The [src] shudders, and splits into four smaller extracts.")) - for(var/i = 0, i < 4, i++) + for(var/i in 1 to 4) var/obj/item/autoslime/A = new /obj/item/autoslime(src.loc) var/obj/item/slime_extract/X = new extract_type(A) A.extract = X diff --git a/code/modules/ruins/spaceruin_code/hilbertshotel.dm b/code/modules/ruins/spaceruin_code/hilbertshotel.dm index 0b4d18cbfd3..2d818fdbd42 100644 --- a/code/modules/ruins/spaceruin_code/hilbertshotel.dm +++ b/code/modules/ruins/spaceruin_code/hilbertshotel.dm @@ -120,11 +120,11 @@ GLOBAL_VAR_INIT(hhMysteryRoomNumber, rand(1, 999999)) var/datum/turf_reservation/roomReservation = SSmapping.RequestBlockReservation(hotelRoomTemp.width, hotelRoomTemp.height) hotelRoomTempEmpty.load(locate(roomReservation.bottom_left_coords[1], roomReservation.bottom_left_coords[2], roomReservation.bottom_left_coords[3])) var/turfNumber = 1 - for(var/i=0, i