mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 09:42:29 +00:00
* Reworked PDA menu & NtOS themes (#73070) ## About The Pull Request This is a port/rework of https://github.com/yogstation13/Yogstation/pull/15735 - I changed a lot of how it acted (some themes are locked behind maintenance apps). The original author allowed this port to happen, and I really liked how it looked there so I'd like to add it here. ### Applications Removes the hardware configurator application, as all it did was show you your space and battery now that all hardware was removed. These are things your PC does by default, so it was just a waste of space. Adds a Theme manager application instead, which allows you to change your PDA's theme at will. Adds a new Maintenance application that will give a new theme, however it will also increase the size of the theme manager app itself as it's bloatware. ### Menu There's now a bar at the top of the menu showing 'special' tablet apps which, for one reason or another, should stand out from the rest of the apps. Currently this is PDA messenger and the Theme manager Flashlight and Flashlight color is now only an icon, and is shown on the same line as Updating you ID https://cdn.discordapp.com/attachments/961874788706574386/1069621173693972551/2023-01-30_09-10-52.mov  ### Themes Adds a lot of themes to choose from, although SOME are hidden behind Maintenance applications, which will give you a random theme. These are bloatware however, so they come with some extra cost to the app's required space storage. Themes are now supported on ALL APPLICATIONS! If you have a computer theme, you will have that theme in EVERY app you enter, rather than just a select few. ALSO also, emagging the tablet will automatically set & unlock the Syndicate theme, which makes your PDA obvious but you can disguise it if you wish through just re-painting it to something else. https://cdn.discordapp.com/attachments/828923843829432340/1069565383155122266/2023-01-30_05-29-53.mov ### Preferences This also adds a pref for theme, reworking the ringtone code to work with it as well. I also removed 2 entirely unused PDA prefs just 'cause. Screenshot not up-to-date, they now have proper names.  ### Other stuff Made defines for device_themes Added support for special app-side checks to download files Fixed programs downloading themselves TWICE because defines all had the same definition Removes the Chemistry computer disk as it was empty due to chemistry app's removal Removes the 'run_emag' proc, since apps can directly refer to the computer to check for emag status instead. Moved over and added better documentation on data computer files, and moved the ordnance ones to the same file as the others. ## Why It's Good For The Game It makes PDAs a lot more customizable while adding more features to maintenance applications. I think the themes look cool and it fits with PDAs being "personal" anyways. I also explained most of my other arguments in the about section, such as the hardware configuration application. ## Changelog 🆑 Chubbygummibear & JohnFulpWillard add: A ton of new NtOS themes, which are accessible by the new Themify application that comes with all PCs. add: Emagging a PC now defaults it to the Syndicate option (and adds it to go back to it if you wish) add: There's a new maintenance app that gives you rarer themes qol: The NtOS Main menu was moved around, added "header" applications that are shown where the Flashlight is, such as your Theme manager and PDA messenger. code: Made defines for device_themes code: Added support for special app-side checks to download files code: Removes the 'run_emag' proc, since apps can directly refer to the computer to check for emag status instead. fix: Programs no longer download twice. del: Removes the Chemistry computer disk as it was empty due to chemistry app's removal /🆑 --------- Co-authored-by: san7890 <the@ san7890.com> * Reworked PDA menu & NtOS themes --------- Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: san7890 <the@ san7890.com>
90 lines
2.2 KiB
Plaintext
90 lines
2.2 KiB
Plaintext
///Used to calculate how large a text file is.
|
|
#define BLOCK_SIZE 250
|
|
|
|
/**
|
|
* Base DATA file type
|
|
* Doesn't do anything, mostly here for organization.
|
|
*/
|
|
/datum/computer_file/data
|
|
filetype = "DAT"
|
|
|
|
/**
|
|
* Holds data in string format.
|
|
*/
|
|
/datum/computer_file/data/text
|
|
filetype = "TXT"
|
|
|
|
/// Stored data in string format.
|
|
var/stored_text = ""
|
|
|
|
/datum/computer_file/data/text/clone()
|
|
var/datum/computer_file/data/text/temp = ..()
|
|
temp.stored_text = stored_text
|
|
return temp
|
|
|
|
// Calculates file size from amount of characters in saved string
|
|
/datum/computer_file/data/text/proc/calculate_size()
|
|
size = max(1, round(length(stored_text) / BLOCK_SIZE))
|
|
|
|
/**
|
|
* A text file with a different filetype
|
|
* Used for flavortext
|
|
*/
|
|
/datum/computer_file/data/text/logfile
|
|
filetype = "LOG"
|
|
|
|
/**
|
|
* Ordnance data
|
|
* Holds possible experiments to do
|
|
*/
|
|
/datum/computer_file/data/ordnance
|
|
filetype = "ORD"
|
|
size = 4
|
|
|
|
/// List of experiments filtered by doppler array or populated by the tank compressor. Experiment path as key, score as value.
|
|
var/list/possible_experiments
|
|
|
|
/datum/computer_file/data/ordnance/proc/return_data()
|
|
return null
|
|
|
|
/datum/computer_file/data/ordnance/clone()
|
|
var/datum/computer_file/data/ordnance/temp = ..()
|
|
temp.possible_experiments = possible_experiments
|
|
return temp
|
|
|
|
/**
|
|
* Explosive data
|
|
* Holds a specific taychon record.
|
|
*/
|
|
/datum/computer_file/data/ordnance/explosive
|
|
filetype = "DOP"
|
|
/// Tachyon record, used for an explosive experiment.
|
|
var/datum/data/tachyon_record/explosion_record
|
|
|
|
/datum/computer_file/data/ordnance/explosive/return_data()
|
|
return explosion_record
|
|
|
|
/datum/computer_file/data/ordnance/explosive/clone()
|
|
var/datum/computer_file/data/ordnance/explosive/temp = ..()
|
|
temp.explosion_record = explosion_record
|
|
return temp
|
|
|
|
/**
|
|
* Gaseous data
|
|
* Holds a specific compressor record.
|
|
*/
|
|
/datum/computer_file/data/ordnance/gaseous
|
|
filetype = "COM"
|
|
///The gas record stored in the file.
|
|
var/datum/data/compressor_record/gas_record
|
|
|
|
/datum/computer_file/data/ordnance/gaseous/return_data()
|
|
return gas_record
|
|
|
|
/datum/computer_file/data/ordnance/gaseous/clone()
|
|
var/datum/computer_file/data/ordnance/gaseous/temp = ..()
|
|
temp.gas_record = gas_record
|
|
return temp
|
|
|
|
#undef BLOCK_SIZE
|