Files
Bubberstation/code/modules/modular_computers/file_system/programs/maintenance/themes.dm
SkyratBot 3079143be5 [MIRROR] Tablet apps are now deleted when necessary & removes console preset. [MDB IGNORE] (#21942)
* Tablet apps are now deleted when necessary & removes console preset. (#75863)

## About The Pull Request

Apps now properly delete themselves when removed, so they don't exist in
nullspace anymore.
Chat client now actually updates the uid, because its New() didn't call
parent.
Deletes the 'console' subtype of modular computer
Updates how downloading and transferring files are handled
Fixes being able to infinitely upload apps to a disk

## Why It's Good For The Game

Fixes some more bugs I found with apps and prevents spamming apps in a
disk.

## Changelog

🆑
fix: Maintenance data disks now properly transfer from PC to disk
fix: Disks can no longer be flooded with the same app repeatedly.
/🆑

* Tablet apps are now deleted when necessary & removes console preset.

* updatepaths

* feex

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Jolly-66 <70232195+Jolly-66@users.noreply.github.com>
2023-06-20 14:36:09 +00:00

44 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()
//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