Merge pull request #8752 from Citinited/pipes-exploit-fix

Restricts RPD use to certain turf types
This commit is contained in:
tigercat2000
2018-03-13 04:57:15 -07:00
committed by GitHub
6 changed files with 10 additions and 2 deletions
+5 -2
View File
@@ -180,9 +180,12 @@ var/list/pipemenu = list(
/obj/item/weapon/rpd/afterattack(atom/target, mob/user, proximity)
..()
var/turf/T = get_turf(target)
if(src.loc != user || ismob(target) || istype(target, /obj/structure/window) || !proximity || world.time < lastused + spawndelay)
if(loc != user || ismob(target) || istype(target, /obj/structure/window) || !proximity || world.time < lastused + spawndelay)
return
if(mode == ATMOS_MODE && !istype(T, /turf/simulated/shuttle)) //No pipes on shuttles nerds
if(!(T.flags & RPD_ALLOWED_HERE))
to_chat(user, "<span class='notice'>[src] beeps, \"Unable to interface with [T]. Please try again later.\"</span>")
return
if(mode == ATMOS_MODE)
if(istype(T, /turf/simulated/wall)) //Drilling into walls takes time
playsound(loc, "sound/weapons/circsawhit.ogg", 50, 1)
user.visible_message("<span class = 'notice'>[user] starts drilling a hole in [T]...</span>", "<span class = 'notice'>You start drilling a hole in [T]...</span>", "<span class = 'warning'>You hear a drill.</span>")