Refactors renaming things with a pen. (#14960)

* Refactors renaming things with a pen.

* Farie review (thanks!!)

* Derp.

* Farie take 2
This commit is contained in:
moxian
2020-12-16 14:43:15 -05:00
committed by GitHub
parent b797f85a49
commit 1683c4271a
27 changed files with 186 additions and 268 deletions
@@ -29,15 +29,7 @@
/obj/item/implantcase/attackby(obj/item/W, mob/user, params)
..()
if(istype(W, /obj/item/pen))
var/t = stripped_input(user, "What would you like the label to be?", name, null)
if(user.get_active_hand() != W)
return
if(!in_range(src, user) && loc != user)
return
if(t)
name = "implant case - '[t]'"
else
name = "implant case"
rename_interactive(user, W)
else if(istype(W, /obj/item/implanter))
var/obj/item/implanter/I = W
if(I.imp)
@@ -43,15 +43,7 @@
/obj/item/implanter/attackby(obj/item/W, mob/user, params)
..()
if(istype(W, /obj/item/pen))
var/t = stripped_input(user, "What would you like the label to be?", name, null)
if(user.get_active_hand() != W)
return
if(!in_range(src, user) && loc != user)
return
if(t)
name = "implanter ([t])"
else
name = "implanter"
rename_interactive(user, W)
/obj/item/implanter/New()
..()