mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-13 03:02:38 +00:00
Integrated circuits for modular computers (#80530) This PR integrates circuits for modular computers and a good bits of their programs. The peculiarity here is that modular computers have no fixed amount of unremovable components (except the base one with just a couple ports for now), instead, they're added and removed along with programs. With a few exceptions (such as the messenger and signaler), for these program circuits to work, their associated program has to be either open or in the background. For a reason or another, not all programs have a circuit associated to them, still, however the programs with a circuit are still a handful. They are: - Nanotrasen Pay System - Notepad - SiliConnect - WireCarp - MODsuit Control - Spectre Meter - Direct Messenger* - LifeConnect - Custodial Locator - Fission360 - Camera - Status Display - SignalCommander *By the by, sending messages has a cooldown, so it shouldn't be as spammy. If it turns out to not be enough, I can make it so messages from circuit will be ignored by other messenger circuits. The PR is no longer WIP. I believe modular computers could make for some interesting setups with circuits, since they're fairly flexible and stocked with features unlike many other appliances, therefore also a speck more abusable, though limits, cooldowns, logging and sanitization have been implemented to keep it in check. 🆑 add: Modular Computers now support integrated circuits. What can be done with them depends on the programs installed and whether they're running (open or background). add: Modular Consoles (the machinery) now have a small backup cell they draw power from if the power goes out. /🆑 Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
45 lines
1.4 KiB
Plaintext
45 lines
1.4 KiB
Plaintext
/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
|
|
|
|
///The type of theme we have
|
|
var/theme_name
|
|
|
|
/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(theme_app.imported_themes.Find(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()
|
|
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)
|
|
theme_app.imported_themes += theme_name
|
|
theme_app.size += size
|
|
qdel(src)
|
|
|
|
/datum/computer_file/program/maintenance/theme/cat
|
|
theme_name = CAT_THEME_NAME
|
|
|
|
/datum/computer_file/program/maintenance/theme/lightmode
|
|
theme_name = LIGHT_THEME_NAME
|
|
|
|
/datum/computer_file/program/maintenance/theme/spooky
|
|
theme_name = ELDRITCH_THEME_NAME
|