|
47 | 47 | stack_trace("Hey brother, our key [key] is already in use by a plane master group on the passed in hud, belonging to [viewing_hud.mymob]. Ya fucked up, why are there dupes") |
48 | 48 | return |
49 | 49 |
|
| 50 | +#if MIN_COMPILER_VERSION > 516 |
| 51 | + #warn Fully change default relay_loc to "1,1", rather than changing it based on client version |
| 52 | +#endif |
| 53 | + |
50 | 54 | set_hud(viewing_hud) |
51 | 55 | our_hud.master_groups[key] = src |
52 | 56 | show_hud() |
53 | 57 | transform_lower_turfs(our_hud, active_offset) |
54 | 58 |
|
| 59 | + if(viewing_hud.mymob?.client?.byond_version > 515) |
| 60 | + relay_loc = "1,1" |
| 61 | + rebuild_plane_masters() |
| 62 | + |
55 | 63 | /// Well, refresh our group, mostly useful for plane specific updates |
56 | 64 | /datum/plane_master_group/proc/refresh_hud() |
57 | 65 | hide_hud() |
|
62 | 70 | hide_hud() |
63 | 71 | rebuild_plane_masters() |
64 | 72 | show_hud() |
| 73 | + our_hud.update_parallax_pref() |
65 | 74 | transform_lower_turfs(our_hud, active_offset) |
66 | 75 |
|
67 | 76 | /// 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 |
|
183 | 192 | /// If you wanna try someday feel free, but I can't manage it |
184 | 193 | /datum/plane_master_group/popup |
185 | 194 |
|
186 | | -/// This is janky as hell but since something changed with CENTER positioning after build 1614 we have to switch to the bandaid LEFT,TOP positioning |
187 | | -/// using LEFT,TOP *at* or *before* 1614 will result in another broken offset for cameras |
188 | | -#define MAX_CLIENT_BUILD_WITH_WORKING_SECONDARY_MAPS 1614 |
189 | | - |
| 195 | +/// Note do not use return ..() because it will cause client crush when screen gets deleted |
| 196 | +/// TOOD: Remove this entirely when 516 is stable |
190 | 197 | /datum/plane_master_group/popup/attach_to(datum/hud/viewing_hud) |
191 | | - // If we're about to display this group to a mob who's client is more recent than the last known version with working CENTER, then we need to remake the relays |
192 | | - // with the correct screen_loc using the relay override |
193 | | - if(viewing_hud.mymob?.client?.byond_build > MAX_CLIENT_BUILD_WITH_WORKING_SECONDARY_MAPS) |
194 | | - relay_loc = "LEFT,TOP" |
195 | | - rebuild_plane_masters() |
196 | | - return ..() |
197 | | - |
198 | | -#undef MAX_CLIENT_BUILD_WITH_WORKING_SECONDARY_MAPS |
| 198 | + if(viewing_hud.master_groups[key]) |
| 199 | + stack_trace("[key] is already in use by a plane master group on the passed in hud, belonging to [viewing_hud.mymob]!") |
| 200 | + return |
| 201 | + relay_loc = "1,1" |
| 202 | + rebuild_plane_masters() |
| 203 | + set_hud(viewing_hud) |
| 204 | + show_hud() |
199 | 205 |
|
200 | 206 | /datum/plane_master_group/popup/transform_lower_turfs(datum/hud/source, new_offset, use_scale = TRUE) |
201 | 207 | return ..(source, new_offset, FALSE) |
|
0 commit comments