Files
Bubberstation/code/modules/wiremod/components/bci/vox.dm
SkyratBot 0a1f06a2d1 [MIRROR] This tail refactor turned into an organ refactor. Funny how that works. [MDB IGNORE] (#14017)
* This tail refactor turned into an organ refactor. Funny how that works.

* Firstly, fixing all the conflicts.

* Fixes all our maps (hopefully)

* Actually, this should fix pod people hair :)

* Almost everything is working, just two major things to fix

* Fixed a certain kind of external organ

* Cleaning up some more stuff

* Turned tail_cat into tail because why the fuck are they separate?

* Moved all the tails into tails.dmi because that was just dumb to have like 3 in a different file

* Adds relevant_layers to organs to help with rendering

* Makes stored_feature_id also check mutant_bodyparts

* Fixes the icon_state names of ALL the tails (pain)

* Fixes wagging, gotta refactor most mutant bodyparts later on

* I Love Added Failures

* Fixed some organs that slipped through my searches

* This could possibly fix the CI for this?

* It doesn't look like it did fix it

* This will make it pass, even if it's ugly as sin.

* Fixed Felinids having a weird ghost tail

* Fixes instances of snouts and tails not being properly colored

Co-authored-by: Kapu1178 <75460809+Kapu1178@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2022-06-11 23:20:16 -04:00

60 lines
1.7 KiB
Plaintext

/**
* # VOX Announcement Component
*
* These play a VOX announcement with inputed words from either a string or a list.
* Requires a BCI shell.
*/
/obj/item/circuit_component/vox
display_name = "VOX Announcement"
desc = "A component that plays a local VOX Announcement for the user. Requires a BCI shell."
category = "BCI"
required_shells = list(/obj/item/organ/internal/cyberimp/bci)
var/datum/port/input/option/type_option
var/current_type
var/datum/port/input/word_list
circuit_flags = CIRCUIT_FLAG_INPUT_SIGNAL
var/obj/item/organ/internal/cyberimp/bci/bci
/obj/item/circuit_component/vox/populate_options()
type_option = add_option_port("VOX Type", list(PORT_TYPE_LIST(PORT_TYPE_STRING), PORT_TYPE_STRING))
/obj/item/circuit_component/vox/populate_ports()
word_list = add_input_port("Word List", PORT_TYPE_LIST(PORT_TYPE_STRING))
/obj/item/circuit_component/vox/register_shell(atom/movable/shell)
if(istype(shell, /obj/item/organ/internal/cyberimp/bci))
bci = shell
/obj/item/circuit_component/vox/unregister_shell(atom/movable/shell)
bci = null
/obj/item/circuit_component/vox/pre_input_received(datum/port/input/port)
var/current_option = type_option.value
if(current_type != current_option)
current_type = current_option
word_list.set_datatype(current_type)
/obj/item/circuit_component/vox/input_received(datum/port/input/port)
if(!bci)
return
var/mob/living/owner = bci.owner
if(!owner || !istype(owner) || !owner.client || !word_list.value)
return
if(current_type == PORT_TYPE_STRING)
var/words_list = splittext(trim(word_list.value), " ")
for(var/word in words_list)
play_vox_word(word, only_listener = owner)
else
for(var/word in word_list.value)
play_vox_word(word, only_listener = owner)