Wearable IC Fixes (#15386)

This commit is contained in:
Geeves
2022-12-20 19:35:15 +02:00
committed by GitHub
parent 766e44d98e
commit eafb3e4d4e
3 changed files with 19 additions and 1 deletions
@@ -155,12 +155,14 @@
var/mob/M = usr
if(!check_interactivity(M))
return
return null
var/input = sanitizeSafe(input("What do you want to name this?", "Rename", src.name) as null|text, MAX_NAME_LEN)
if(src && input)
to_chat(M, "<span class='notice'>The machine now has a label reading '[input]'.</span>")
name = input
return input
return null
/obj/item/device/electronic_assembly/proc/can_move()
return FALSE
@@ -38,6 +38,10 @@
max_complexity = IC_COMPLEXITY_BASE * 2
w_class = ITEMSIZE_NORMAL
/obj/item/device/electronic_assembly/clothing/rename()
var/input_name = ..()
if(input_name)
clothing.name = input_name
// This is defined higher up, in /clothing to avoid lots of copypasta.
/obj/item/clothing
@@ -134,6 +138,11 @@
setup_integrated_circuit(/obj/item/device/electronic_assembly/clothing/small)
return ..()
/obj/item/clothing/glasses/circuitry/attack_self(mob/user)
if(IC)
return IC.attack_self(user)
return ..()
/obj/item/clothing/glasses/circuitry/Look(var/atom/A, mob/user, var/proximity)
if(!A)
return 0