fixes being unable to rename paper (#23269)

* fixes being unable to rename paper

* Update code/modules/paperwork/paper.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>

---------

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
GDN
2023-11-24 15:35:04 +00:00
committed by GitHub
co-authored by Contrabang
parent d1374cc1be
commit 11dc93d501
2 changed files with 8 additions and 16 deletions
+8 -2
View File
@@ -98,8 +98,14 @@
if(is_pen(user.get_active_hand()))
rename(user)
else
return ..()
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/I = H.is_in_hands(/obj/item/paper)
if(I)
ProcFoldPlane(H, I)
return
return ..()
/obj/item/paper/proc/rename(mob/user)
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
-14
View File
@@ -108,20 +108,6 @@
E.take_damage(8, 1)
H.emote("scream")
/obj/item/paper/AltClick(mob/user, obj/item/I)
if(in_range(user, src) && !user.incapacitated())
if(is_pen(user.get_active_hand()))
rename()
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
I = H.is_in_hands(/obj/item/paper)
if(I)
ProcFoldPlane(H, I)
else
..()
/obj/item/paper/proc/ProcFoldPlane(mob/living/carbon/user, obj/item/I)
if(istype(user))
if((!in_range(src, user)) || user.stat || user.restrained())