From e2aebb9d0fbaa194f58515152b92c31f8c8fb479 Mon Sep 17 00:00:00 2001
From: 1080pCat <96908085+1080pCat@users.noreply.github.com>
Date: Mon, 10 Feb 2025 09:38:47 +1000
Subject: [PATCH] exploit fix
---
code/game/objects/items/weapons/rpd.dm | 2 +-
code/game/objects/items/weapons/stock_parts.dm | 9 ++++-----
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/code/game/objects/items/weapons/rpd.dm b/code/game/objects/items/weapons/rpd.dm
index a7795aff20a3..d85bda11ba25 100644
--- a/code/game/objects/items/weapons/rpd.dm
+++ b/code/game/objects/items/weapons/rpd.dm
@@ -342,7 +342,7 @@
// If we get here, then we're effectively acting on the turf, probably placing a pipe.
if(ranged) //woosh beam if bluespaced at a distance
- if(get_dist(src, T) >= (user.client.maxview() + 2))
+ if(get_dist(src, T) >= (user.client.maxview() / 2))
message_admins("\[EXPLOIT] [key_name_admin(user)] attempted to place pipes with a BRPD via a camera console. (Attempted range exploit)")
playsound(src, 'sound/machines/synth_no.ogg', 15, TRUE)
to_chat(user, "ERROR: \The [T] is out of [src]'s range!")
diff --git a/code/game/objects/items/weapons/stock_parts.dm b/code/game/objects/items/weapons/stock_parts.dm
index 1970b9453ee4..c24f6c4d1c4f 100644
--- a/code/game/objects/items/weapons/stock_parts.dm
+++ b/code/game/objects/items/weapons/stock_parts.dm
@@ -50,17 +50,16 @@
if(!proximity_flag)
if(!works_from_distance)
return
- if(get_dist(src, M) > (user.client.maxview() + 2))
+ if(get_dist(user, M) > (user.client.maxview() / 2))
+ message_admins("\[EXPLOIT] [key_name_admin(user)] attempted to upgrade machinery with a BRPED via a camera console (attempted range exploit).")
+ playsound(src, 'sound/machines/synth_no.ogg', 15, TRUE)
+ to_chat(user, "ERROR: [M] is out of [src]'s range!")
return
if(M.component_parts)
M.exchange_parts(user, src)
if(works_from_distance)
user.Beam(M, icon_state="rped_upgrade", icon='icons/effects/effects.dmi', time=5)
- else
- message_admins("\[EXPLOIT] [key_name_admin(user)] attempted to upgrade machinery with a BRPED via a camera console (attempted range exploit).")
- playsound(src, 'sound/machines/synth_no.ogg', 15, TRUE)
- to_chat(user, "ERROR: [M] is out of [src]'s range!")
/obj/item/storage/part_replacer/tier4/populate_contents()
for(var/amount in 1 to 30)