From a882e91c9ef52177bb0f179959c509f8a65dd541 Mon Sep 17 00:00:00 2001 From: AuriRex Date: Mon, 4 Sep 2023 21:49:02 +0200 Subject: [PATCH] Added list of Features & generator for said list Added a few missing descriptions Readme changes --- Features.md | 388 ++++++++++++++++++ README.md | 211 ++-------- TheArchive.Core/Utilities/Utils.cs | 38 ++ .../Features/Dev/FeaturesMarkdownCreator.cs | 182 ++++++++ .../Dev/ModSettings.SettingsCreationHelper.cs | 31 +- .../Presence/SteamRichPresenceTweaks.cs | 2 + TheArchive.IL2CPP/Features/QoL/IntroSkip.cs | 2 + .../Features/QoL/SortBoosters.cs | 2 + .../Special/RemoveChatRestrictions.cs | 2 +- 9 files changed, 662 insertions(+), 196 deletions(-) create mode 100644 Features.md create mode 100644 TheArchive.IL2CPP/Features/Dev/FeaturesMarkdownCreator.cs diff --git a/Features.md b/Features.md new file mode 100644 index 00000000..b0270804 --- /dev/null +++ b/Features.md @@ -0,0 +1,388 @@ +# Features + + * [Accessibility](#accessibility) + * [Backport](#backport) + * [Cosmetic](#cosmetic) + * [Discord / Steam Presence](#discord--steam-presence) + * [Fixes](#fixes) + * [HUD / UI](#hud--ui) + * [Misc](#misc) + * [Quality of Life](#quality-of-life) + * [Security / Anti Cheat](#security--anti-cheat) + + +## Accessibility + +### Chat Tweaks + +Use (Up/Down) arrow keys to cycle through the last sent messages. +CTRL+C copies and CTRL+V pastes into the chat box + +### Disable Ambient Particles + +Disable the little floating dust particles in the air. + +### Disable Breathing (Infection) - `[R2-RL]` + +Disables the infection "drinking-straw-sucking" sounding sound. + +### Disable Breathing (Stamina) + +Disables the player breathing and panting due to running around or enemy encounters in pre-R6 builds. + +### Disable Coughing (Infection) - `[R2-RL]` + +Disables the cough sound effect whenever a player looses HP due to infection. + +(SoundEvent="PLAY_COUGHSOFT01") + +### Disable Downed Sound + +Removes the droning sound that playes whenever you're downed. + +### Disable HUD Sway + +Disables the in-game HUD sway while walking / jumping around. + +### Disable UI Mirroring + +Removes the mirroring effect of UI elements. + +### Disable UI Paralax + +Disables the Paralax/Moving of UI elements in menu screens. +(Some elements might get partially or fully cut off-screen!) + +(Only partially works on R4://EXT builds, might fix later.) + +### Glass Liquid System Override - `[R2-RL]` + +Adjust the games "Glass Liquid System" +The thing that renders the blood splatters etc on your visor. + +### Loud Volume Override + +Lower the game volume during loud sections: +- game intro +- elevator drop + +### Nickname + +Nickname related settings. + +### Player Color Override + +Override the built in player colors. + +### Sentry Markers + +Add hud markers onto placed down sentry guns and tweak how those are shown. + + +## Backport + +### Alarm Class on Security Doors - `[R1-R3]` + +Add alarm classes to security door interaction texts + +### Center Map on Player - `[R1-R2]` + +Center the map on yourself upon opening. + +### Don't Pause Audio On Unfocus - `[R1]` + +Audio in R1 was completely paused whenever the game lost focus resulting in sounds piling up and playing on re-focus. + +### Modern Melee Charge Cancel - `[R1-R5]` + +Returns the hammer back to neutral instead of shoving whenever you're charging and alt-fire is pressed. + +### R2+ Like Ladders - `[R1]` + +Fix ladder movement so that W is always upwards and S always downwards, no matter where you're looking. + +### R5+ Like Instant Hack Release - `[R1-R4]` + +Change hacking minigame to be more in line with newest version of the game +Minigame finishes and hack disappears instantly + +### R5+ Mines - `[R1-R4]` + +Change explosion code to work like after the R5 update. +Mines = more effective + +(Might cause desync!) + +### R6+ Terminal Key / Zone Info - `[R1-R5]` + +Adds the following text at the start of every terminal: +"Welcome to TERMINAL_XYZ, located in ZONE_XY" +(except for reactor terminals ...) + +### Throwables Run / Fall Fix - `[R1-R5]` + +Prevents you from accidentally throwing your C-Foam nade / Glowsticks whenever you start running / jumping + +### Unready Button - `[R1-R5]` + +Allows you to unready in the lobby. + +### Visual Ping Indicators in R1 - `[R1]` + +Visualize terminal pings in R1 by abusing the local players Middle-Mouse-Ping. +(Only works as Host) + + +## Cosmetic + +### Bot Customization - `[R6-RL]` + +Customize your bots! + +### Enable old Hammers - `[R6-RL]` + +Re-enable the pre-R6 Hammers: +Maul, Gavel, Sledge and Mallet + +### Glowsticks! - `[A1-RL]` + +Costomize your glow-y little friends! + +### Vanity Dirt Control - `[R6-RL]` + +Set all vanity items (clothes) dirt amount. + +### Weapon FOV Adjustments + +Adjust the Field of View of weapons, consumables and big items. + + +## Discord / Steam Presence + +### Discord Rich Presence + +Show the current game state in detail on discord. + +### Steam Rich Presence Tweaks + +Set a custom text for Steams' presence system. + + +## Fixes + +### 99% Reload Fix + +Fixes the bug that leaves you with one bullet short in the mag. +(Currently only for IL2CPP builds) + +### Bio Stuck Sound Fix + +Stops the tagging progress sound after unwielding the tracker, just in case the sound gets stuck. + +### Interaction Fix + +Prevents resource packs from getting interrupted from other interacts. +Most notably: running past lockers etc + +(Text might sometimes disappear) + +### Map Chat Abduction Fix - `[R4-RL]` + +Prevent a switch to the Objectives Screen whenever the chat is open and the 'o' key is pressed. + +### Map Pan Unclamp + +Remove the MMB Map panning restrictions. +Makes you able to zoom in on far out zones. + +### No Dead Pings + +Prevents bio pings (/\) on dead enemies. + +### Weapons shoot forward + +Patches weapons to always shoot into the center of your crosshair. +Makes shotgun draw & insta-shoot not shoot the floor + + +## HUD / UI + +### Bio Ping Colors + +Customize the color of Bio Tracker Pings as well as the blobs on its display. + +### Carry Item Marker - `[R2-RL]` + +Colorize and show additional info on big pickups. + +### Combat Indicator + +Displays the current drama state of the game. +(Above the health bar, right side) + +### Detailed Expedition Display + +Adds the current Rundown Number into the Header as well as onto the Map, Objectives and Success screens. + +### Display Sentry Type + +Display the Sentry Type (Sniper, Burst, Auto, Shotgun) for remote players instead of the nondescript "Sentry Gun" on the map screen. + +### Don't Hide Loadout UI - `[R6-RL]` + +Keep loadout visible after readying up / in expedition + +### Enhanced Expedition Timer + +A more accurate mission timer. + +### Fix Multi-Revive UI - `[R6-RL]` + +Fix revive progress visually resetting whenever multiple revives are going on at the same time. + +### Flashlight Icon Colors - `[R5-RL]` + +Customize the flashlight on/off indicator colors. + +### Hud Pro Mode (Disable HUD) + +Force disable ALL HUD layers unless re-enabled via the submenu. + +Main purpose is for video production + +### Hud Toggle (F1) + +Keybind to toggle parts of the HUD + +### Loading Indicator + +Displays a little indicator that shows if other players have finished loading yet. + +### Remove Downed Message + +Completely removes the 'You are dead, use TAB to check map' message. + +### Results Screen Tweaks + +Tweak the Expedition Fail/Success screens! + +### Scan HUD Tweaks - `[R6-RL]` + +Adds an overall alarm class counter to the HUD message + +### Show Weapon Stats + +Adds weapon statistics such as damage, clip size and reload speed (and more if applicable) on the weapon select screen. + +### Watermark Tweaks + +Configurable to either show your current position or the mod version in the bottom right: + - X:24 Y:2 Z:-46 + - TheArchive v0.5.50 + + +## Misc + +### Copy Lobby ID Format + +Customize copied lobby code from the 'Copy Lobby ID'-Button on the loadout and settings screens with a custom format. + +### Mute Speak - `[R6-RL]` + +Binds a few voice lines to keyboard keys. + +Arrow keys +[P, L, K, J, H] toggleable by hitting F8; off by default +Hold [Right Control] for alternate lines + +### Process Priority + +Set the games process priority. + +This does the same thing as opening up Taskmanager, going into the 'Details' tab and right clicking on GTFO.exe > [Set Priority] + +Warning! Your system might lag / stutter while the game is loading if set to AboveNormal or higher! + +### R1 connect to 19087 games - `[R1]` + +Makes you able to join players who are playing on R1 build 19087 even though you're on 19715. + +### Remove Chat Restrictions - `[R4-RL]` + +Allows the usage of '>' and '<' characters in chat. + +(Also enables TextMeshPro RichText tags to be used in chat, don't do stupid things!) + +### Weapon Model Toggle (F2) + +Forces the held item to be hidden. +(Warning! This makes you unable to use or switch items until unhidden!) + + +## Quality of Life + +### L4D Style Resource Packs + +Use left and right mouse buttons to apply resource packs instead of E. + +Left mouse = yourself +Right mouse = other players + +[R4+] You're able to hold down M2 and it will start applying to a receiver under your croshair if in range automatically + +/!\ Make sure to disable the vanilla game setting Gameplay > Separate Use Keybinds for this Feature to work! + +### Loadout Randomizer + +Adds a Loadout Randomizer button onto the loadout screen. +Select which gear to randomize via the settings below. + +### No Magazine Drop Sound - `[R7-RL]` + +Removes the globalally audible sound whenever a magazine drops on the floor after a reload. + +### Prioritize Resource Pings - `[R1-RL]` + +Resource Packs will be prioritized and show up with special icons and trigger voice lines when pinged by Middle-Mouse-Pings. +(Yes, disinfect is ammo apparently) + +### Reload Sound Cue + +Play a sound cue on reload the moment the bullets have entered your gun. + +### Remove Story Dialog - `[R6-RL]` + +Removes all level-based voice events that come with subtitles. +aka Schaeffer-be-gone + +### See NavMarkers in Chat + +Prevent enemy pings from hiding whenever the chat is open. + +### Situation Aware Weapon Switch + +Switch to either your Melee weapon or Primary depending on if you're sneaking around or in combat after depleting all of your throwables / exit a ladder. + +### Skip Elevator Animation + +Automatically skips the elevator intro animation sequence without having to hold down a button. + +### Skip Intro + +Automatically presses inject at the start of the game + +### Sort Boosters - `[R6-RL]` + +Sorts your booster inventory by type and alphabetically + + +## Security / Anti Cheat + +### Anti Spawn + +Prevents clients from spawning in enemies. + +### Player Lobby Management + +Allows you to open a players steam profile by clicking on their name as well as kick and ban players as host. + diff --git a/README.md b/README.md index 42990eee..c5e3ddf0 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,6 @@ If you encounter any bugs while playing with mods installed make sure to remove ### Quick Links * [Highlighted Features](#features) - * [Accessibility](#accessibility) - * [Quality of Life](#quality-of-life) - * [Misc / Other](#misc--other) - * [Backported Features](#backported-features) * [How to Install](#installation) * [Where are my saves?](#where-are-my-saves) * [Building the project](#technical-stuffs) @@ -31,10 +27,6 @@ If you encounter any bugs while playing with mods installed make sure to remove # Features -## Local Rundown Progression -This allows you to save your progress (including boosters and vanity items) onto your computers hard drive instead of depending on the developers servers. -The implementation should be as close to the original game whenever a specific (rundown) version was live, to keep the experience genuine even after servers are down forever. - ## In Game Mod Settings An in-game mod settings menu for easy feature customization. @@ -63,18 +55,11 @@ Having to redo your settings whenever you switch to another Rundown is now a thi All 4 of the old, pre rundown 6 melee weapons, are back: Maul, Gavel, Mallet and Sledge can be enabled in the mod settings menu and will be added to the melee weapons menu on the loadout screen. ---- - -## Accessibility - -### Nickname - -Change your name in game, includes a color option. - -### Player Color Override +## Local Rundown Progression +This allows you to save your progress (including boosters and vanity items) onto your computers hard drive instead of depending on the developers servers. +The implementation should be as close to the original game whenever a specific (rundown) version was live, to keep the experience genuine even after servers are down forever. -Allows you to change the colors of you and your teammates. -Additionally allows you to colorize other players based on their nickname color. +--- ### Loud Volume Override @@ -84,6 +69,27 @@ Also allows you to adjust what happens with audio whenever you tab outside of th * Lower Volume * Mute +### Player Lobby Management + +Open up players Steam profile or, if you're the host, kick them out of your lobby. + +![PlayerLobbyManagement](https://user-images.githubusercontent.com/37329066/227807583-03305c00-323c-446c-94df-43f9aa7595cd.png) + +### Carry Item Marker + +Big pickups (like `CELL`s or `FOG_TURBINE`s) get their own color as well as the item name above it. +Also shows a marker on whoever is carrying a big pickup. + +![CarryMarker](https://user-images.githubusercontent.com/37329066/227804434-22e8de81-6884-4830-9ff6-a5a8c4616cc2.png) + +
+📷 All the different color variations: (Big Pickup spoilers!!) + +

