mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 05:27:39 +01:00
Circuity improvements and minor additions (#18046)
* Implement circuitry bug assembly * Add distant ref grabbing support to circuits * Set circuitry clothing wearer var for some functionality * Add silent, built-in speaker to circuitry ear piece. * Communicator support and reference grabber circuit * Add toggler circuit to easily toggle functionality * Allow reagent using circuits to use reagent storage. * update .dme
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
/obj/item/electronic_assembly/circuit_bug // A nerfed, circuitry version of the spy bug.
|
||||
name = "electronic bug"
|
||||
desc = "A tiny circuit assembly that looks perfect for hiding."
|
||||
icon = 'icons/obj/integrated_electronics/electronic_setups.dmi'
|
||||
icon_state = "setup_device_cylinder"
|
||||
layer = TURF_LAYER+0.2 // Appears under many things, but with alt+click, unlike spy bug.
|
||||
w_class = ITEMSIZE_TINY
|
||||
slot_flags = SLOT_EARS
|
||||
max_components = IC_COMPONENTS_BASE
|
||||
max_complexity = 20 // Incredibly low complexity to prevent shenanigans.
|
||||
origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1)
|
||||
|
||||
/obj/item/electronic_assembly/circuit_bug/examine(mob/user)
|
||||
. = ..()
|
||||
if(get_dist(user, src) == 0)
|
||||
. += "It looks like it could be hidden easily..."
|
||||
@@ -100,6 +100,13 @@
|
||||
setup_integrated_circuit(/obj/item/electronic_assembly/clothing)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/under/circuitry/equipped(mob/user, slot) // Set wearer var when equiped.
|
||||
wearer = WEAKREF(user)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/under/circuitry/dropped(mob/user) // Remove wearer var.
|
||||
wearer = null
|
||||
..()
|
||||
|
||||
// Gloves.
|
||||
/obj/item/clothing/gloves/circuitry
|
||||
@@ -114,6 +121,13 @@
|
||||
setup_integrated_circuit(/obj/item/electronic_assembly/clothing/small)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/gloves/circuitry/equipped(mob/user, slot)
|
||||
wearer = WEAKREF(user)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/gloves/circuitry/dropped(mob/user)
|
||||
wearer = null
|
||||
..()
|
||||
|
||||
// Glasses.
|
||||
/obj/item/clothing/glasses/circuitry
|
||||
@@ -128,6 +142,14 @@
|
||||
setup_integrated_circuit(/obj/item/electronic_assembly/clothing/small)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/glasses/circuitry/equipped(mob/user, slot)
|
||||
wearer = WEAKREF(user)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/glasses/circuitry/dropped(mob/user)
|
||||
wearer = null
|
||||
..()
|
||||
|
||||
// Shoes
|
||||
/obj/item/clothing/shoes/circuitry
|
||||
name = "electronic boots"
|
||||
@@ -141,6 +163,14 @@
|
||||
setup_integrated_circuit(/obj/item/electronic_assembly/clothing/small)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/shoes/circuitry/equipped(mob/user, slot)
|
||||
wearer = WEAKREF(user)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/shoes/circuitry/dropped(mob/user)
|
||||
wearer = null
|
||||
..()
|
||||
|
||||
// Head
|
||||
/obj/item/clothing/head/circuitry
|
||||
name = "electronic headwear"
|
||||
@@ -154,6 +184,14 @@
|
||||
setup_integrated_circuit(/obj/item/electronic_assembly/clothing/small)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/head/circuitry/equipped(mob/user, slot)
|
||||
wearer = WEAKREF(user)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/head/circuitry/dropped(mob/user)
|
||||
wearer = null
|
||||
..()
|
||||
|
||||
// Ear
|
||||
/obj/item/clothing/ears/circuitry
|
||||
name = "electronic earwear"
|
||||
@@ -165,8 +203,18 @@
|
||||
|
||||
/obj/item/clothing/ears/circuitry/Initialize(mapload)
|
||||
setup_integrated_circuit(/obj/item/electronic_assembly/clothing/small)
|
||||
var/obj/item/integrated_circuit/built_in/earpiece_speaker/built_in_speaker = new(IC)
|
||||
IC.force_add_circuit(built_in_speaker)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/ears/circuitry/equipped(mob/user, slot)
|
||||
wearer = WEAKREF(user)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/ears/circuitry/dropped(mob/user)
|
||||
wearer = null
|
||||
..()
|
||||
|
||||
// Exo-slot
|
||||
/obj/item/clothing/suit/circuitry
|
||||
name = "electronic chestpiece"
|
||||
@@ -179,3 +227,11 @@
|
||||
/obj/item/clothing/suit/circuitry/Initialize(mapload)
|
||||
setup_integrated_circuit(/obj/item/electronic_assembly/clothing/large)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/suit/circuitry/equipped(mob/user, slot)
|
||||
wearer = WEAKREF(user)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/suit/circuitry/dropped(mob/user)
|
||||
wearer = null
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user