Swags out the roundstart report (#95149)

## About The Pull Request

The roundstart report has been dripped out with a logo and some
additional flavor

<img width="585" height="916" alt="image"
src="https://github.com/user-attachments/assets/d0dab027-24e4-4d4a-a5ad-59616b3bf33d"
/>

The flavor messages are just some randomly selected lore tidbits or
filler text

Other changes:

- Paper now updates to your writing implement immediately, rather than
on process ticks.
- Adds a config to hide the dynamic report for cutting down the length
of the roundstart report. Disabled by default
- Footnotes now requires `R_FUN` rather than `R_ADMIN`

## Why It's Good For The Game

Makes the command report look a ton more official while introducing some
fun worldbuilding.

## Changelog

🆑 Melbert
qol: Paper UI now updates immediately when you pick up or drop a writing
tool.
qol: The roundstart command report has had its style updated, and now
contains some bonus lore.
admin: Changes the perms needed to add command report footnotes to "Fun"
rather than "Admin"
admin: Adds a verb for changing the command report main contents
(Requiring "Fun")
config: Adds a config for hiding the dynamic report, disabled by default
(disabled meaning you still get the report)
/🆑
This commit is contained in:
MrMelbert
2026-02-20 20:54:36 -05:00
committed by GitHub
parent f2c9396f94
commit e9d964789b
16 changed files with 315 additions and 59 deletions
+91 -24
View File
@@ -66,6 +66,9 @@
///If this paper can be selected as a candidate for a future message in a bottle when spawned outside of mapload. Doesn't affect manually doing that.
var/can_become_message_in_bottle = TRUE
/// Assoc Lazylist of REF()s to mobs that are viewing the paper while holding a writing tool to what that tool's writing implement details are
VAR_FINAL/list/writers
/obj/item/paper/Initialize(mapload)
. = ..()
pixel_x = base_pixel_x + rand(-9, 9)
@@ -507,7 +510,8 @@
/obj/item/paper/ui_assets(mob/user)
return list(
get_asset_datum(/datum/asset/spritesheet/simple/paper),
get_asset_datum(/datum/asset/spritesheet/simple/stamps),
get_asset_datum(/datum/asset/simple/logos),
)
/obj/item/paper/ui_interact(mob/user, datum/tgui/ui)
@@ -515,8 +519,93 @@
return
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
/**
* these signals are for checking whether the ui viewer is holding a writing tool.
* (whether they are holding a writing tool matters for the state of the ui)
*
* we have to do this rigamarole, rather than just checking on ui_data calls,
* because if we set this ui to autoupdate, it causes weird rendering issues.
* rather than figure out why those are happening, it was easier to just turn off autoupdate.
*/
RegisterSignals(user, list(
COMSIG_MOB_UNEQUIPPED_ITEM,
COMSIG_MOB_EQUIPPED_ITEM,
COMSIG_MOB_SWAP_HANDS,
COMSIG_MOB_TRANSFORMING_ITEM, // specifically for pens
), PROC_REF(viewer_writing_state_change))
var/list/writing_info = get_viewer_writing_implement_details(user)
if(writing_info)
add_writer(user, writing_info, update = FALSE)
ui = new(user, src, "PaperSheet", name)
ui.open()
// please see the above comment if you want to re-enable autoupdate
ui.set_autoupdate(FALSE)
/obj/item/paper/ui_close(mob/user)
. = ..()
if(LAZYACCESS(writers, REF(user)))
remove_writer(user, update = FALSE)
UnregisterSignal(user, list(
COMSIG_MOB_UNEQUIPPED_ITEM,
COMSIG_MOB_EQUIPPED_ITEM,
COMSIG_MOB_SWAP_HANDS,
COMSIG_MOB_TRANSFORMING_ITEM,
))
/// Generically check if we are holding a writing tool to update our writer status
/obj/item/paper/proc/viewer_writing_state_change(mob/living/source)
SIGNAL_HANDLER
var/list/writing_info = get_viewer_writing_implement_details(source)
if(writing_info)
if(!LAZYACCESS(writers, REF(source)))
add_writer(source, writing_info)
else
if(LAZYACCESS(writers, REF(source)))
remove_writer(source)
/// Add passed mob with passed writing info to the list of writers, then updates their ui
/obj/item/paper/proc/add_writer(mob/living/user, list/writing_info, update = TRUE)
PRIVATE_PROC(TRUE)
set waitfor = FALSE
LAZYSET(writers, REF(user), writing_info)
if(update)
ui_interact(user)
/// Remove passed mob from the list of writers, then updates their ui
/obj/item/paper/proc/remove_writer(mob/living/user, update = TRUE)
PRIVATE_PROC(TRUE)
set waitfor = FALSE
LAZYREMOVE(writers, REF(user))
if(update)
ui_interact(user)
/obj/item/paper/proc/get_viewer_writing_implement_details(mob/living/user)
if(istype(loc, /obj/structure/noticeboard))
var/obj/structure/noticeboard/noticeboard = loc
if(!noticeboard.allowed(user))
return null
var/obj/item/holding = user.get_active_held_item()
. = holding?.get_writing_implement_details()
// Use a clipboard's pen, if applicable
if(istype(loc, /obj/item/clipboard))
var/obj/item/clipboard/clipboard = loc
. ||= clipboard.pen?.get_writing_implement_details()
return .
/obj/item/paper/ui_data(mob/user)
var/list/data = list()
data["held_item_details"] = LAZYACCESS(writers, REF(user))
return data
/obj/item/paper/ui_static_data(mob/user)
var/list/static_data = list()
@@ -532,7 +621,7 @@
static_data["default_pen_color"] = COLOR_BLACK
static_data["signature_font"] = FOUNTAIN_PEN_FONT
return static_data;
return static_data
/obj/item/paper/proc/convert_to_data()
var/list/data = list()
@@ -571,28 +660,6 @@
name = data[LIST_PAPER_NAME]
/obj/item/paper/ui_data(mob/user)
var/list/data = list()
var/obj/item/holding = user.get_active_held_item()
// Use a clipboard's pen, if applicable
if(istype(loc, /obj/item/clipboard))
var/obj/item/clipboard/clipboard = loc
// This is just so you can still use a stamp if you're holding one. Otherwise, it'll
// use the clipboard's pen, if applicable.
if(!istype(holding, /obj/item/stamp) && clipboard.pen)
holding = clipboard.pen
data["held_item_details"] = holding?.get_writing_implement_details()
// If the paper is on an unwritable noticeboard, clear the held item details so it's read-only.
if(istype(loc, /obj/structure/noticeboard))
var/obj/structure/noticeboard/noticeboard = loc
if(!noticeboard.allowed(user))
data["held_item_details"] = null;
return data
/obj/item/paper/ui_act(action, params, datum/tgui/ui)
. = ..()
if(.)
+1 -1
View File
@@ -20,7 +20,7 @@
return OXYLOSS
/obj/item/stamp/get_writing_implement_details()
var/datum/asset/spritesheet_batched/sheet = get_asset_datum(/datum/asset/spritesheet/simple/paper)
var/datum/asset/spritesheet_batched/sheet = get_asset_datum(/datum/asset/spritesheet/simple/stamps)
return list(
interaction_mode = MODE_STAMPING,
stamp_icon_state = icon_state,