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

updates statbrowser stuff #7716

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
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
12 changes: 12 additions & 0 deletions code/modules/asset_cache/asset_list.dm
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,18 @@ GLOBAL_LIST_EMPTY(asset_datums)
CRASH("generate() not implemented for [type]!")


/datum/asset/css
_abstract = /datum/asset/css

/// The name of the stylesheet
var/name

/datum/asset/css/send(client)
return SSassets.transport.send_assets(client, "[name].css")

/datum/asset/css/register()


/datum/asset/changelog_item
_abstract = /datum/asset/changelog_item
var/item_filename
Expand Down
27 changes: 27 additions & 0 deletions code/modules/asset_cache/assets/sevastopol.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/datum/asset/simple/namespaced/sevastopol
assets = list(
"sevastopol_interface.woff2" = file("tgui/packages/sevastopol/sevastopol_interface.woff2"),
"sevastopol_interface.ttf" = file("tgui/packages/sevastopol/sevastopol_interface.ttf")
)
parents = list(
"sevastopol.css" = file("tgui/packages/sevastopol/sevastopol.css")
)

/datum/asset/simple/namespaced/chakrapetch
assets = list(
"chakrapetch-bold.woff2" = file("tgui/packages/chakrapetch/chakrapetch-bold.woff2"),
"chakrapetch-bold.ttf" = file("tgui/packages/chakrapetch/chakrapetch-bold.ttf"),
"chakrapetch-regular.woff2" = file("tgui/packages/chakrapetch/chakrapetch-regular.woff2"),
"chakrapetch-regular.ttf" = file("tgui/packages/chakrapetch/chakrapetch-regular.ttf"),
)
parents = list(
"chakrapetch.css" = file("tgui/packages/chakrapetch/chakrapetch.css")
)

/datum/asset/simple/namespaced/monofonto
assets = list(
"monofonto.ttf" = file("tgui/packages/monofonto/monofonto.ttf")
)
parents = list(
"monofonto.css" = file("tgui/packages/monofonto/monofonto.css")
)
8 changes: 7 additions & 1 deletion code/modules/client/client_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,12 @@ GLOBAL_LIST_INIT(whitelisted_client_procs, list(

// Initialize tgui panel
stat_panel.initialize(
assets = list(
get_asset_datum(/datum/asset/simple/namespaced/fontawesome),
get_asset_datum(/datum/asset/simple/namespaced/sevastopol),
get_asset_datum(/datum/asset/simple/namespaced/chakrapetch),
get_asset_datum(/datum/asset/simple/namespaced/monofonto),
),
inline_html = file("html/statbrowser.html"),
inline_js = file("html/statbrowser.js"),
inline_css = file("html/statbrowser.css"),
Expand Down Expand Up @@ -421,7 +427,7 @@ GLOBAL_LIST_INIT(whitelisted_client_procs, list(
apply_clickcatcher()

if(prefs.lastchangelog != GLOB.changelog_hash) //bolds the changelog button on the interface so we know there are updates.
winset(src, "infowindow.changelog", "background-color=#ED9F9B;font-style=bold")
stat_panel.send_message("changelog_read", FALSE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
stat_panel.send_message("changelog_read", FALSE)
stat_panel.send_message("changelog_read", FALSE)

I don't really like big bold buttons that have to be pressed to go away personally and other people with adhd or otherwise might find it annoying as well, either remove it or make it a preference imo


update_fullscreen()

Expand Down
4 changes: 2 additions & 2 deletions code/modules/cm_marines/specialist.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

// Spec verb macros
/mob/living/carbon/human/verb/spec_activation_one()
set category = "Specialist"
set category = null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
set category = null

set name = "Specialist Activation One"
set hidden = TRUE

Expand All @@ -25,7 +25,7 @@
SA.handle_spec_macro()

/mob/living/carbon/human/verb/spec_activation_two()
set category = "Specialist"
set category = null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
set category = null

set name = "Specialist Activation Two"
set hidden = TRUE

Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/new_player/login.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
lobby_window.initialize(
assets = list(
get_asset_datum(/datum/asset/simple/tgui),
get_asset_datum(/datum/asset/simple/namespaced/chakrapetch)
)
)

Expand Down
1 change: 1 addition & 0 deletions colonialmarines.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1555,6 +1555,7 @@
#include "code\modules\asset_cache\assets\icon_ref_map.dm"
#include "code\modules\asset_cache\assets\lobby.dm"
#include "code\modules\asset_cache\assets\medals.dm"
#include "code\modules\asset_cache\assets\sevastopol.dm"
#include "code\modules\asset_cache\assets\tgfont.dm"
#include "code\modules\asset_cache\assets\tgui.dm"
#include "code\modules\asset_cache\assets\vending.dm"
Expand Down
Loading
Loading