Containment field exploit fix (#18050)

Fixed an exploit that allowed dense objects to be pushed in front of the containment field when it was already active. It already had a check on startup to prevent starting with a dense object in the way, but did not check afterwards. It now instantly shuts off when a dense object crosses over it.
This commit is contained in:
SatinIsle
2025-07-23 21:54:58 +01:00
committed by GitHub
parent db2a31df23
commit a416fdcac0
@@ -47,10 +47,18 @@
/obj/machinery/containment_field/ex_act(severity)
return 0
/obj/machinery/containment_field/Crossed(mob/living/L)
if(!istype(L) || L.is_incorporeal())
/obj/machinery/containment_field/Crossed(atom/A)
if(!istype(A) || A.is_incorporeal())
return
shock(L)
if(isliving(A))
var/mob/living/L = A
shock(L)
return
if(A.density)
if(istype(A,/obj/machinery/containment_field) || istype(A,/obj/effect) || istype(A,/obj/singularity))
return
else
Destroy()
/obj/machinery/containment_field/HasProximity(turf/T, datum/weakref/WF, old_loc)
if(isnull(WF))