+ CarryItemMarker +

+
+ ### Glass Liquid System Override Change the resolution of the system that renders the blood splatters and other liquids on your visor or disable it entirely. @@ -118,53 +124,28 @@ Adds a player colored marker on placed down sentry guns, with who placed it and ![SentryMarkers](https://user-images.githubusercontent.com/37329066/227806849-933e2a23-7bb3-4352-b028-8c35974b4e26.png) -### Disable Breathing (Infection) - `[R2 - RL]` - -Removes the sound effect than can only be described as "sucking up liquid through a straw" that playes while having high infection. - -### Disable Breathing (Stamina) - -Removes the players breathing and panting sounds while running around. - -### Disable Coughing (Infection) - `[R2 - RL]` - -Removes the coughing sound effect whenever someone looses HP due to infection. - -### Disable Hud Sway - -Makes the in-game hud stay in place while running, jumping and looking around. - -### Disable UI Mirroring - -Removes the mirroring effect on UI elements. - -### Disable UI Paralax +### Show Weapon Stats -Stops the movement of UI elements in menu screens (Loadout, Rundown, ...) whenever you move your cursor around. -(Some elements might get partially or fully cut off-screen!) +Displayes the weapons stats on the weapon select screen. +Damage, clip size, max ammo and more ---- +### Glowsticks! - `[A1 - RL]` -## Quality of Life +Change the base color to any of the available ones (Green, Yellow, Orange or Red) which syncs to other players! +And/Or override the color locally (for yourself only) based on one fixed color or based on who threw the glowstick. -### Carry Item Marker +### Loading Indicator -Big pickups (like `CELL`s or `FOG_TURBINE`s) get their own color as well as the item name above it. -Also shows a marker on whoever is carrying a big pickup. +Displays a little indicator that shows if other players have finished loading yet. -
-📷 All the different color variations: (Big Pickup spoilers!!) +### Nickname -

