mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 17:52:36 +00:00
## About The Pull Request **Alternate title: "Fix blind people getting so blind they become deaf when going down a flight of stairs"** So 'bout half a week to a week ago I overheard a friend complaining about blind people not seeing runechat on lower multi-z levels. Asked a bit, apparently they'd reported this about half a year ago, and it's still an issue. So in my never-ending hubris I decided to just go and fix it! Now, admittedly? I really _really_ do not get the rendering system we use. The simple options were right out: we can't allow the fullscreens plane to be offset, as this causes issues with looking up/down, or disallow runechat from being offset, which causes issues with runechat from other levels. After poking our very cool and smart rendering guy several times over the course of the last week, this is what we got to: ### The technical bits We simply make the rendering relays for non-offsetting plane masters point to the highest rendering plane that matches the target. We do this by offsetting the rendering relays in place, by adjusting their plane and layer values to match the new offset, with a new `offset_relays_in_place(new_offset)` proc called in `/datum/plane_master_group/proc/transform_lower_turfs(...)`. Importantly, we compare the current layer values to what they should've been, so we don't accidentally override relays with custom-set layers. This fixes our issue (as tested on wawastation): <details> <summary>Images</summary>    </details> ## Why It's Good For The Game Fixes #80376. ## Changelog 🆑 fix: You can see runechat above fullscreen overlays on lower multi-z levels again. Rejoice, blind players. Please report any weird rendering layering issues. /🆑
17 lines
642 B
Plaintext
17 lines
642 B
Plaintext
/// Whether or not to toggle multiz parallax, the parallax effect for lower z-levels.
|
|
/datum/preference/toggle/multiz_parallax
|
|
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
|
savefile_key = "multiz_parallax"
|
|
savefile_identifier = PREFERENCE_PLAYER
|
|
|
|
/datum/preference/toggle/multiz_parallax/apply_to_client(client/client, value)
|
|
// Update the plane master group's Z transforms.
|
|
|
|
var/datum/hud/my_hud = client.mob?.hud_used
|
|
if(!my_hud)
|
|
return
|
|
|
|
for(var/group_key as anything in my_hud.master_groups)
|
|
var/datum/plane_master_group/group = my_hud.master_groups[group_key]
|
|
group.build_planes_offset(my_hud, my_hud.current_plane_offset)
|