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 11:43:15 -08:00
committed by GitHub
parent b797f85a49
commit 1683c4271a
27 changed files with 186 additions and 268 deletions
@@ -236,12 +236,7 @@ Thus, the two variables affect pump operation are set in New():
/obj/machinery/atmospherics/binary/pump/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/pen))
var/t = copytext(stripped_input(user, "Enter the name for the pump.", "Rename", name), 1, MAX_NAME_LEN)
if(!t)
return
if(!in_range(src, usr) && loc != usr)
return
name = t
rename_interactive(user, W)
return
else if(!istype(W, /obj/item/wrench))
return ..()
@@ -233,12 +233,7 @@ Thus, the two variables affect pump operation are set in New():
/obj/machinery/atmospherics/binary/volume_pump/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/pen))
var/t = copytext(stripped_input(user, "Enter the name for the volume pump.", "Rename", name), 1, MAX_NAME_LEN)
if(!t)
return
if(!in_range(src, usr) && loc != usr)
return
name = t
rename_interactive(user, W)
return
else if(!istype(W, /obj/item/wrench))
return ..()