From 3eea41b8fcd384057f623dc298222b1ab0c2baa2 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 12 Jul 2023 21:41:05 +0200 Subject: [PATCH] [MIRROR] Clear PDA now has all themes [MDB IGNORE] (#22345) * Clear PDA now has all themes (#76674) ## About The Pull Request Gives all themes to clear PDAs ## Why It's Good For The Game Clear PDAs are found/purchased late into a round and theme apps would generally already be found and installed in PDAs. This means there's nothing left to install in the crystal PDA, so instead I thought why shouldn't they just get all themes? ## Changelog :cl: qol: Clear PDAs now has all themes in their themify app by default. /:cl: * Clear PDA now has all themes --------- Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: Bloop --- .../computers/item/role_tablet_presets.dm | 7 +++++++ .../file_system/programs/theme_selector.dm | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/code/modules/modular_computers/computers/item/role_tablet_presets.dm b/code/modules/modular_computers/computers/item/role_tablet_presets.dm index dff1c08835f..e49f9c6753d 100644 --- a/code/modules/modular_computers/computers/item/role_tablet_presets.dm +++ b/code/modules/modular_computers/computers/item/role_tablet_presets.dm @@ -423,3 +423,10 @@ greyscale_config = null greyscale_colors = null long_ranged = TRUE + +/obj/item/modular_computer/pda/clear/Initialize(mapload) + . = ..() + var/datum/computer_file/program/themeify/theme_app = locate() in stored_files + if(theme_app) + for(var/theme_key in GLOB.pda_name_to_theme - GLOB.default_pda_themes) + theme_app.imported_themes += theme_key diff --git a/code/modules/modular_computers/file_system/programs/theme_selector.dm b/code/modules/modular_computers/file_system/programs/theme_selector.dm index 7700f508924..9bc15a1a00b 100644 --- a/code/modules/modular_computers/file_system/programs/theme_selector.dm +++ b/code/modules/modular_computers/file_system/programs/theme_selector.dm @@ -28,7 +28,11 @@ switch(action) if("PRG_change_theme") var/selected_theme = params["selected_theme"] - if(!GLOB.default_pda_themes.Find(selected_theme) && !imported_themes.Find(selected_theme) && !(computer.obj_flags & EMAGGED)) + if( \ + !GLOB.default_pda_themes.Find(selected_theme) && \ + !imported_themes.Find(selected_theme) && \ + !(computer.obj_flags & EMAGGED) \ + ) return FALSE computer.device_theme = GLOB.pda_name_to_theme[selected_theme] return TRUE