Files
Bubberstation/code/datums/wires/wire_bundle_component.dm
Y0SH1M4S73RandGitHub 17f597a2e8 Adds the circuit implant (#95023)
## About The Pull Request

The circuit implant is, as the name suggests, an implant that can
contain an integrated circuit. It's similar in concept to the BCI, but
differs from it in the following ways:
- Has a capacity of 12 components, compared to the BCI's 25
- Can be inserted into basic mobs
- Does not set off Body Purists' disdain for cybernetics
- Cannot use the target interceptor, thought listener, or overlay
components
- Cannot force the user to speak/emote - the speech component simply
makes the implant itself speak like it does in other shells

The circuit implant can be printed from the component printer upon
researching advanced shells. Only one circuit implant can be inserted
into a mob at once.

As a little code standardization bonus, implant case interaction has
been refactored into an `item_interaction`.

## Why It's Good For The Game

Implants seem like an interesting way for circuits to be utilized. Not
only do they provide a body-purist-friendly way to have an internal
circuit, they also give most basic mobs a way to interact with the
circuit ecosystem. Additionally, them being implants implantable with an
implanter provides an easier method for a circuit to be forced upon
someone in a way that isn't as easy to remove as just dropping the item.
2026-02-19 01:04:46 +00:00

28 lines
942 B
Plaintext

#define CAPACITY_PER_WIRE 10
/datum/wires/wire_bundle_component
holder_type = /atom //Anything that can have a shell component, really.
randomize = TRUE
wire_behavior = WIRES_ALL
/datum/wires/wire_bundle_component/New(atom/holder)
var/datum/component/shell/shell_comp = holder.GetComponent(/datum/component/shell)
if(!istype(shell_comp))
CRASH("Holder does not have a shell component!")
var/wire_count = clamp(round(shell_comp.capacity / CAPACITY_PER_WIRE, 1), 1, MAX_WIRE_COUNT)
for(var/index in 1 to wire_count)
LAZYADD(wires, "Port [index]")
..()
/datum/wires/wire_bundle_component/always_reveal_wire(color)
return TRUE // Let's not make wiring up this stuff confusing - just give them what wires correspond to what ports.
/datum/wires/wire_bundle_component/ui_data(mob/user)
proper_name = holder.name
. = ..()
/datum/wires/wire_bundle_component/ui_host(mob/user)
return holder.ui_host(user)
#undef CAPACITY_PER_WIRE