mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 11:36:24 +01:00
Speech Components are now Multilingual (#4018)
## About The Pull Request You can now define a language for speech components to output in. They are no longer limited to just outputting strings in Galactic Common. This does not give access to ALL languages, for example Codespeak, Cultspeak and Ashtongue, so you will still need to earn the privilege to speak in those languages. ## Why It's Good For The Game Many people complained that speech components could only output in Galactic Common. This PR will make them happy. Speech components are most often used for Universal Translator Circuits, this PR will actually make them useful for such and allow for two way communication between individuals if the circuit is made correctly. ## Proof Of Testing It compiles and the valid languages were able to be observed while using the speech component. <details> <summary>Screenshots/Videos</summary>      </details> ## Changelog 🆑 add: Language Port to Speech Components /🆑 ## Acknowledgements Thank you very much to Artur for helping me make the list which was a pivotal part of this PR. I was tearing my hair out trying to make it. They saved me much time and hair.
This commit is contained in:
@@ -9,8 +9,6 @@
|
||||
category = "Action"
|
||||
circuit_flags = CIRCUIT_FLAG_INPUT_SIGNAL|CIRCUIT_FLAG_OUTPUT_SIGNAL
|
||||
|
||||
/// Spans to apply to the output message.
|
||||
var/datum/port/input/color_input // BUBBER ADDITION
|
||||
/// The message to send
|
||||
var/datum/port/input/message
|
||||
/// The quiet mode flag
|
||||
@@ -24,7 +22,6 @@
|
||||
. += create_ui_notice("Speech Cooldown: [DisplayTimeText(speech_cooldown)]", "orange", "stopwatch")
|
||||
|
||||
/obj/item/circuit_component/speech/populate_ports()
|
||||
color_input = add_input_port("Color", PORT_TYPE_STRING, default = "Default") // BUBBER ADDITION
|
||||
message = add_input_port("Message", PORT_TYPE_STRING, trigger = null)
|
||||
quietmode = add_input_port("Quiet Mode", PORT_TYPE_NUMBER, default = 0)
|
||||
|
||||
@@ -35,12 +32,7 @@
|
||||
if(TIMER_COOLDOWN_RUNNING(parent.shell, COOLDOWN_CIRCUIT_SPEECH))
|
||||
return
|
||||
|
||||
// BUBBER ADDITION
|
||||
if(!(color_input.value in GLOB.component_span_color_list))
|
||||
color_input.set_value("Default", TRUE)
|
||||
// BUBBER ADDITION END
|
||||
|
||||
if(message.value)
|
||||
var/atom/movable/shell = parent.shell
|
||||
shell.say(message.value, forced = "circuit speech | [parent.get_creator()]", message_range = quietmode.value > 0 ? WHISPER_RANGE : MESSAGE_RANGE, spans = list(GLOB.component_span_color_list[color_input.value])) // BUBBER EDIT
|
||||
shell.say(message.value, forced = "circuit speech | [parent.get_creator()]", message_range = quietmode.value > 0 ? WHISPER_RANGE : MESSAGE_RANGE)
|
||||
TIMER_COOLDOWN_START(shell, COOLDOWN_CIRCUIT_SPEECH, speech_cooldown)
|
||||
|
||||
Reference in New Issue
Block a user