diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 2b697ec6c3e..abbfa9b3ce0 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1416,3 +1416,61 @@ B --><-- A I.pixel_y = y_offset return I + +//similar function to range(), but with no limitations on the distance; will search spiralling outwards from the center +/proc/ultra_range(dist=0, center=usr, orange=0) + if(!dist) + if(!orange) + return list(center) + else + return list() + + var/turf/t_center = get_turf(center) + if(!t_center) + return list() + + var/list/L = list() + var/turf/T + var/y + var/x + var/c_dist = 1 + + if(!orange) + L += t_center + L += t_center.contents + + while( c_dist <= dist ) + y = t_center.y + c_dist + x = t_center.x - c_dist + 1 + for(x in x to t_center.x+c_dist) + T = locate(x,y,t_center.z) + if(T) + L += T + L += T.contents + + y = t_center.y + c_dist - 1 + x = t_center.x + c_dist + for(y in t_center.y-c_dist to y) + T = locate(x,y,t_center.z) + if(T) + L += T + L += T.contents + + y = t_center.y - c_dist + x = t_center.x + c_dist - 1 + for(x in t_center.x-c_dist to x) + T = locate(x,y,t_center.z) + if(T) + L += T + L += T.contents + + y = t_center.y - c_dist + 1 + x = t_center.x - c_dist + for(y in y to t_center.y+c_dist) + T = locate(x,y,t_center.z) + if(T) + L += T + L += T.contents + c_dist++ + + return L diff --git a/code/datums/diseases/wizarditis.dm b/code/datums/diseases/wizarditis.dm index 42c277ec891..e786689a378 100644 --- a/code/datums/diseases/wizarditis.dm +++ b/code/datums/diseases/wizarditis.dm @@ -88,7 +88,7 @@ STI KALY - blind /datum/disease/wizarditis/proc/teleport() var/list/theareas = new/list() - for(var/area/AR in orange(80, affected_mob)) + for(var/area/AR in ultra_range(80, affected_mob, 1)) if(theareas.Find(AR) || istype(AR,/area/space)) continue theareas += AR diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 1b6a3c915aa..0e4bef56c8d 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -172,7 +172,7 @@ its easier to just keep the beam vertical. dir=get_dir(src,BeamTarget) //Causes the source of the beam to rotate to continuosly face the BeamTarget. - for(var/obj/effect/overlay/beam/O in orange(10,src)) //This section erases the previously drawn beam because I found it was easier to + for(var/obj/effect/overlay/beam/O in ultra_range(10,src,1)) //This section erases the previously drawn beam because I found it was easier to if(O.BeamSource==src) //just draw another instance of the beam instead of trying to manipulate all the qdel(O) //pieces to a new orientation. var/Angle=round(Get_Angle(src,BeamTarget)) @@ -215,7 +215,7 @@ its easier to just keep the beam vertical. X.pixel_y=Pixel_y sleep(3) //Changing this to a lower value will cause the beam to follow more smoothly with movement, but it will also be more laggy. //I've found that 3 ticks provided a nice balance for my use. - for(var/obj/effect/overlay/beam/O in orange(10,src)) if(O.BeamSource==src) qdel(O) + for(var/obj/effect/overlay/beam/O in ultra_range(10,src,1)) if(O.BeamSource==src) qdel(O) /atom/proc/examine(mob/user) //This reformat names to get a/an properly working on item descriptions when they are bloody diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm index 0cbded335b7..08e49d3c7ba 100644 --- a/code/game/gamemodes/malfunction/malfunction.dm +++ b/code/game/gamemodes/malfunction/malfunction.dm @@ -206,7 +206,7 @@ AI_mind.current.verbs -= /datum/game_mode/malfunction/proc/takeover var/mob/living/silicon/ai/AI = usr - for(var/turf/simulated/floor/bluegrid/T in orange(AI, 5)) + for(var/turf/simulated/floor/bluegrid/T in orange(5, AI)) T.icon_state = "rcircuitanim" //Causes blue tiles near the AI to change to flashing red /datum/game_mode/malfunction/proc/ai_win() diff --git a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm index 3ab3d435b03..840619d157d 100644 --- a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm @@ -66,7 +66,7 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N H.SetStunned(0) H << "YOU LIVE!!!" - for(var/obj/structure/alien/resin/wall/shadowling/W in orange(H, 1)) + for(var/obj/structure/alien/resin/wall/shadowling/W in orange(1, H)) playsound(W, 'sound/effects/splat.ogg', 50, 1) qdel(W) for(var/obj/structure/alien/weeds/node/N in shadowturf) diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 97a531cfaa8..5e6e9636672 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -542,7 +542,7 @@ var/global/list/multiverse = list() if("r_arm","l_arm") //use active hand on random nearby mob var/list/nearby_mobs = list() - for(var/mob/living/L in range(target,1)) + for(var/mob/living/L in range(1, target)) if(L!=target) nearby_mobs |= L if(nearby_mobs.len) diff --git a/code/game/machinery/atmoalter/area_atmos_computer.dm b/code/game/machinery/atmoalter/area_atmos_computer.dm index fa2cbec3f73..5e903edecb0 100644 --- a/code/game/machinery/atmoalter/area_atmos_computer.dm +++ b/code/game/machinery/atmoalter/area_atmos_computer.dm @@ -113,7 +113,7 @@ connectedscrubbers = new() var/found = 0 - for(var/obj/machinery/portable_atmospherics/scrubber/huge/scrubber in range(range, src.loc)) + for(var/obj/machinery/portable_atmospherics/scrubber/huge/scrubber in ultra_range(range, src.loc)) if(istype(scrubber)) found = 1 connectedscrubbers += scrubber diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index 9f3630160d1..0587b8c9c3b 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -165,7 +165,7 @@ if(target) loadProgram(target) active = 0 - for(var/mob/M in range(10,src)) + for(var/mob/M in ultra_range(10,src)) M.show_message("The holodeck overloads!") diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm index 8cfe3fc4ba7..8e494829962 100644 --- a/code/game/machinery/computer/crew.dm +++ b/code/game/machinery/computer/crew.dm @@ -228,8 +228,8 @@ var/global/datum/crewmonitor/crewmonitor = new var/obj/machinery/camera/C = locate(/obj/machinery/camera) in range(5, tile) - if (!C) C = locate(/obj/machinery/camera) in range(10, tile) - if (!C) C = locate(/obj/machinery/camera) in range(15, tile) + if (!C) C = locate(/obj/machinery/camera) in ultra_range(10, tile) + if (!C) C = locate(/obj/machinery/camera) in ultra_range(15, tile) if (C) var/turf/current_loc = AI.eyeobj.loc diff --git a/code/game/machinery/computer/telecrystalconsoles.dm b/code/game/machinery/computer/telecrystalconsoles.dm index 2bd44d2f137..326a4841765 100644 --- a/code/game/machinery/computer/telecrystalconsoles.dm +++ b/code/game/machinery/computer/telecrystalconsoles.dm @@ -141,7 +141,7 @@ var/list/possible_uplinker_IDs = list("Alfa","Bravo","Charlie","Delta","Echo","F transferlog += ("[worldtime2text()] [logmessage]") /obj/machinery/computer/telecrystals/boss/proc/scanUplinkers() - for(var/obj/machinery/computer/telecrystals/uplinker/A in range(scanrange, src.loc)) + for(var/obj/machinery/computer/telecrystals/uplinker/A in ultra_range(scanrange, src.loc)) if(!A.linkedboss) TCstations += A A.linkedboss = src diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm index b2c140555e1..426063cfbea 100644 --- a/code/game/machinery/doors/brigdoors.dm +++ b/code/game/machinery/doors/brigdoors.dm @@ -39,15 +39,15 @@ Radio.listening = 0 spawn(20) - for(var/obj/machinery/door/window/brigdoor/M in range(20, src)) + for(var/obj/machinery/door/window/brigdoor/M in ultra_range(20, src)) if (M.id == src.id) targets += M - for(var/obj/machinery/flasher/F in range(20, src)) + for(var/obj/machinery/flasher/F in ultra_range(20, src)) if(F.id == src.id) targets += F - for(var/obj/structure/closet/secure_closet/brig/C in range(20, src)) + for(var/obj/structure/closet/secure_closet/brig/C in ultra_range(20, src)) if(C.id == src.id) targets += C diff --git a/code/game/machinery/slotmachine.dm b/code/game/machinery/slotmachine.dm index 4d88f443d05..b8a8a000a56 100644 --- a/code/game/machinery/slotmachine.dm +++ b/code/game/machinery/slotmachine.dm @@ -289,7 +289,7 @@ amount = dispense(amount, cointype, null, 0) else - var/mob/living/target = locate() in range(src, 2) + var/mob/living/target = locate() in range(2, src) amount = dispense(amount, cointype, target, 1) diff --git a/code/game/machinery/telecomms/computers/logbrowser.dm b/code/game/machinery/telecomms/computers/logbrowser.dm index c30b28534d5..d2d9e21d54c 100644 --- a/code/game/machinery/telecomms/computers/logbrowser.dm +++ b/code/game/machinery/telecomms/computers/logbrowser.dm @@ -173,7 +173,7 @@ temp = "- FAILED: CANNOT PROBE WHEN BUFFER FULL -" else - for(var/obj/machinery/telecomms/server/T in range(25, src)) + for(var/obj/machinery/telecomms/server/T in ultra_range(25, src)) if(T.network == network) servers.Add(T) diff --git a/code/game/machinery/telecomms/computers/telemonitor.dm b/code/game/machinery/telecomms/computers/telemonitor.dm index 34833a6bcdc..89948faeb99 100644 --- a/code/game/machinery/telecomms/computers/telemonitor.dm +++ b/code/game/machinery/telecomms/computers/telemonitor.dm @@ -94,7 +94,7 @@ temp = "- FAILED: CANNOT PROBE WHEN BUFFER FULL -" else - for(var/obj/machinery/telecomms/T in range(25, src)) + for(var/obj/machinery/telecomms/T in ultra_range(25, src)) if(T.network == network) machinelist.Add(T) diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index 37a8f60d35e..b46bd9577cd 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -146,7 +146,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list() if(autolinkers.len) // Links nearby machines if(!long_range_link) - for(var/obj/machinery/telecomms/T in orange(20, src)) + for(var/obj/machinery/telecomms/T in ultra_range(20, src, 1)) add_link(T) else for(var/obj/machinery/telecomms/T in telecomms_list) diff --git a/code/game/mecha/equipment/tools/mining_tools.dm b/code/game/mecha/equipment/tools/mining_tools.dm index 7d786f075db..0e1393d374c 100644 --- a/code/game/mecha/equipment/tools/mining_tools.dm +++ b/code/game/mecha/equipment/tools/mining_tools.dm @@ -39,18 +39,18 @@ if(locate(/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp) in chassis.equipment) var/obj/structure/ore_box/ore_box = locate(/obj/structure/ore_box) in chassis:cargo if(ore_box) - for(var/obj/item/weapon/ore/ore in range(chassis,1)) + for(var/obj/item/weapon/ore/ore in range(1, chassis)) if(get_dir(chassis,ore)&chassis.dir) ore.Move(ore_box) else if(istype(target, /turf/simulated/floor/plating/asteroid)) - for(var/turf/simulated/floor/plating/asteroid/M in range(chassis,1)) + for(var/turf/simulated/floor/plating/asteroid/M in range(1, chassis)) if(get_dir(chassis,M)&chassis.dir) M.gets_dug() log_message("Drilled through [target]") if(locate(/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp) in chassis.equipment) var/obj/structure/ore_box/ore_box = locate(/obj/structure/ore_box) in chassis:cargo if(ore_box) - for(var/obj/item/weapon/ore/ore in range(chassis,1)) + for(var/obj/item/weapon/ore/ore in range(1, chassis)) if(get_dir(chassis,ore)&chassis.dir) ore.Move(ore_box) else diff --git a/code/game/mecha/equipment/tools/other_tools.dm b/code/game/mecha/equipment/tools/other_tools.dm index 531f20faa01..0f53b062e7f 100644 --- a/code/game/mecha/equipment/tools/other_tools.dm +++ b/code/game/mecha/equipment/tools/other_tools.dm @@ -37,7 +37,7 @@ /obj/item/mecha_parts/mecha_equipment/wormhole_generator/action(atom/target) if(!action_checks(target) || src.loc.z == ZLEVEL_CENTCOM) return var/list/theareas = list() - for(var/area/AR in orange(100, chassis)) + for(var/area/AR in ultra_range(100, chassis, 1)) if(AR in theareas) continue theareas += AR if(!theareas.len) @@ -113,9 +113,9 @@ if(2) var/list/atoms = list() if(isturf(target)) - atoms = range(target,3) + atoms = range(3, target) else - atoms = orange(target,3) + atoms = orange(3, target) for(var/atom/movable/A in atoms) if(A.anchored) continue spawn(0) diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm index 3e081af2025..a7ecf241e68 100644 --- a/code/game/objects/items/devices/traitordevices.dm +++ b/code/game/objects/items/devices/traitordevices.dm @@ -39,7 +39,7 @@ effective or pretty fucking useless. add_logs(user, null, "knocked down people in the area", src) - for(var/mob/living/carbon/human/M in orange(10, user)) + for(var/mob/living/carbon/human/M in ultra_range(10, user, 1)) spawn() if(prob(50)) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 03d2a106e01..334ca37c804 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -1107,7 +1107,7 @@ /obj/item/toy/minimeteor/throw_impact(atom/hit_atom) if(!..()) playsound(src, 'sound/effects/meteorimpact.ogg', 40, 1) - for(var/mob/M in range(10, src)) + for(var/mob/M in ultra_range(10, src)) if(!M.stat && !istype(M, /mob/living/silicon/ai))\ shake_camera(M, 3, 1) qdel(src) @@ -1153,7 +1153,7 @@ cooldown = (world.time + 300) // Sets cooldown at 30 seconds user.visible_message("[user] presses the big red button.", "You press the button, it plays a loud noise!", "The button clicks loudly.") playsound(src, 'sound/effects/explosionfar.ogg', 50, 0, surround = 0) - for(var/mob/M in range(10, src)) // Checks range + for(var/mob/M in ultra_range(10, src)) // Checks range if(!M.stat && !istype(M, /mob/living/silicon/ai)) // Checks to make sure whoever's getting shaken is alive/not the AI sleep(8) // Short delay to match up with the explosion sound shake_camera(M, 2, 1) // Shakes player camera 2 squares for 1 second. diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm index 413c966390c..f30bfdfc4da 100644 --- a/code/game/objects/items/weapons/teleportation.dm +++ b/code/game/objects/items/weapons/teleportation.dm @@ -149,7 +149,7 @@ Frequency: else L["[com.id] (Inactive)"] = com.target var/list/turfs = list( ) - for(var/turf/T in orange(10)) + for(var/turf/T in ultra_range(10, orange=1)) if(T.x>world.maxx-8 || T.x<8) continue //putting them at the edge is dumb if(T.y>world.maxy-8 || T.y<8) continue turfs += T diff --git a/code/modules/assembly/signaler.dm b/code/modules/assembly/signaler.dm index 57cb5d4791b..e013747aa01 100644 --- a/code/modules/assembly/signaler.dm +++ b/code/modules/assembly/signaler.dm @@ -177,7 +177,7 @@ Code: return 0 if(signal.encryption != code) return 0 - for(var/obj/effect/anomaly/A in orange(0, src)) + for(var/obj/effect/anomaly/A in get_turf(src)) A.anomalyNeutralize() /obj/item/device/assembly/signaler/anomaly/attack_self() diff --git a/code/modules/events/anomaly_bluespace.dm b/code/modules/events/anomaly_bluespace.dm index eb47c8581a9..f1184111a2a 100644 --- a/code/modules/events/anomaly_bluespace.dm +++ b/code/modules/events/anomaly_bluespace.dm @@ -49,7 +49,7 @@ var/y_distance = TO.y - FROM.y var/x_distance = TO.x - FROM.x - for (var/atom/movable/A in range(12, FROM )) // iterate thru list of mobs in the area + for (var/atom/movable/A in ultra_range(12, FROM )) // iterate thru list of mobs in the area if(istype(A, /obj/item/device/radio/beacon)) continue // don't teleport beacons because that's just insanely stupid if(A.anchored) continue diff --git a/code/modules/events/electrical_storm.dm b/code/modules/events/electrical_storm.dm index 1d7ff646543..4108a34f6db 100644 --- a/code/modules/events/electrical_storm.dm +++ b/code/modules/events/electrical_storm.dm @@ -31,5 +31,5 @@ return for(var/obj/effect/landmark/epicentre in epicentreList) - for(var/obj/machinery/power/apc/apc in range(epicentre,lightsoutRange)) + for(var/obj/machinery/power/apc/apc in ultra_range(lightsoutRange, epicentre)) apc.overload_lighting() diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm index 8ddc528a2c8..e45d112a495 100644 --- a/code/modules/events/spacevine.dm +++ b/code/modules/events/spacevine.dm @@ -361,7 +361,7 @@ return if(istype(W, /obj/item/weapon/scythe)) - for(var/obj/effect/spacevine/B in orange(src,1)) + for(var/obj/effect/spacevine/B in orange(1,src)) if(prob(80)) qdel(B) qdel(src) diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 571a2cf61a3..49027281407 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -483,7 +483,7 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite target = T var/image/I = null var/count = 0 - for(var/obj/machinery/door/airlock/A in range(target,7)) + for(var/obj/machinery/door/airlock/A in range(7, target)) if(count>door_number && door_number>0) break count++ diff --git a/code/modules/lighting/lighting_system.dm b/code/modules/lighting/lighting_system.dm index a8fe3cc34d8..d393adb3728 100644 --- a/code/modules/lighting/lighting_system.dm +++ b/code/modules/lighting/lighting_system.dm @@ -267,7 +267,7 @@ lighting_object = locate() in src init_lighting() - for(var/turf/space/S in orange(src,1)) + for(var/turf/space/S in orange(1,src)) S.update_starlight() diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 7b0e7edabfd..5afa1a5ef80 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -399,7 +399,7 @@ var/global/list/rockTurfEdgeCache if(prob(30)) if(istype(loc, /area/mine/explored)) return - for(var/atom/A in range(15,T))//Lowers chance of mob clumps + for(var/atom/A in ultra_range(15,T))//Lowers chance of mob clumps if(istype(A, /mob/living/simple_animal/hostile/asteroid)) return var/randumb = pickweight(mob_spawn_list) diff --git a/code/modules/mob/interactive.dm b/code/modules/mob/interactive.dm index 3c24e017066..51cb52ac775 100644 --- a/code/modules/mob/interactive.dm +++ b/code/modules/mob/interactive.dm @@ -395,17 +395,17 @@ doing |= TRAVEL if(nearby.len > 4) //i'm crowded, time to leave - TARGET = pick(target_filter(orange(MAX_RANGE_FIND,src))) + TARGET = pick(target_filter(ultra_range(MAX_RANGE_FIND,src,1))) else if(prob((FUZZY_CHANCE_LOW+FUZZY_CHANCE_HIGH)/2)) //chance to chase an item - TARGET = locate(/obj/item) in orange(MIN_RANGE_FIND,src) + TARGET = locate(/obj/item) in ultra_range(MIN_RANGE_FIND,src,1) else if(prob((FUZZY_CHANCE_LOW+FUZZY_CHANCE_HIGH)/2)) //chance to leave - TARGET = locate(/obj/machinery/door) in orange(MIN_RANGE_FIND,src) // this is a sort of fix for the current pathing. + TARGET = locate(/obj/machinery/door) in ultra_range(MIN_RANGE_FIND,src,1) // this is a sort of fix for the current pathing. else //else, target whatever, or go to our department if(prob((FUZZY_CHANCE_LOW+FUZZY_CHANCE_HIGH)/2)) - TARGET = pick(target_filter(orange(MIN_RANGE_FIND,src))) + TARGET = pick(target_filter(ultra_range(MIN_RANGE_FIND,src,1))) else TARGET = pick(get_area_turfs(job2area(myjob))) tryWalk(TARGET) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index ae4eba0d75c..f34f20650f5 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -86,7 +86,7 @@ Sorry Giacom. Please don't be mad :( //BubbleWrap: Should stop you pushing a restrained person out of the way if(istype(M, /mob/living)) - for(var/mob/MM in range(M, 1)) + for(var/mob/MM in range(1,M)) if( ((MM.pulling == M && ( M.restrained() && !( MM.restrained() ) && MM.stat == CONSCIOUS)) || locate(/obj/item/weapon/grab, M.grabbed_by.len)) ) if ( !(world.time % 5) ) src << "[M] is restrained, you cannot push past." @@ -517,7 +517,7 @@ Sorry Giacom. Please don't be mad :( var/cuff_dragged = 0 if (restrained()) - for(var/mob/living/M in range(src, 1)) + for(var/mob/living/M in range(1, src)) if (M.pulling == src && !M.incapacitated()) cuff_dragged = 1 if (!cuff_dragged && pulling && !throwing && (get_dist(src, pulling) <= 1 || pulling.loc == loc)) diff --git a/code/modules/mob/living/silicon/ai/freelook/chunk.dm b/code/modules/mob/living/silicon/ai/freelook/chunk.dm index e36a3df9bd3..515d4b54501 100644 --- a/code/modules/mob/living/silicon/ai/freelook/chunk.dm +++ b/code/modules/mob/living/silicon/ai/freelook/chunk.dm @@ -140,7 +140,7 @@ src.y = y src.z = z - for(var/obj/machinery/camera/c in range(CHUNK_SIZE, locate(x + (CHUNK_SIZE / 2), y + (CHUNK_SIZE / 2), z))) + for(var/obj/machinery/camera/c in ultra_range(CHUNK_SIZE, locate(x + (CHUNK_SIZE / 2), y + (CHUNK_SIZE / 2), z))) if(c.can_use()) cameras += c diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm index f1ce0df13fc..62a34b75106 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm @@ -83,7 +83,7 @@ //1% chance to skitter madly away if(!busy && prob(1)) stop_automated_movement = 1 - Goto(pick(orange(20, src)), move_to_delay) + Goto(pick(ultra_range(20, src, 1)), move_to_delay) spawn(50) stop_automated_movement = 0 walk(src,0) diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 717359be01a..5ead7ca5132 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -147,7 +147,7 @@ move_delay += T.slowdown if(mob.restrained()) //Why being pulled while cuffed prevents you from moving - for(var/mob/M in range(mob, 1)) + for(var/mob/M in range(1, mob)) if(M.pulling == mob) if(!M.incapacitated() && mob.Adjacent(M)) src << "You're restrained! You can't move!" diff --git a/code/modules/power/singularity/narsie.dm b/code/modules/power/singularity/narsie.dm index a5d25a81c71..25be564a372 100644 --- a/code/modules/power/singularity/narsie.dm +++ b/code/modules/power/singularity/narsie.dm @@ -139,7 +139,7 @@ set background = BACKGROUND_ENABLED // if(defer_powernet_rebuild != 2) // defer_powernet_rebuild = 1 - for(var/atom/X in orange(consume_range,src)) + for(var/atom/X in ultra_range(consume_range,src,1)) if(isturf(X) || istype(X, /atom/movable)) consume(X) // if(defer_powernet_rebuild != 2) diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index d03929a87d2..871589572a9 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -112,7 +112,7 @@ /obj/singularity/proc/admin_investigate_setup() last_warning = world.time - var/count = locate(/obj/machinery/field/containment) in orange(30, src) + var/count = locate(/obj/machinery/field/containment) in ultra_range(30, src, 1) if(!count) message_admins("A singulo has been created without containment fields active ([x],[y],[z])",1) investigate_log("was created. [count?"":"No containment fields were active"]","singulo") @@ -233,7 +233,8 @@ /obj/singularity/proc/eat() set background = BACKGROUND_ENABLED - for(var/atom/X in orange(grav_pull,src)) + var/list/L = grav_pull > 8 ? ultra_range(grav_pull, src, 1) : orange(grav_pull, src) + for(var/atom/X in L) var/dist = get_dist(X, src) var/obj/singularity/S = src if(dist > consume_range) @@ -368,7 +369,7 @@ /obj/singularity/proc/combust_mobs() - for(var/mob/living/carbon/C in orange(20, src)) + for(var/mob/living/carbon/C in ultra_range(20, src, 1)) C.visible_message("[C]'s skin bursts into flame!", \ "You feel an inner fire as your skin bursts into flames!") C.adjust_fire_stacks(5) diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index 87f2acf69c3..1b7b61b5389 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -80,7 +80,7 @@ return A.ex_act(2) playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1) - for(var/mob/M in range(10, src)) + for(var/mob/M in ultra_range(10, src)) if(!M.stat) shake_camera(M, 3, 1) qdel(src)