Saycode Overhaul -- Multilingualism (#6956)

* Port ParadiseSS13/Paradise#2100 - Saycode refactor

* Removed unused old carbon slimes code

* Port ParadiseSS13/Paradise#5099 - Saycode part 2

* Ported ParadiseSS13/Paradise#7170's /datum/browser Check Known Languages

* Port ParadiseSS13/Paradise#9240 - Get rid of alt_name in favor of GetAltName()

* Port ParadiseSS13/Paradise#10330 - You can now use multiple languages in one message

* Addressed Atermonera's review.

Translators now print the full message if they find any languages within the
message that the user doesn't understand, minus languages it cannot translate.

Additionally, the combine_message proc has been significantly simplified
by eliminating an ugly tree structure with the help of a little helper
proc.

The removal of the extra span inside each piece doesn't seem to have
visually changed the messages in any other way than changing where the
wordwrap happens, strangely enough. Must be something in IE's code being
picky about invisible elements. On the bright side, it splits *later*
than it did before, thus reducing the lines a message will take up by a
tiny amount.

Also, a bunch of things now have the 'filter_say' class from
PolarisSS13/Polaris#6998. Since span classes with no definition are
totally valid and just don't do anything, this PR does **not** depend on
that PR being merged first.

* Always gotta be one
This commit is contained in:
ShadowLarkens
2020-04-20 01:11:53 -07:00
committed by GitHub
parent 1ed5556b8f
commit 54a8a5823d
72 changed files with 1338 additions and 3284 deletions

View File

@@ -155,11 +155,11 @@
master.receive_signal()
return 1
/obj/item/device/assembly_holder/hear_talk(mob/living/M as mob, msg, verb, datum/language/speaking)
/obj/item/device/assembly_holder/hear_talk(mob/M, list/message_pieces, verb)
if(a_right)
a_right.hear_talk(M,msg,verb,speaking)
a_right.hear_talk(M, message_pieces, verb)
if(a_left)
a_left.hear_talk(M,msg,verb,speaking)
a_left.hear_talk(M, message_pieces, verb)
/obj/item/device/assembly_holder/timer_igniter
name = "timer-igniter assembly"

View File

@@ -7,7 +7,8 @@
var/listening = 0
var/recorded //the activation message
/obj/item/device/assembly/voice/hear_talk(mob/living/M as mob, msg)
/obj/item/device/assembly/voice/hear_talk(mob/M, list/message_pieces, verb)
var/msg = multilingual_to_message(message_pieces)
if(listening)
recorded = msg
listening = 0