Expanding language keys and adding mixed-language speech.#5271
Expanding language keys and adding mixed-language speech.#5271MistakeNot4892 wants to merge 1 commit into
Conversation
6ea8321 to
1c17b68
Compare
1fe1556 to
3b090d3
Compare
|
I need to do some more exhaustive testing before merge, but I think this is good for review now. |
ce8b024 to
f63c163
Compare
72f4a9f to
7df06a5
Compare
|
Binary radio headset does allow you to send different languages over binary, but that is a niche enough case that I don't want to fix it for this PR. |
c919795 to
2d92651
Compare
Rewriting/organising holopad code. Debugging/further work on mixed language speech.
2d92651 to
b86ff09
Compare
|
Last issue is that overhead text flickers and is out of place for 1 tick immediately after creation. I have no idea why, logic looks straightforward. |
out-of-phaze
left a comment
There was a problem hiding this comment.
stopped reviewing at holopad because that's gonna take a while to get through. will look into the text over head issue in the meantime
| FOR_DVIEW(var/turf/T, range, center, INVISIBILITY_MAXIMUM) | ||
| hearturfs[T] = TRUE | ||
| for(var/mob/M in T) | ||
| mobs += M | ||
| if(islist(mobs)) | ||
| for(var/mob/M in T) | ||
| mobs += M | ||
| END_FOR_DVIEW |
There was a problem hiding this comment.
a bit of code duplication but for things as hot as this it might be worth it to move the islist(mobs) check all the way out of the loop and instead have two different ones
if(islist(mobs))
FOR_DVIEW(var/turf/T, range, center, INVISIBILITY_MAXIMUM)
hearturfs[T] = TRUE
for(var/mob/M in T)
mobs += M
END_FOR_DVIEW
if(else)
FOR_DVIEW(var/turf/T, range, center, INVISIBILITY_MAXIMUM)
hearturfs[T] = TRUE
END_FOR_DVIEW
There was a problem hiding this comment.
Why? This will mean we're doing two full separate dviews.
There was a problem hiding this comment.
i must have been sleep deprived when i wrote that, else instead of if(else). only one will run at a time, we're just hoisting the check out of the loop
| else if(hearturfs[get_turf(M)]) | ||
| mobs |= M |
There was a problem hiding this comment.
hold on, won't this always be redundant because we added the mobs earlier when we set hearturfs? or is this for recursive contents given the get_turf? because in that case the virtual mobs system may work better for that kind of thing, idk
| mobs |= M | ||
|
|
||
| if(islist(objs)) | ||
| for(var/obj/O in global.listening_objects) |
There was a problem hiding this comment.
note to self: global.listening_objects_by_z could be a really good optimization here
| return trim_left(trim_right(text)) | ||
|
|
||
| /// Adds punctuation to an emote or speech message automatically. | ||
| /proc/handle_autopunctuation(message) |
There was a problem hiding this comment.
note to self: moved from code/modules/mob/say.dm
Description of changes
This was just supposed to be the keys stuff but I kinda spiralled.
,1is your first known language.,hwill match,human.Why and what will this PR improve
Mixing languages in speech is good fun for RP, and the backend changes have cleaned up, centralized a fair wodge of logic.
TODO
Issues
Animal noises are not scrambled.Type understands type, intentional.Authorship
Myself.
Changelog
TBD