mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +01:00
[MIRROR] CanUseTopic() refactor. (#1829)
* CanUseTopic() refactor. (#54747) * CanUseTopic() refactor. * Forgot about default_can_use_topic. Tested and working. * Update bin.dm * no-nonsense. * CanUseTopic() refactor. Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
var/mob/living/L = user
|
||||
|
||||
if(istype(L))
|
||||
if(!user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
|
||||
return FALSE
|
||||
else
|
||||
return TRUE
|
||||
@@ -240,9 +240,9 @@
|
||||
/obj/structure/chair/MouseDrop(over_object, src_location, over_location)
|
||||
. = ..()
|
||||
if(over_object == usr && Adjacent(usr))
|
||||
if(!item_chair || !usr.can_hold_items() || has_buckled_mobs() || src.flags_1 & NODECONSTRUCT_1)
|
||||
if(!item_chair || has_buckled_mobs() || src.flags_1 & NODECONSTRUCT_1)
|
||||
return
|
||||
if(!usr.canUseTopic(src, BE_CLOSE, ismonkey(usr)))
|
||||
if(!usr.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, TRUE))
|
||||
return
|
||||
usr.visible_message("<span class='notice'>[usr] grabs \the [src.name].</span>", "<span class='notice'>You grab \the [src.name].</span>")
|
||||
var/obj/item/C = new item_chair(loc)
|
||||
@@ -415,9 +415,9 @@
|
||||
if(has_gravity())
|
||||
playsound(src, 'sound/machines/clockcult/integration_cog_install.ogg', 50, TRUE)
|
||||
|
||||
/obj/structure/chair/bronze/AltClick(mob/living/user)
|
||||
/obj/structure/chair/bronze/AltClick(mob/user)
|
||||
turns = 0
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
|
||||
return
|
||||
if(!(datum_flags & DF_ISPROCESSING))
|
||||
user.visible_message("<span class='notice'>[user] spins [src] around, and the last vestiges of Ratvarian technology keeps it spinning FOREVER.</span>", \
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/extinguisher_cabinet/AltClick(mob/living/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, TRUE))
|
||||
return
|
||||
toggle_cabinet(user)
|
||||
|
||||
|
||||
@@ -157,14 +157,14 @@
|
||||
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, ismonkey(user)))
|
||||
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
|
||||
return
|
||||
if(!isnull(new_angle))
|
||||
setAngle(SIMPLIFY_DEGREES(new_angle))
|
||||
return TRUE
|
||||
|
||||
/obj/structure/reflector/AltClick(mob/user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user)))
|
||||
return
|
||||
else if(finished)
|
||||
rotate(user)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
to_chat(user, "<span class='warning'>It's bolted to the floor, you'll need to unwrench it first.</span>")
|
||||
|
||||
/obj/structure/statue/proc/can_user_rotate(mob/user)
|
||||
return isliving(user) && user.canUseTopic(src, BE_CLOSE, no_dexterity = ismonkey(user))
|
||||
return !user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, !iscyborg(user))
|
||||
|
||||
/obj/structure/statue/attackby(obj/item/W, mob/living/user, params)
|
||||
add_fingerprint(user)
|
||||
|
||||
Reference in New Issue
Block a user