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

516 Prep #621

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/alternate_byond_versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
# Format is version: map
# Example:
# 500.1337: runtimestation
516.1648: runtimestation
2 changes: 1 addition & 1 deletion code/controllers/subsystem/blackbox.dm
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ SUBSYSTEM_DEF(blackbox)

for(var/player_key in GLOB.player_details)
var/datum/player_details/PD = GLOB.player_details[player_key]
record_feedback("tally", "client_byond_version", 1, PD.byond_version)
record_feedback("tally", "client_byond_version", 1, PD.full_byond_version())

/datum/controller/subsystem/blackbox/Shutdown()
sealed = FALSE
Expand Down
5 changes: 5 additions & 0 deletions code/controllers/subsystem/statpanel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ SUBSYSTEM_DEF(statpanels)
return

/datum/controller/subsystem/statpanels/proc/set_status_tab(client/target)
#if MIN_COMPILER_VERSION > 515
#warn 516 is most certainly out of beta, remove this beta notice if you haven't already
#endif
var/static/list/beta_notice = list("", "You are on the BYOND 516 beta, various UIs and such may be broken!", "Please report issues, and switch back to BYOND 515 if things are causing too many issues for you.")

if(!global_data)//statbrowser hasnt fired yet and we were called from immediate_send_stat_data()
return

Expand Down
12 changes: 10 additions & 2 deletions code/modules/client/client_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,18 @@
if(GLOB.player_details[ckey])
reconnecting = TRUE
player_details = GLOB.player_details[ckey]
player_details.byond_version = full_version
var/old_version = player_details.byond_version
player_details.byond_version = byond_version
player_details.byond_build = byond_build
#if MIN_COMPILER_VERSION > 516
#warn Fully change default relay_loc to "1,1", rather than changing it based on client version
#endif
if(old_version != byond_version)
rebuild_plane_masters = TRUE

Check failure on line 335 in code/modules/client/client_procs.dm

View workflow job for this annotation

GitHub Actions / Run Linters

undefined var: "rebuild_plane_masters"
else
player_details = new(ckey)
player_details.byond_version = full_version
player_details.byond_version = byond_version
player_details.byond_build = byond_build
GLOB.player_details[ckey] = player_details


Expand Down
13 changes: 11 additions & 2 deletions code/modules/client/player_details.dm
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@

///assoc list of ckey -> /datum/player_details
GLOBAL_LIST_EMPTY(player_details)
GLOBAL_LIST_EMPTY_TYPED(player_details, /datum/player_details)

/datum/player_details
var/list/player_actions = list()
var/list/logging = list()
var/list/post_login_callbacks = list()
var/list/post_logout_callbacks = list()
var/list/played_names = list() //List of names this key played under this round
var/byond_version = "Unknown"
/// Major version of BYOND this client is using.
var/byond_version
/// Build number of BYOND this client is using.
var/byond_build
var/datum/achievement_data/achievements

/datum/player_details/New(key)
achievements = new(key)

/// Returns the full version string (i.e 515.1642) of the BYOND version and build.
/datum/player_details/proc/full_byond_version()
if(!byond_version)
return "Unknown"
return "[byond_version].[byond_build || "xxx"]"

/proc/log_played_names(ckey, ...)
if(!ckey)
return
Expand Down
15 changes: 15 additions & 0 deletions html/statbrowser.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
.light:root {
--scrollbar-base: #f2f2f2;
--scrollbar-thumb: #a7a7a7;
}

.dark:root {
--scrollbar-base: #151515;
--scrollbar-thumb: #363636;
}

html,
body {
scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-base);
}

body {
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-size: 12px !important;
Expand Down
2 changes: 2 additions & 0 deletions html/statbrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -710,9 +710,11 @@ function draw_verbs(cat) {
function set_theme(which) {
if (which == "light") {
document.body.className = "";
document.documentElement.className = 'light';
set_style_sheet("browserOutput_white");
} else if (which == "dark") {
document.body.className = "dark";
document.documentElement.className = 'dark';
set_style_sheet("browserOutput");
}
}
Expand Down
1 change: 1 addition & 0 deletions tgui/packages/tgui/layouts/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { addScrollableNode, removeScrollableNode } from '../events';

export const Layout = (props) => {
const { className, theme = 'crtdefault', children, ...rest } = props;
document.documentElement.className = `theme-${theme}`;
return (
<div className={'theme-' + theme}>
<div
Expand Down
2 changes: 1 addition & 1 deletion tgui/packages/tgui/styles/interfaces/NuclearBomb.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ $background-beige: #e8e4c9;

.NuclearBomb__NTIcon {
background-image: url('../assets/bg-artea.svg');
background-size: 70%;
background-size: 70% 70%;
background-position: center;
background-repeat: no-repeat;
}
17 changes: 17 additions & 0 deletions tgui/packages/tgui/styles/layouts/Layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,26 @@

@use 'sass:color';
@use '../base.scss';
@use '../functions.scss' as *;

$luminance: luminance(base.$color-bg);
$scrollbar-color-multiplier: 1 !default;
$scrollbar-base: color.scale(
base.$color-bg,
$lightness: -33% * $scrollbar-color-multiplier
);
$scrollbar-face: color.scale(
base.$color-bg,
$lightness: if($luminance > 0.05, 30%, 10%) * $scrollbar-color-multiplier
);

// Fancy scrollbar
html,
body {
scrollbar-color: $scrollbar-face $scrollbar-base;
}

// Remove with 516, IE legacy code
.Layout,
.Layout * {
// Fancy scrollbar
Expand Down
2 changes: 1 addition & 1 deletion tgui/packages/tgui/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
// NT Theme
.Layout__content {
background-image: url('../assets/bg-artea.svg');
background-size: 70%;
background-size: 70% 70%;
background-position: center;
background-repeat: no-repeat;
}
Loading