Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sign language as a secondary language option for all. #8299

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions code/modules/mob/hear_say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,16 @@
return

if(say_understands(speaker, language))
message = "<B>[src]</B> [verb], \"[message]\""
message = "<span class='game say'><span class='name'>[src]</span> [verb], <span class='message'><span class='body'>\"[message]\"</span></span></span>"
else
message = "<B>[src]</B> [verb]."
message = "<span class='game say'><span class='name'>[src]</span> [verb] with their hands, but you don't understand.</span>"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Span class 'name'?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.bold, .name, .prefix, .ooc, .looc, .adminooc, .adminlooc, .admin, .gfartooc, .gfartlooc, .gfartadmin, .mentorooc, .mentorlooc, .medal {font-weight: bold;}

the .name class just makes it bold, and is consistent with the way the output of the hear_say proc is formatted.


if(src.status_flags & PASSEMOTES)
for(var/obj/item/weapon/holder/H in src.contents)
H.show_message(message)
H.show_message(message, 1)
for(var/mob/living/M in src.contents)
M.show_message(message)
src.show_message(message)
M.show_message(message, 1)
src.show_message(message, 1)

/mob/proc/hear_sleep(var/message)
var/heard = ""
Expand Down
9 changes: 9 additions & 0 deletions code/modules/mob/language.dm
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,15 @@
key = "3"
syllables = list ("gra","ba","ba","breh","bra","rah","dur","ra","ro","gro","go","ber","bar","geh","heh", "gra")

/datum/language/sign
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be set so that it does not work on radio.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood, I'll get that sorted :)

name = "Sign Language"
desc = "A non-verbal form of communication that utilizes hand gestures to form words and meanings."
speech_verb = "signs"
signlang_verb = list("signs", "gestures")
colour = "say_quote"
key = "~"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tried to use ~ as a key before, and if memory serves, it does not work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I was sure that it worked when I tested it on a local server instance, but I'm happy to change this to a different character. Any recommendations? all the good characters seem to be in use already :/

I did originally try to use :si , as other languages seemed to have two character codes, but it just outputted to the security channel.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Frankly, almost all of the keys are taken, and double-letter keys don't work.

You might be better off making it a 'spell' (ie: giving it its own HUD icon). Not sure if this will be popular, but it is one method to get around the key requirement.

Alternatively, you could find an existing key that is never used, remove it, and re-purpose its key for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Further testing on my local server seems to suggest ~ is working, at least for me. Even if it doesn't, you can still switch to using sign using the language button on the hud.

If i have the time, I might look into seeing if I can fix double-letter keys not working and submit that as a separate PR, that would open up a lot more combinations for future use.

flags = SIGNLANG | NO_STUTTER

/datum/language/clown
name = "Clownish"
desc = "The language of clown planet. Mother tongue of clowns throughout the Galaxy."
Expand Down
20 changes: 18 additions & 2 deletions code/modules/mob/living/say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,24 @@ proc/get_radio_key_from_channel(var/channel)
return 1

/mob/living/proc/say_signlang(var/message, var/verb="gestures", var/datum/language/language)
for(var/mob/O in viewers(src, null))
O.hear_signlang(message, verb, language, src)
if(restrained())
to_chat(src, "<span class='danger'>You're restrained and cannot sign!</span>")
return

if(ishuman(src))
var/mob/living/carbon/human/C = src
var/obj/item/organ/external/rhand = C.bodyparts_by_name["r_hand"]
var/obj/item/organ/external/lhand = C.bodyparts_by_name["l_hand"]
if((!rhand || !rhand.is_usable() || rhand.is_broken()) || (!lhand || !lhand.is_usable() || lhand.is_broken()))
to_chat(src, "<span class='warning'>You try to use your hand to sign, but you can't!</span>")
return

for(var/mob/M in get_mobs_in_view(7, src))
if(M.see_invisible < invisibility)
Copy link
Contributor

@Kyep Kyep Oct 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Under what circumstances would an invisible mob be trying to communicate using sign language? Seems to be a little pointless. Ghosts cannot use this language, can they?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still have that cloaking device? The one that makes you completely invisible? I know SS13 used to have something like that. I abused the shit out of it along with shield.

Also any mob (read: antag) who can phase out of reality on command

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I included that check to be consistent with how the visible_message proc worked, as that was the recommended way to output sight-based messages, but I didn't end up using that proc because it doesn't do any language checks because it's usually outputting descriptions of actions seen, and opted to use the already existing "say_signlang" proc.

The intention would be that if any effects in-game currently or added in the future, make use of the invisbility flags, this will cover it. Might as well use those flags if they are present, and relevant.

continue
M.hear_signlang(message, verb, language, src)

log_say("[name]/[key] : [message]")
return 1

/obj/effect/speech_bubble
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/silicon/ai/ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ var/list/ai_verbs_default = list(
add_language("Sol Common", 1)
add_language("Tradeband", 1)
add_language("Gutter", 0)
add_language("Sign Language", 0)
add_language("Sinta'unathi", 0)
add_language("Siik'tajr", 0)
add_language("Canilunzt", 0)
Expand Down
2 changes: 2 additions & 0 deletions code/modules/mob/living/silicon/pai/software_modules.dm
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@
user.add_language("Bubblish")
user.add_language("Orluum")
user.add_language("Clownish")
user.add_language("Sign Language")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this allow borgs to speak this language?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll double check that, but my intention was for it not to. I did a check to see if the person signing has both hand "organs", but looking at it, it's only checking for ishuman() for that. I'll fix that and test further.

I'm thinking I should probably put a check in for both hands being empty also while i'm at it.

else
user.remove_language("Sinta'unathi")
user.remove_language("Siik'tajr")
Expand All @@ -643,6 +644,7 @@
user.remove_language("Bubblish")
user.remove_language("Orluum")
user.remove_language("Clownish")
user.remove_language("Sign Language")

/datum/pai_software/translator/is_active(mob/living/silicon/pai/user)
return user.translator_on
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/silicon/robot/robot_modules.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
R.add_language("Sol Common", 1)
R.add_language("Tradeband", 1)
R.add_language("Gutter", 0)
R.add_language("Sign Language", 0)
R.add_language("Sinta'unathi", 0)
R.add_language("Siik'tajr", 0)
R.add_language("Canilunzt", 0)
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/simple_animal/bot/bot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
add_language("Sol Common", 1)
add_language("Tradeband", 1)
add_language("Gutter", 1)
add_language("Sign Language", 1)
add_language("Trinary", 1)
default_language = all_languages["Galactic Common"]

Expand Down