[s] Fixes altclick exploits
This commit is contained in:
committed by
CitadelStationBot
parent
7f7bea7468
commit
f4685cfe01
@@ -78,13 +78,10 @@
|
||||
/obj/structure/bed/roller/MouseDrop(over_object, src_location, over_location)
|
||||
. = ..()
|
||||
if(over_object == usr && Adjacent(usr))
|
||||
if(!ishuman(usr))
|
||||
if(!ishuman(usr) || !usr.canUseTopic(src, BE_CLOSE))
|
||||
return 0
|
||||
if(has_buckled_mobs())
|
||||
return 0
|
||||
if(usr.incapacitated())
|
||||
to_chat(usr, "<span class='warning'>You can't do that right now!</span>")
|
||||
return 0
|
||||
usr.visible_message("[usr] collapses \the [src.name].", "<span class='notice'>You collapse \the [src.name].</span>")
|
||||
var/obj/structure/bed/roller/B = new foldabletype(get_turf(src))
|
||||
usr.put_in_hands(B)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
var/mob/living/L = user
|
||||
|
||||
if(istype(L))
|
||||
if(!user.Adjacent(src) || user.incapacitated())
|
||||
if(!user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return FALSE
|
||||
else
|
||||
@@ -225,7 +225,7 @@
|
||||
if(over_object == usr && Adjacent(usr))
|
||||
if(!item_chair || !usr.can_hold_items() || has_buckled_mobs() || src.flags_1 & NODECONSTRUCT_1)
|
||||
return
|
||||
if(usr.incapacitated())
|
||||
if(!usr.canUseTopic(src, BE_CLOSE, ismonkey(usr)))
|
||||
to_chat(usr, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
usr.visible_message("<span class='notice'>[usr] grabs \the [src.name].</span>", "<span class='notice'>You grab \the [src.name].</span>")
|
||||
@@ -383,7 +383,7 @@
|
||||
|
||||
/obj/structure/chair/brass/AltClick(mob/living/user)
|
||||
turns = 0
|
||||
if(!user.canUseTopic(src, be_close = TRUE))
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
if(!isprocessing)
|
||||
user.visible_message("<span class='notice'>[user] spins [src] around, and Ratvarian technology keeps it spinning FOREVER.</span>", \
|
||||
|
||||
@@ -394,8 +394,7 @@
|
||||
|
||||
/obj/structure/closet/AltClick(mob/user)
|
||||
..()
|
||||
if(!user.canUseTopic(src, be_close=TRUE) || !isturf(loc))
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
if(!user.canUseTopic(src, BE_CLOSE) || !isturf(loc))
|
||||
return
|
||||
if(opened || !secure)
|
||||
return
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/extinguisher_cabinet/AltClick(mob/living/user)
|
||||
if(user.incapacitated() || !Adjacent(user) || !istype(user))
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
toggle_cabinet(user)
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
var/obj/item/O = locate(href_list["retrieve"]) in contents
|
||||
if(!O || !istype(O))
|
||||
return
|
||||
if(!usr.canUseTopic(src) || !open)
|
||||
if(!usr.canUseTopic(src, BE_CLOSE) || !open)
|
||||
return
|
||||
if(ishuman(usr))
|
||||
if(!usr.put_in_hands(O))
|
||||
|
||||
@@ -150,8 +150,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
|
||||
|
||||
/obj/structure/bodycontainer/morgue/AltClick(mob/user)
|
||||
..()
|
||||
if(user.incapacitated())
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
beeper = !beeper
|
||||
to_chat(user, "<span class='notice'>You turn the speaker function [beeper ? "off" : "on"].</span>")
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
to_chat(user, "<span class='warning'>The rotation is locked!</span>")
|
||||
return FALSE
|
||||
var/new_angle = input(user, "Input a new angle for primary reflection face.", "Reflector Angle", rotation_angle) as null|num
|
||||
if(!user.canUseTopic(src, be_close=TRUE))
|
||||
if(!user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(!isnull(new_angle))
|
||||
@@ -169,8 +169,7 @@
|
||||
return TRUE
|
||||
|
||||
/obj/structure/reflector/AltClick(mob/user)
|
||||
if(!user.canUseTopic(src, be_close=TRUE))
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
if(!user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
else if(finished)
|
||||
rotate(user)
|
||||
|
||||
Reference in New Issue
Block a user