mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-09 07:08:03 +01:00
8c534a521e
## About The Pull Request I'm making the ordeal of finding a maint disk (or buying blackmarket bootleg disk) with a theme in it a slightly more rewarding experience, while sticking to the concept that it's something you've to find, unlike default PDA themes. This PR also proves to be an opportunity to put the progress tab that I coded a year ago for the 'Fishdex' to good use. TODO: ~~Refactor preferences to allow specific choices to be shown/hidden depending on whether the player meets a defined criteria, otherwise you'll have to do it manually every round, which is lame~~ - [x] Make some simple ui icons associated with each unlockable theme to be shown in the cheevo progress tab - [x] Code to validate deserialized DB values, in the remote case that any theme is removed in the future, as well as unit test code for any non-abstract theme without ID - [x] Add sound cue and chat feedback when unlocking a theme (or when fishing a new kind of fish for the first time, like, the code's similar) - [x] Test all of this ## Why It's Good For The Game These themes are basically an end in itself, and I understand the reason behind their existence is to make for some cute, little maint loot, but relegating it to chance of finding a disk somewhere in maintenance, **every single round** really rots whatever little substance this purely cosmetic feature already has. ## Changelog 🆑 add: Once installed, special PDA themes from maintenance disks will be present on your roundstart PDA on future rounds (Sadly I couldn't figure out a way to add those to the preferences UI yet). You can check which PDA themes you've unlocked in the Progress tab of the achievements UI. /🆑
76 lines
2.7 KiB
Plaintext
76 lines
2.7 KiB
Plaintext
/// PDA themes that you can find in maintenance. Once installed by a player, it'll become available to them on future rounds as well.
|
|
/datum/computer_file/program/maintenance/theme
|
|
filename = "theme"
|
|
filedesc = "Theme holder"
|
|
extended_desc = "Holds a theme you can add to your Modular PC to set in the Themify application. Makes the application use more space"
|
|
size = 2
|
|
abstract_type = /datum/computer_file/program/maintenance/theme
|
|
|
|
///The type of theme we have
|
|
var/theme_name
|
|
///The Database ID of the theme. It's important that non-abstract types have it set.
|
|
var/theme_id
|
|
///The icon file for this theme
|
|
var/icon_file = PDA_THEMES_PROGRESS_SET
|
|
///The icon_state for this theme to show in the progress score tab
|
|
var/icon = ""
|
|
|
|
/datum/computer_file/program/maintenance/theme/New()
|
|
. = ..()
|
|
filename = "[theme_name] Theme"
|
|
|
|
/datum/computer_file/program/maintenance/theme/can_store_file(obj/item/modular_computer/potential_host)
|
|
. = ..()
|
|
if(!.)
|
|
return FALSE
|
|
var/datum/computer_file/program/themeify/theme_app = locate() in potential_host.stored_files
|
|
//no theme app, no themes!
|
|
if(!theme_app)
|
|
return FALSE
|
|
//don't get the same one twice
|
|
if(LAZYFIND(theme_app.imported_themes, theme_name))
|
|
return FALSE
|
|
return TRUE
|
|
|
|
///Called post-installation of an application in a computer, after 'computer' var is set.
|
|
/datum/computer_file/program/maintenance/theme/on_install(datum/computer_file/source, obj/item/modular_computer/computer_installing, mob/user)
|
|
SHOULD_CALL_PARENT(FALSE)
|
|
//add the theme to the computer and increase its size to match
|
|
var/datum/computer_file/program/themeify/theme_app = locate() in computer.stored_files
|
|
if(!theme_app)
|
|
return
|
|
LAZYADD(theme_app.imported_themes, theme_name)
|
|
theme_app.size += size
|
|
user?.client?.give_award(/datum/award/score/progress/pda_themes, user, theme_id, theme_name)
|
|
qdel(src)
|
|
|
|
/datum/computer_file/program/maintenance/theme/cat
|
|
theme_name = PDA_THEME_CAT_NAME
|
|
theme_id = PDA_THEME_ID_CAT
|
|
icon = "cat"
|
|
|
|
/datum/computer_file/program/maintenance/theme/lightmode
|
|
theme_name = PDA_THEME_LIGHT_MODE_NAME
|
|
theme_id = PDA_THEME_ID_LIGHT_MODE
|
|
icon = "light_mode"
|
|
|
|
/datum/computer_file/program/maintenance/theme/spooky
|
|
theme_name = PDA_THEME_SPOOKY_NAME
|
|
theme_id = PDA_THEME_ID_SPOOKY
|
|
icon = "eldritch"
|
|
|
|
/datum/computer_file/program/maintenance/theme/hacker
|
|
theme_name = PDA_THEME_HACKERMAN_NAME
|
|
theme_id = PDA_THEME_ID_HACKERMAN
|
|
icon = "hacker"
|
|
|
|
/datum/computer_file/program/maintenance/theme/roulette
|
|
theme_name = PDA_THEME_ROULETTE_NAME
|
|
theme_id = PDA_THEME_ID_ROULETTE
|
|
icon = "roulette"
|
|
|
|
/datum/computer_file/program/maintenance/theme/alien
|
|
theme_name = PDA_THEME_ABDUCTOR_NAME
|
|
theme_id = PDA_THEME_ID_ABDUCTOR
|
|
icon = "alien"
|