mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 03:55:11 +01:00
Adds map feedback thread support (AI stat panel buff) (#90506)
This PR started with the idea of adding support for map feedback threads, which I added to the roundend report, escape menu, and stat panel. To do this though I had to make pretty annoying changes to the stat panel and had to touch every single time something to the stat panel was added, so since we now have a way to have links in the stat panel I thought of taking full advantage of it and add some QOL. AIs can now track their borgs by clicking their status on the stat panel https://github.com/user-attachments/assets/1789dc46-5d12-48e9-bb8d-d3278aa19639 With Melbert's comment, I added another stat panel entry that directs you to the Webmap page, which currently seems to be a little messed up (https://github.com/AffectedArc07/SS13WebMap/issues/41 & https://github.com/AffectedArc07/SS13WebMap/issues/42) but if they get fixed this would be a swag asf feature Feedback threads was a suggestion from a player and is fully in control of admins as an optional thing, and while we still have stat panel I think it's nice to be able to take advantage of its features. 🆑 admin: Admins can now link a URL for maps, used to give feedback on said maps. Accessible through the roundend report, escape menu, and stat panel. qol: AIs can track their borgs by clicking on them in the stat panel. qol: You can now directly go to the webmap of maps from the stat panel (assuming it's set in config). /🆑
This commit is contained in:
committed by
Shadow-Quill
parent
b1efbf09a8
commit
ea28a87ca8
@@ -106,6 +106,9 @@ SUBSYSTEM_DEF(mapping)
|
||||
if(!current_map || current_map.defaulted)
|
||||
to_chat(world, span_boldannounce("Unable to load next or default map config, defaulting to [old_config.map_name]."))
|
||||
current_map = old_config
|
||||
var/mapping_url = config.Get(/datum/config_entry/string/webmap_url)
|
||||
if(mapping_url != "")
|
||||
current_map.mapping_url = mapping_url
|
||||
plane_offset_to_true = list()
|
||||
true_to_offset_planes = list()
|
||||
plane_to_offset = list()
|
||||
@@ -958,3 +961,14 @@ ADMIN_VERB(load_away_mission, R_FUN, "Load Away Mission", "Load a specific away
|
||||
var/number_of_remaining_levels = length(checkable_levels)
|
||||
if(number_of_remaining_levels > 0)
|
||||
CRASH("The following [number_of_remaining_levels] away mission(s) were not loaded: [checkable_levels.Join("\n")]")
|
||||
|
||||
///Returns the map name, with an openlink action tied to it (if one exists) for the map.
|
||||
/datum/map_config/proc/return_map_name(webmap_included)
|
||||
var/text
|
||||
if(feedback_link)
|
||||
text = "<a href='byond://?action=openLink&link=[url_encode(feedback_link)]'>[map_name]</a>"
|
||||
else
|
||||
text = map_name
|
||||
if(webmap_included && !isnull(SSmapping.current_map.mapping_url))
|
||||
text += " | <a href='byond://?action=openWebMap'>(Show Map)</a>"
|
||||
return text
|
||||
|
||||
@@ -22,14 +22,25 @@ SUBSYSTEM_DEF(statpanels)
|
||||
num_fires++
|
||||
var/datum/map_config/cached = SSmap_vote.next_map_config
|
||||
/* SKYRAT EDIT CHANGE
|
||||
global_data = list(
|
||||
"Map: [SSmapping.current_map?.map_name || "Loading..."]",
|
||||
cached ? "Next Map: [cached.map_name]" : null,
|
||||
if(isnull(SSmapping.current_map))
|
||||
global_data = list("Loading")
|
||||
else if(SSmapping.current_map.feedback_link)
|
||||
global_data = list(list("Map: [SSmapping.current_map.map_name]", " (Feedback)", "action=openLink&link=[SSmapping.current_map.feedback_link]"))
|
||||
else
|
||||
global_data = list("Map: [SSmapping.current_map?.map_name]")
|
||||
|
||||
if(SSmapping.current_map?.mapping_url)
|
||||
global_data += list(list("same_line", " | (View in Browser)", "action=openWebMap"))
|
||||
|
||||
if(cached)
|
||||
global_data += "Next Map: [cached.map_name]"
|
||||
|
||||
global_data += list(
|
||||
"Round ID: [GLOB.round_id ? GLOB.round_id : "NULL"]",
|
||||
"Server Time: [time2text(world.timeofday, "YYYY-MM-DD hh:mm:ss", world.timezone)]",
|
||||
"Round Time: [ROUND_TIME()]",
|
||||
"Station Time: [station_time_timestamp()]",
|
||||
"Time Dilation: [round(SStime_track.time_dilation_current,1)]% AVG:([round(SStime_track.time_dilation_avg_fast,1)]%, [round(SStime_track.time_dilation_avg,1)]%, [round(SStime_track.time_dilation_avg_slow,1)]%)"
|
||||
"Time Dilation: [round(SStime_track.time_dilation_current,1)]% AVG:([round(SStime_track.time_dilation_avg_fast,1)]%, [round(SStime_track.time_dilation_avg,1)]%, [round(SStime_track.time_dilation_avg_slow,1)]%)",
|
||||
)
|
||||
*/
|
||||
var/round_time = world.time - SSticker.round_start_time
|
||||
@@ -123,6 +134,15 @@ SUBSYSTEM_DEF(statpanels)
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/*
|
||||
* send_message for the stat panel can be sent 1 of 4 things:
|
||||
* 1- A string entry, to show up as plain text.
|
||||
* 2- An empty string (""), which will translate to a new line, to for a break between lines.
|
||||
* 3- a list, in which the first entry is plain text, the second entry is highlighted text, and the third entry is a link
|
||||
* that clicking the second entry will take you to.
|
||||
* 4- a list with "same_line" as the first entry, which will automatically put it on the line above it,
|
||||
* with the second/third entry matching #3 (text & url), allowing you to have 2 clickable links on one line.
|
||||
*/
|
||||
/datum/controller/subsystem/statpanels/proc/set_status_tab(client/target)
|
||||
if(!global_data)//statbrowser hasnt fired yet and we were called from immediate_send_stat_data()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user