mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-28 18:41:37 +00:00
## About The Pull Request I deleted the documentation file of ModPCs because it was barebones and had no new information to give that autodoc couldn't. Just to make sure this isn't a net-negative, I improved on much of the autodoc and comments in general around ModPC code to help people understand easier what's going on around it. I also renamed vars that were too easily confused with other var names, and reworked the ntnet downloader a little; - it now has a search bar - it now has more sections to scroll through, hopefully making it more accurate and easy to find what you need. - also organized the apps that were previously shoved in 'other'. - i also upgraded it to a .tsx because why not video demonstration https://github.com/tgstation/tgstation/assets/53777086/cbba4c1c-b8a8-4ba4-8628-aea8389999fc ## Why It's Good For The Game Adds in a lot of comments that were previously missing, clears up some sources of confusion within ModPC code, and improves NTNet Downloader, something I've procrastinated on doing for a very long time now. ## Changelog 🆑 qol: NTNet Downloader now has a search bar, and programs are now better sorted. /🆑
32 lines
1.2 KiB
Plaintext
32 lines
1.2 KiB
Plaintext
/// A tablet app that lets anyone see all the valid emoji they can send via a PDA message (and even OOC!)
|
|
/datum/computer_file/program/emojipedia
|
|
filename = "emojipedia"
|
|
filedesc = "EmojiPedia"
|
|
downloader_category = PROGRAM_CATEGORY_DEVICE // we want everyone to be able to access this application, since everyone can send emoji via PDA messages
|
|
program_open_overlay = "generic"
|
|
extended_desc = "This program allows you to view all the emojis you can send via PDA messages."
|
|
size = 3
|
|
tgui_id = "NtosEmojipedia"
|
|
program_icon = "icons"
|
|
/// Store the list of potential emojis here.
|
|
var/static/list/emoji_list = icon_states(icon(EMOJI_SET))
|
|
|
|
/datum/computer_file/program/emojipedia/New()
|
|
. = ..()
|
|
// Sort the emoji list so it's easier to find things and we don't have to keep sorting on ui_data since the number of emojis can not change in-game.
|
|
emoji_list = sortTim(emoji_list, /proc/cmp_text_asc)
|
|
|
|
/datum/computer_file/program/emojipedia/ui_static_data(mob_user)
|
|
var/list/data = list()
|
|
for(var/emoji in emoji_list)
|
|
data["emoji_list"] += list(list(
|
|
"name" = emoji,
|
|
))
|
|
|
|
return data
|
|
|
|
/datum/computer_file/program/emojipedia/ui_assets(mob/user)
|
|
return list(
|
|
get_asset_datum(/datum/asset/spritesheet/emojipedia),
|
|
)
|