From 498665f0f4a3e3541cfd859154ae428e7f8f0399 Mon Sep 17 00:00:00 2001
From: Holoo <38228316+Holoo-1@users.noreply.github.com>
Date: Thu, 30 Jan 2025 14:22:07 +0200
Subject: [PATCH] Fixes broken shadows on 516 (#89280)
## About The Pull Request
Bandaid fix of broken shadows on 516.
Renamed refresh button to rebuild for consistency in plane debugger
(Edit/Dubug-Planes).
Rebuild now also reapplies parallax, so it will not be turned off after
rebuild.
Closes #89230
## Why It's Good For The Game
faster 516 adoption
## Changelog
:cl:
fix: fixed shadows on 516
/:cl:
---
code/_onclick/hud/rendering/plane_master_group.dm | 9 +++++----
code/modules/admin/verbs/plane_debugger.dm | 2 +-
tgui/packages/tgui/interfaces/PlaneMasterDebug.tsx | 10 +++++-----
3 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/code/_onclick/hud/rendering/plane_master_group.dm b/code/_onclick/hud/rendering/plane_master_group.dm
index 4bed46f983f..52d56cfad63 100644
--- a/code/_onclick/hud/rendering/plane_master_group.dm
+++ b/code/_onclick/hud/rendering/plane_master_group.dm
@@ -51,15 +51,15 @@
#warn Fully change default relay_loc to "1,1", rather than changing it based on client version
#endif
- if(viewing_hud.mymob?.client?.byond_version > 515)
- relay_loc = "1,1"
- rebuild_plane_masters()
-
set_hud(viewing_hud)
our_hud.master_groups[key] = src
show_hud()
build_planes_offset(our_hud, active_offset)
+ if(viewing_hud.mymob?.client?.byond_version > 515)
+ relay_loc = "1,1"
+ rebuild_plane_masters()
+
/// Well, refresh our group, mostly useful for plane specific updates
/datum/plane_master_group/proc/refresh_hud()
hide_hud()
@@ -70,6 +70,7 @@
hide_hud()
rebuild_plane_masters()
show_hud()
+ our_hud.update_parallax_pref()
build_planes_offset(our_hud, active_offset)
/// Regenerate our plane masters, this is useful if we don't have a mob but still want to rebuild. Such in the case of changing the screen_loc of relays
diff --git a/code/modules/admin/verbs/plane_debugger.dm b/code/modules/admin/verbs/plane_debugger.dm
index 1cf7d9c37a5..083703ae78b 100644
--- a/code/modules/admin/verbs/plane_debugger.dm
+++ b/code/modules/admin/verbs/plane_debugger.dm
@@ -341,7 +341,7 @@
var/list/our_planes = group.plane_masters
switch(action)
- if("refresh")
+ if("rebuild")
group.rebuild_hud()
if("reset_mob")
set_target(null)
diff --git a/tgui/packages/tgui/interfaces/PlaneMasterDebug.tsx b/tgui/packages/tgui/interfaces/PlaneMasterDebug.tsx
index 85a5a2d979f..d0b20419373 100644
--- a/tgui/packages/tgui/interfaces/PlaneMasterDebug.tsx
+++ b/tgui/packages/tgui/interfaces/PlaneMasterDebug.tsx
@@ -651,7 +651,7 @@ const DrawAbovePlane = (props) => {
-
+
>
)}
{!!enable_group_view && }
@@ -695,7 +695,7 @@ const PlaneWindow = (props) => {
-
+
>
}
>
@@ -896,7 +896,7 @@ const GroupDropdown = (props) => {
);
};
-const RefreshButton = (props) => {
+const RebuildButton = (props) => {
const { act } = useBackend();
const { no_position } = props;
@@ -906,8 +906,8 @@ const RefreshButton = (props) => {
right={no_position ? '' : '6px'}
position={no_position ? '' : 'absolute'}
icon="recycle"
- onClick={() => act('refresh')}
- tooltip="Refreshes ALL plane masters. Kinda laggy, but useful"
+ onClick={() => act('Rebuild')}
+ tooltip="Rebuilds ALL plane masters. Kinda laggy, but useful"
/>
);
};