- CarryItemMarker -

-
+Change your name in game, includes a color option. -
-📷 Example of someone carrying a CELL: +### Player Color Override -![CarryMarker](https://user-images.githubusercontent.com/37329066/227804434-22e8de81-6884-4830-9ff6-a5a8c4616cc2.png) -
+Allows you to change the colors of you and your teammates. +Additionally allows you to colorize other players based on their nickname color. ### 99% Reload Fix @@ -176,37 +157,23 @@ Use left and right mouse buttons to apply resource packs instead of `E` Left mouse = yourself Right mouse = other players (can be held down + hovered over a player to start the interaction) -### Situation Aware Weapon Switch - -Switch to either your Melee weapon or Primary depending on if you're sneaking around or in combat after depleting all of your throwables / exit a ladder. - -### Prioritize Resource Pings +### Disable Hud Sway -Instead of pinging the lockers/boxes with your middle mouse pings it pings the resource packs instead. -This changes the ping icon as well as the voice line your character says. +Makes the in-game hud stay in place while running, jumping and looking around. -### Loadout Randomizer +### Disable UI Mirroring -Adds a button onto the loadout screen that allows you to randomize your current loadout. -(Configurable in mod settings) +Removes the mirroring effect on UI elements. -### Map Abduction Fix - `[R4 - RL]` +### Disable UI Paralax -Ever tried typing on the map screen only to be taken to the objectives screen after hitting the `o` key on your keyboard? -This has been fixed. +Stops the movement of UI elements in menu screens (Loadout, Rundown, ...) whenever you move your cursor around. +(Some elements might get partially or fully cut off-screen!) ### No Dead Pings Fixes pings (red triangles, doritos) staying on dead enemies as a result of high ping. -### No Magazine Drop Sound - -Removes the *globally audible* sound that playes whenever a magazine drops on the floor after a reload. - -### Reload Sound Cue - -Play a sound the moment your gun has reloaded. (= bullets have entered the gun) - ### Remove Story Dialog Prevents all level-based voice events that have subtitles assigned from playing. @@ -217,108 +184,20 @@ Prevents all level-based voice events that have subtitles assigned from playing. Automatically skips the cutscene after initiating a cage drop. This leads to faster load times as the game only starts building the level once the cutscene is over. -### Unready Button - `[R1 - R5]` - -Adds an unready button into the older game versions. - ---- - -## Misc / Other - -### Player Lobby Management - -Open up players Steam profile or, if you're the host, kick them out of your lobby. - -![PlayerLobbyManagement](https://user-images.githubusercontent.com/37329066/227807583-03305c00-323c-446c-94df-43f9aa7595cd.png) - -### Loading Indicator - -Displays a little indicator that shows if other players have finished loading yet. - -### Show Weapon Stats - -Displayes the weapons stats on the weapon select screen. -Damage, clip size, max ammo and more - -### Glowsticks! - `[A1 - RL]` - -Change the base color to any of the available ones (Green, Yellow, Orange or Red) which syncs to other players! -And/Or override the color locally (for yourself only) based on one fixed color or based on who threw the glowstick. - ### Bot Customization - `[R6 - RL]` Customize your Bots appearance as host and change their names. (Syncs to other players!) -### Hud Toggle - -Toggle your Hud via a key press. `(F1)` - ### Process Priority Automatically change the games process priority, potentially increasing performance by a tiny bit. -### Remove Downed Message - -Remove the "You have died, check map with TAB" text at the top of your screen whenever you die. -Allows you to see reactor progress text when dead. - -### Weapon Shoot Forwards - -Tries to always aim your shots into the center of your crosshair, therefore not allowing your guns to shoot the floor upon drawing and immediately firing. - -### R1 SNet Revision Override - -Allows you to connect to R1 build `19087` games even though you're playing on R1 build `19715`. -Build `19087` is/was a commonly redistributed version of Rundown 1 - ### Other things not mentioned Yes, there's (probably) more! (I usually forget to update this readme) --- -## Backported Features - -### Instant Hack Release - `[R1 - R4]` - -Rundown 5 changed hacks a tiny bit by unlocking locked objects sooner than before, this patch backports this into R1 to R4. - -### Center Map on Player - `[R1 - R2]` - -Center the map on yourself upon opening. (Has been added officially in R3) - -### Melee Cancel Backport - `[R1 - R5]` - -Rundown 6 replaced the shove on right click with a simple return of the weapon to it's idle position, this patch backports this all versions before R6. - -### Mine Fix Backport - `[R1 - R4]` - -According to the devs, mines didn't do the intended amount of damage before R5, this fixes the mine damage. - -### Terminal Zone Info - `[R1 - R5]` - -Rundown 6 added the terminals key and zone info into the terminal. - -### Throwables Run Fix - `[R1 - R5]` - -Before R6, trying to throw throwables and then sprinting caused you to instantly throw your item. -This patch allows you to sprint without this happening. - -### Alarm Class On Doors - `[R1 - R3]` - -Always shows the alarm class on security doors, this was not the case in R1 to R3 and doors did not show this information. - -### R1 Ladder Fix - `[R1]` - -`W` is up and `S` is down, no more weird looking up/down changes the way those buttons work on ladders. - -### R1 Visual Pings - `[R1]` - -On Rundown 1 builds there is no visual ping indicator that shows up after using the `PING` command inside of a terminal, there's only the sound that plays. -This feature allows the lobby host to display a visual indicator by abusing their middle mouse ping. - ---- - # Installation 1. Install [MelonLoader](https://github.com/LavaGang/MelonLoader#how-to-use-the-installer) into your game folder. diff --git a/TheArchive.Core/Utilities/Utils.cs b/TheArchive.Core/Utilities/Utils.cs index 183b89cc..429f5337 100644 --- a/TheArchive.Core/Utilities/Utils.cs +++ b/TheArchive.Core/Utilities/Utils.cs @@ -161,6 +161,44 @@ public static bool TryGetEnumFromName(string name, out T value) where T : str public static void StopCoroutine(object coroutineToken) => LoaderWrapper.StopCoroutine(coroutineToken); + public static string GetRundownTag(RundownFlags rundowns, bool generalizeLatest = false) + { + Enum.TryParse(rundowns.LowestRundownFlag().ToString(), out var lowestId); + Enum.TryParse(rundowns.HighestRundownFlag().ToString(), out var highestId); + + if (highestId == 0) + highestId = GetEnumFromName(nameof(RundownID.Latest)); + + var isLatest = (int)highestId == (int)RundownID.Latest; + + if (lowestId == highestId) + { + var R = "R"; + if (lowestId >= RundownID.RundownAltOne) + { + R = "A"; + lowestId = lowestId - (int)RundownID.RundownAltOne + 1; + } + return $"{R}{(int)lowestId}"; + } + else + { + var RL = "R"; + if (lowestId >= RundownID.RundownAltOne) + { + RL = "A"; + lowestId = lowestId - (int)RundownID.RundownAltOne + 1; + } + var RH = "R"; + if (highestId >= RundownID.RundownAltOne) + { + RH = "A"; + highestId = highestId - (int)RundownID.RundownAltOne + 1; + } + return $"{RL}{(int)lowestId}-{(isLatest && generalizeLatest ? "RL" : RH+(int)highestId)}"; + } + } + public static string GetRundownTitle() => GetRundownTitle(ArchiveMod.CurrentRundown); public static string GetRundownTitle(RundownID rundown) { diff --git a/TheArchive.IL2CPP/Features/Dev/FeaturesMarkdownCreator.cs b/TheArchive.IL2CPP/Features/Dev/FeaturesMarkdownCreator.cs new file mode 100644 index 00000000..4a371a4a --- /dev/null +++ b/TheArchive.IL2CPP/Features/Dev/FeaturesMarkdownCreator.cs @@ -0,0 +1,182 @@ +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using TheArchive.Core.Attributes; +using TheArchive.Core.FeaturesAPI; +using TheArchive.Core.FeaturesAPI.Components; +using TheArchive.Core.FeaturesAPI.Settings; +using TheArchive.Interfaces; +using TheArchive.Utilities; +using UnityEngine; +using static TheArchive.Utilities.Utils; + +namespace TheArchive.Features.Dev +{ + [DoNotSaveToConfig] + [DisallowInGameToggle] + [HideInModSettings] + internal class FeaturesMarkdownCreator : Feature + { + public override string Name => "Features Markdown Creator"; + + public override string Group => FeatureGroups.Dev; + + public override string Description => "Used to automatically generate a markdown text containing all Features.\n\n(Copied to clipboard)"; + + public new static IArchiveLogger FeatureLogger { get; set; } + + [FeatureConfig] + public static ReadmeCreatorSettings Settings { get; set; } + + public class ReadmeCreatorSettings + { + public FButton CreateMarkdownButton => new FButton("Create Markdown (Clipboard)", "create_markdown"); + } + + public const string NEWLINE = "\n"; + + public override void OnButtonPressed(ButtonSetting setting) + { + if(setting.ButtonID == "create_markdown") + { + CreateReadme(); + } + } + + public static void CreateReadme(Assembly asmFilter = null) + { + var groups = new Dictionary>(); + + var builder = new StringBuilder(); + + foreach(var groupKvp in FeatureManager.Instance.GroupedFeatures) + { + var group = FeatureGroups.Get(groupKvp.Key); + + if(group == null) + { + FeatureLogger.Warning($"Attempted to resolve unknown group \"{groupKvp.Key}\"."); + continue; + } + + + if(group == FeatureGroups.Dev) + { + FeatureLogger.Info("Skipping Dev Group!"); + continue; + } + + if(group == FeatureGroups.LocalProgression) + { + FeatureLogger.Info("Skipping LocalProgression"); + continue; + } + + var features = groupKvp.Value.Where(f => !f.IsHidden); + + if (features.Count() == 0) + { + FeatureLogger.Info($"Skipping Group \"{group}\": All Features are hidden!"); + continue; + } + + groups.Add(group, features); + } + + var orderedGroups = groups.OrderBy(kvp => StripTMPTagsRegex(kvp.Key.Name)); + + foreach(var entry in orderedGroups) + { + var group = entry.Key; + builder.Append($" * {CreateQuickLink(group)}\n"); + } + + builder.Append(NEWLINE); + + foreach (var entry in orderedGroups) + { + var group = entry.Key; + var features = entry.Value; + + if(asmFilter != null) + { + features = features.Where(f => f.GetType().Assembly == asmFilter); + } + + features = features.OrderBy(f => StripTMPTagsRegex(f.Name)); + + builder.Append(NEWLINE); + + builder.Append(CreateGroupEntry(group)); + + foreach(var feature in features) + { + builder.Append(CreateFeatureEntry(feature)); + } + } + + var result = builder.Replace("\\n", NEWLINE).ToString(); + + GUIUtility.systemCopyBuffer = result; + + FeatureLogger.Notice($"Copied {result.Length} characters to clipboard!"); + } + + public static string CreateQuickLink(FeatureGroups.Group group) + { + var name = StripTMPTagsRegex(group.Name); + + var link = $"#{name.ToLower().Replace(" ", "-").Replace("/", string.Empty)}"; + + return $"[{name}]({link})"; + } + + public static string CreateGroupEntry(FeatureGroups.Group group) + { + var builder = new StringBuilder(); + builder.Append($"## {StripTMPTagsRegex(group.Name)}"); + builder.Append(NEWLINE); + builder.Append(NEWLINE); + + // Descriptions ? + + return builder.ToString(); + } + + public static string CreateFeatureEntry(Feature feature) + { + var builder = new StringBuilder(); + builder.Append($"### {Utils.StripTMPTagsRegex(feature.Name)}"); + + if(feature.AppliesToRundowns != Utils.RundownFlags.None) + { + var tag = Utils.GetRundownTag(feature.AppliesToRundowns, true); + + builder.Append($" - `[{tag}]`"); + } + + builder.Append(NEWLINE); + builder.Append(NEWLINE); + + if (!string.IsNullOrWhiteSpace(feature.Description)) + { + builder.Append(Utils.StripTMPTagsRegex(feature.Description)); + } + else + { + builder.Append(Tagged("description missing!")); + } + + builder.Append(NEWLINE); + builder.Append(NEWLINE); + + return builder.ToString(); + } + + private static string Tagged(string tag, bool todo = true) + { + return $"[ {(todo ? "TODO: " : string.Empty)}{tag} ]"; + } + } +} diff --git a/TheArchive.IL2CPP/Features/Dev/ModSettings.SettingsCreationHelper.cs b/TheArchive.IL2CPP/Features/Dev/ModSettings.SettingsCreationHelper.cs index 9fdf61ba..795837d9 100644 --- a/TheArchive.IL2CPP/Features/Dev/ModSettings.SettingsCreationHelper.cs +++ b/TheArchive.IL2CPP/Features/Dev/ModSettings.SettingsCreationHelper.cs @@ -1072,36 +1072,9 @@ public static void CreateRundownInfoTextForItem(CM_SettingsItem cm_settingsItem, } else { - Enum.TryParse(rundowns.LowestRundownFlag().ToString(), out var lowestId); - Enum.TryParse(rundowns.HighestRundownFlag().ToString(), out var highestId); + var tag = Utils.GetRundownTag(rundowns); - - if (lowestId == highestId) - { - var R = "R"; - if (lowestId >= RundownID.RundownAltOne) - { - R = "A"; - lowestId = lowestId - (int)RundownID.RundownAltOne + 1; - } - rundownInfoTMP.SetText($"{R}{(int)lowestId}"); - } - else - { - var RL = "R"; - if (lowestId >= RundownID.RundownAltOne) - { - RL = "A"; - lowestId = lowestId - (int)RundownID.RundownAltOne + 1; - } - var RH = "R"; - if (highestId >= RundownID.RundownAltOne) - { - RH = "A"; - highestId = highestId - (int)RundownID.RundownAltOne + 1; - } - rundownInfoTMP.SetText($"{RL}{(int)lowestId}-{RH}{(int)highestId}"); - } + rundownInfoTMP.SetText($"{tag}"); } rundownInfoTMP.color = ORANGE; diff --git a/TheArchive.IL2CPP/Features/Presence/SteamRichPresenceTweaks.cs b/TheArchive.IL2CPP/Features/Presence/SteamRichPresenceTweaks.cs index 1bee032f..ba2e6f47 100644 --- a/TheArchive.IL2CPP/Features/Presence/SteamRichPresenceTweaks.cs +++ b/TheArchive.IL2CPP/Features/Presence/SteamRichPresenceTweaks.cs @@ -23,6 +23,8 @@ public class SteamRPCSettings public override string Group => FeatureGroups.Presence; + public override string Description => "Set a custom text for Steams' presence system."; + [FeatureConfig] public static SteamRPCSettings Config { get; set; } diff --git a/TheArchive.IL2CPP/Features/QoL/IntroSkip.cs b/TheArchive.IL2CPP/Features/QoL/IntroSkip.cs index f511b546..78587093 100644 --- a/TheArchive.IL2CPP/Features/QoL/IntroSkip.cs +++ b/TheArchive.IL2CPP/Features/QoL/IntroSkip.cs @@ -13,6 +13,8 @@ public class IntroSkip : Feature public override string Group => FeatureGroups.QualityOfLife; + public override string Description => "Automatically presses inject at the start of the game"; + public new static IArchiveLogger FeatureLogger { get; set; } [ArchivePatch(typeof(CM_PageIntro), "Update")] diff --git a/TheArchive.IL2CPP/Features/QoL/SortBoosters.cs b/TheArchive.IL2CPP/Features/QoL/SortBoosters.cs index db5f96a7..e59e08d6 100644 --- a/TheArchive.IL2CPP/Features/QoL/SortBoosters.cs +++ b/TheArchive.IL2CPP/Features/QoL/SortBoosters.cs @@ -15,6 +15,8 @@ public class SortBoosters : Feature public override string Group => FeatureGroups.QualityOfLife; + public override string Description => "Sorts your booster inventory by type and alphabetically"; + public static new IArchiveLogger FeatureLogger { get; set; } public override bool SkipInitialOnEnable => true; diff --git a/TheArchive.IL2CPP/Features/Special/RemoveChatRestrictions.cs b/TheArchive.IL2CPP/Features/Special/RemoveChatRestrictions.cs index 1ffdc7a3..281afdea 100644 --- a/TheArchive.IL2CPP/Features/Special/RemoveChatRestrictions.cs +++ b/TheArchive.IL2CPP/Features/Special/RemoveChatRestrictions.cs @@ -19,7 +19,7 @@ public class RemoveChatRestrictions : Feature public override string Group => FeatureGroups.Special; - public override string Description => "Allows the usage of '<' and '>' characters in chat.\n\n(Also enables TextMeshPro RichText tags to be used in chat, don't do stupid things!)"; + public override string Description => "Allows the usage of '>' and '<' characters in chat.\n\n(Also enables TextMeshPro RichText tags to be used in chat, don't do stupid things!)"; #if IL2CPP private static PropertyAccessor> A_PlayerChatManager_m_forbiddenChars;