[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:
SkyratBot
2020-11-25 13:56:56 +01:00
committed by GitHub
co-authored by Ghom
parent d51c3fe63f
commit e6879819ea
50 changed files with 114 additions and 176 deletions
+1 -1
View File
@@ -694,7 +694,7 @@
. += "<span class='notice'>Alt-click it to quickly draw the blade.</span>"
/obj/item/storage/belt/sabre/AltClick(mob/user)
if(!iscarbon(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, TRUE))
return
if(length(contents))
var/obj/item/I = contents[1]
+2 -2
View File
@@ -217,8 +217,8 @@
if(spawn_coupon)
. += "<span class='notice'>There's a coupon on the back of the pack! You can tear it off once it's empty.</span>"
/obj/item/storage/fancy/cigarettes/AltClick(mob/living/carbon/user)
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
/obj/item/storage/fancy/cigarettes/AltClick(mob/user)
if(!user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE, TRUE))
return
var/obj/item/clothing/mask/cigarette/W = locate(/obj/item/clothing/mask/cigarette) in contents
if(W && contents.len > 0)