diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 3bc1262b748f..8240f40f8e9b 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -519,7 +519,7 @@ var/spread = floor(sqrt(size)*1.5) var/list/turfs = list() - for(var/turf/open/floor/F in range(src,spread)) + for(var/turf/open/floor/F in range(spread, src)) turfs += F switch(A.ceiling) diff --git a/code/modules/admin/topic/topic_events.dm b/code/modules/admin/topic/topic_events.dm index ddb33a2ccc3f..7d7c5ed89057 100644 --- a/code/modules/admin/topic/topic_events.dm +++ b/code/modules/admin/topic/topic_events.dm @@ -191,7 +191,7 @@ var/turf/spawn_turf if(range_to_spawn_on) - for(spawn_turf in range(initial_turf, range_to_spawn_on)) + for(spawn_turf in range(range_to_spawn_on, initial_turf)) if(!spawn_turf || istype(spawn_turf, /turf/closed)) continue turfs += spawn_turf @@ -317,7 +317,7 @@ var/turf/spawn_turf if(range_to_spawn_on) - for(spawn_turf in range(initial_turf, range_to_spawn_on)) + for(spawn_turf in range(range_to_spawn_on, initial_turf)) if(!spawn_turf || istype(spawn_turf, /turf/closed)) continue turfs += spawn_turf diff --git a/code/modules/cm_marines/dropship_ammo.dm b/code/modules/cm_marines/dropship_ammo.dm index 7a07891faa94..b2c9aa530888 100644 --- a/code/modules/cm_marines/dropship_ammo.dm +++ b/code/modules/cm_marines/dropship_ammo.dm @@ -244,7 +244,7 @@ /obj/structure/ship_ammo/laser_battery/detonate_on(turf/impact, obj/structure/dropship_equipment/weapon/fired_from) set waitfor = 0 var/list/turf_list = list() - for(var/turf/T in range(impact, 3)) //This is its area of effect + for(var/turf/T in range(3, impact)) //This is its area of effect turf_list += T playsound(impact, 'sound/effects/pred_vision.ogg', 20, 1) for(var/i=1 to 16) //This is how many tiles within that area of effect will be randomly ignited diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 1462594a0b46..974312fc42f7 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -110,7 +110,7 @@ var/obj/O = A if(O.unacidable) O.forceMove(get_turf(loc)) - O.throw_atom(pick(range(get_turf(loc), 1)), 1, SPEED_FAST) + O.throw_atom(pick(range(1, get_turf(loc))), 1, SPEED_FAST) . = ..(cause) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm index 05ab5d00a743..4bd70a93684f 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm @@ -708,7 +708,7 @@ /datum/action/xeno_action/activable/place_construction/proc/spacecheck(mob/living/carbon/xenomorph/X, turf/T, datum/construction_template/xenomorph/tem) if(tem.block_range) - for(var/turf/TA in range(T, tem.block_range)) + for(var/turf/TA in range(tem.block_range, T)) if(!X.check_alien_construction(TA, FALSE, TRUE)) to_chat(X, SPAN_WARNING("We need more open space to build here.")) qdel(tem) diff --git a/code/modules/organs/limbs.dm b/code/modules/organs/limbs.dm index ea9a68bb9c41..2d50ea5726c5 100644 --- a/code/modules/organs/limbs.dm +++ b/code/modules/organs/limbs.dm @@ -1522,5 +1522,5 @@ treat_grafted var tells it to apply to grafted but unsalved wounds, for burn kit owner.visible_message("[owner]'s [owner_helmet] goes flying off from the impact!", SPAN_USERDANGER("Your [owner_helmet] goes flying off from the impact!")) owner.drop_inv_item_on_ground(owner_helmet) - INVOKE_ASYNC(owner_helmet, TYPE_PROC_REF(/atom/movable, throw_atom), pick(range(get_turf(loc), 1)), 1, SPEED_FAST) + INVOKE_ASYNC(owner_helmet, TYPE_PROC_REF(/atom/movable, throw_atom), pick(range(1, get_turf(loc))), 1, SPEED_FAST) playsound(owner, 'sound/effects/helmet_noise.ogg', 100)