├── DisplayEnergy ├── ModConfig.cs ├── manifest.json ├── DisplayEnergy.csproj ├── IGenericModConfigMenuApi.cs └── ModEntry.cs ├── global.json ├── LICENSE ├── README.md ├── justfile ├── flake.lock ├── DisplayEnergy.sln ├── flake.nix ├── CONTRIBUTING.md ├── .gitignore └── .editorconfig /DisplayEnergy/ModConfig.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Xna.Framework; 2 | 3 | namespace dmarcoux.Stardew.DisplayEnergy; 4 | 5 | public sealed class ModConfig 6 | { 7 | public Vector2 EnergyTextOffset { get; set; } = new(215, 60); 8 | } -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | // Documentation: https://learn.microsoft.com/en-us/dotnet/core/tools/global-json 2 | // Comments are supported in this JSON file. Refer to the documentation above 3 | { 4 | "sdk": { 5 | "rollForward": "disable", 6 | "version": "6.0.405" 7 | } 8 | } -------------------------------------------------------------------------------- /DisplayEnergy/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "DisplayEnergy", 3 | "Author": "dmarcoux", 4 | "Version": "1.1.0", 5 | "Description": "Permanently display the player's current and max energy. Supports split-screen.", 6 | "UniqueID": "dmarcoux.DisplayEnergy", 7 | "EntryDll": "DisplayEnergy.dll", 8 | "MinimumApiVersion": "4.0.0", 9 | "UpdateKeys": ["GitHub:dmarcoux/DisplayEnergy", "ModDrop:1087175", "Nexus:10662"] 10 | } 11 | -------------------------------------------------------------------------------- /DisplayEnergy/DisplayEnergy.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1.1.0 4 | dmarcoux.Stardew.DisplayEnergy 5 | net6.0 6 | Latest 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Dany Marcoux 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dmarcoux/DisplayEnergy 2 | 3 | _DisplayEnergy_ is a [_Stardew Valley_](https://www.stardewvalley.net/) mod 4 | built with [_SMAPI_](https://smapi.io/) mod to permanently display the player's 5 | current and max energy. 6 | 7 | This mod supports split-screen and the position of the energy text is 8 | customizable in-game when [Generic Mod Config 9 | Menu](https://www.nexusmods.com/stardewvalley/mods/5098) is installed. 10 | 11 | ## How to Install This Mod 12 | 13 | Refer to the [_SMAPI_ player 14 | guide](https://stardewvalleywiki.com/Modding:Player_Guide) to learn how to 15 | install _SMAPI_ mods. 16 | 17 | This mod is available on 18 | [ModDrop](https://www.moddrop.com/stardew-valley/mods/1087175-displayenergy) and 19 | [NexusMods](https://www.nexusmods.com/stardewvalley/mods/10662). 20 | 21 | ## Acknowledgements 22 | 23 | _DisplayEnergy_ was based off the 24 | [EnergyCount](https://www.nexusmods.com/stardewvalley/mods/4272) mod, thank you 25 | _Crystallyne_ for creating that mod. I decided to create _DisplayEnergy_ when I 26 | realized _EnergyCount_ didn't support split-screen. Later on, I made the 27 | position of the energy text customizable. 28 | -------------------------------------------------------------------------------- /justfile: -------------------------------------------------------------------------------- 1 | # Documentation: https://github.com/casey/just 2 | 3 | # Default recipe will list all just recipes in the order they appear in this justfile 4 | default: 5 | just --list --unsorted 6 | 7 | [doc("Launch IDE, but allow its process to live even if the development environment gets killed")] 8 | code ide="rider": 9 | nohup {{ide}} & 10 | @# The shell seems to be stuck after the execution of the previous command with `nohup`. Pressing `Enter` shows the 11 | @# shell prompt back, but we don't need to do anything anyway, so we can simply get the shell prompt back with `exit` 12 | @exit 13 | 14 | [doc("Build the solution")] 15 | build: 16 | dotnet build 17 | 18 | [doc("Format all code in the solution")] 19 | format: 20 | dotnet format 21 | 22 | [doc("Generate global.json after manually changing the .NET SDK package in `flake.nix` or updating `flake.lock`")] 23 | generateGlobalJson: 24 | @# The .NET SDKs have been updated when manually changing the packages in `flake.nix` or by recreating `flake.lock` to update 25 | @# the revision of every input to its current revision with `nix flake update`. 26 | @# 27 | # Without removing global.json, the dotnet CLI won't execute commands due to a mismatch in the .NET SDK version. So global.json has to be removed first. 28 | rm --force global.json 29 | dotnet new globaljson --roll-forward disable 30 | # Mention documentation in comments at the top of global.json 31 | sed -i -e '1s|^|// Documentation: https://learn.microsoft.com/en-us/dotnet/core/tools/global-json\n// Comments are supported in this JSON file. Refer to the documentation above\n|' global.json 32 | -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "nixpkgs": { 4 | "locked": { 5 | "lastModified": 1720542800, 6 | "narHash": "sha256-ZgnNHuKV6h2+fQ5LuqnUaqZey1Lqqt5dTUAiAnqH0QQ=", 7 | "owner": "nixos", 8 | "repo": "nixpkgs", 9 | "rev": "feb2849fdeb70028c70d73b848214b00d324a497", 10 | "type": "github" 11 | }, 12 | "original": { 13 | "owner": "nixos", 14 | "ref": "nixos-unstable", 15 | "repo": "nixpkgs", 16 | "type": "github" 17 | } 18 | }, 19 | "nixpkgs_dotnet_sdk": { 20 | "locked": { 21 | "lastModified": 1677229269, 22 | "narHash": "sha256-awE2w6oi9rzQ8qj1lwKEDm6qIA0a239fiB+AyPjXR2w=", 23 | "owner": "nixos", 24 | "repo": "nixpkgs", 25 | "rev": "7d0ed7f2e5aea07ab22ccb338d27fbe347ed2f11", 26 | "type": "github" 27 | }, 28 | "original": { 29 | "owner": "nixos", 30 | "ref": "7d0ed7f2e5aea07ab22ccb338d27fbe347ed2f11", 31 | "repo": "nixpkgs", 32 | "type": "github" 33 | } 34 | }, 35 | "nixpkgs_just": { 36 | "locked": { 37 | "lastModified": 1720368505, 38 | "narHash": "sha256-5r0pInVo5d6Enti0YwUSQK4TebITypB42bWy5su3MrQ=", 39 | "owner": "nixos", 40 | "repo": "nixpkgs", 41 | "rev": "ab82a9612aa45284d4adf69ee81871a389669a9e", 42 | "type": "github" 43 | }, 44 | "original": { 45 | "owner": "nixos", 46 | "repo": "nixpkgs", 47 | "rev": "ab82a9612aa45284d4adf69ee81871a389669a9e", 48 | "type": "github" 49 | } 50 | }, 51 | "root": { 52 | "inputs": { 53 | "nixpkgs": "nixpkgs", 54 | "nixpkgs_dotnet_sdk": "nixpkgs_dotnet_sdk", 55 | "nixpkgs_just": "nixpkgs_just" 56 | } 57 | } 58 | }, 59 | "root": "root", 60 | "version": 7 61 | } 62 | -------------------------------------------------------------------------------- /DisplayEnergy.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30114.105 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DisplayEnergy", "DisplayEnergy\DisplayEnergy.csproj", "{A2BF47E6-8475-4A6C-AE2E-FD7FE56AB9DB}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Debug|x64 = Debug|x64 12 | Debug|x86 = Debug|x86 13 | Release|Any CPU = Release|Any CPU 14 | Release|x64 = Release|x64 15 | Release|x86 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 21 | {A2BF47E6-8475-4A6C-AE2E-FD7FE56AB9DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 22 | {A2BF47E6-8475-4A6C-AE2E-FD7FE56AB9DB}.Debug|Any CPU.Build.0 = Debug|Any CPU 23 | {A2BF47E6-8475-4A6C-AE2E-FD7FE56AB9DB}.Debug|x64.ActiveCfg = Debug|Any CPU 24 | {A2BF47E6-8475-4A6C-AE2E-FD7FE56AB9DB}.Debug|x64.Build.0 = Debug|Any CPU 25 | {A2BF47E6-8475-4A6C-AE2E-FD7FE56AB9DB}.Debug|x86.ActiveCfg = Debug|Any CPU 26 | {A2BF47E6-8475-4A6C-AE2E-FD7FE56AB9DB}.Debug|x86.Build.0 = Debug|Any CPU 27 | {A2BF47E6-8475-4A6C-AE2E-FD7FE56AB9DB}.Release|Any CPU.ActiveCfg = Release|Any CPU 28 | {A2BF47E6-8475-4A6C-AE2E-FD7FE56AB9DB}.Release|Any CPU.Build.0 = Release|Any CPU 29 | {A2BF47E6-8475-4A6C-AE2E-FD7FE56AB9DB}.Release|x64.ActiveCfg = Release|Any CPU 30 | {A2BF47E6-8475-4A6C-AE2E-FD7FE56AB9DB}.Release|x64.Build.0 = Release|Any CPU 31 | {A2BF47E6-8475-4A6C-AE2E-FD7FE56AB9DB}.Release|x86.ActiveCfg = Release|Any CPU 32 | {A2BF47E6-8475-4A6C-AE2E-FD7FE56AB9DB}.Release|x86.Build.0 = Release|Any CPU 33 | EndGlobalSection 34 | EndGlobal 35 | -------------------------------------------------------------------------------- /DisplayEnergy/IGenericModConfigMenuApi.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using StardewModdingAPI; 4 | 5 | namespace dmarcoux.Stardew.DisplayEnergy 6 | { 7 | /// The API which lets other mods add a config UI through Generic Mod Config Menu. 8 | /// 9 | /// Any method signature which wasn't needed is gone, as suggested upstream 10 | /// https://github.com/spacechase0/StardewValleyMods/tree/14021c406af6346cb88e28baf52f8df9dbc65c6f/GenericModConfigMenu#for-c-mod-authors 11 | public interface IGenericModConfigMenuApi 12 | { 13 | /********* 14 | ** Methods 15 | *********/ 16 | /**** 17 | ** Must be called first 18 | ****/ 19 | /// Register a mod whose config can be edited through the UI. 20 | /// The mod's manifest. 21 | /// Reset the mod's config to its default values. 22 | /// Save the mod's current config to the config.json file. 23 | /// Whether the options can only be edited from the title screen. 24 | /// Each mod can only be registered once, unless it's deleted via before calling this again. 25 | void Register(IManifest mod, Action reset, Action save, bool titleScreenOnly = false); 26 | 27 | 28 | /**** 29 | ** Basic options 30 | ****/ 31 | /// Add an integer option at the current position in the form. 32 | /// The mod's manifest. 33 | /// Get the current value from the mod config. 34 | /// Set a new value in the mod config. 35 | /// The label text to show in the form. 36 | /// The tooltip text shown when the cursor hovers on the field, or null to disable the tooltip. 37 | /// The minimum allowed value, or null to allow any. 38 | /// The maximum allowed value, or null to allow any. 39 | /// The interval of values that can be selected. 40 | /// Get the display text to show for a value, or null to show the number as-is. 41 | /// The unique field ID for use with , or null to auto-generate a randomized ID. 42 | void AddNumberOption(IManifest mod, Func getValue, Action setValue, Func name, Func tooltip = null, int? min = null, int? max = null, int? interval = null, Func formatValue = null, string fieldId = null); 43 | } 44 | } -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = ".NET development environment based on the Filesystem Hierarchy Standard (FHS)"; 3 | # https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard 4 | 5 | inputs = { 6 | # Use https://www.nixhub.io/ to easily find the exact commit to use in order to pin an input (and its packages) to a specific version 7 | nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; 8 | nixpkgs_dotnet_sdk.url = "github:nixos/nixpkgs?ref=7d0ed7f2e5aea07ab22ccb338d27fbe347ed2f11"; 9 | nixpkgs_just.url = "github:nixos/nixpkgs/ab82a9612aa45284d4adf69ee81871a389669a9e"; 10 | }; 11 | 12 | outputs = { nixpkgs, ... } @ inputs: 13 | let 14 | system = "x86_64-linux"; 15 | pkgs = import nixpkgs { system = "${system}"; config.allowUnfree = true; }; 16 | 17 | # .NET SDK 18 | dotnet_sdk = inputs.nixpkgs_dotnet_sdk.legacyPackages.${system}.dotnetCorePackages.sdk_6_0; 19 | 20 | # https://github.com/casey/just 21 | just = inputs.nixpkgs_just.legacyPackages.${system}.pkgs.just; 22 | 23 | # Bundle of SSL certificates 24 | cacert = pkgs.cacert; 25 | in 26 | { 27 | # Create development shell based on the Filesystem Hierarchy Standard (FHS) with a set of 28 | # standard packages based on the list maintained by the appimagetools package 29 | # 30 | # buildFHSEnv -> https://nixos.org/manual/nixpkgs/stable/#sec-fhs-environments 31 | # 32 | # The packages included in appimagetools.defaultFhsEnvArgs are: 33 | # https://github.com/NixOS/nixpkgs/blob/fd6a510ec7e84ccd7f38c2ad9a55a18bf076f738/pkgs/build-support/appimage/default.nix#L72-L208 34 | devShells.${system}.default = (pkgs.buildFHSEnv (pkgs.appimageTools.defaultFhsEnvArgs // { 35 | name = "dotnet-development-environment"; 36 | # Packages installed in the development shell 37 | targetPkgs = pkgs: with pkgs; [ 38 | # .NET SDK 39 | dotnet_sdk 40 | # Run commands in the same FHS environment that is used for Steam 41 | steam-run 42 | # Timezones 43 | tzdata 44 | # Locales 45 | glibcLocales 46 | # Bundle of SSL certificates 47 | cacert 48 | # Command runner 49 | just 50 | ]; 51 | # Commands to be executed in the development shell 52 | profile = '' 53 | # Ensure that dotnet tools can find the .NET location 54 | export DOTNET_ROOT="${dotnet_sdk}"; 55 | 56 | # Set LANG for locales 57 | export LANG="C.UTF-8" 58 | 59 | # Remove duplicate commands from Bash shell command history 60 | export HISTCONTROL=ignoreboth:erasedups 61 | 62 | # Do not pollute $HOME with config files (both paths are ignored in .gitignore) 63 | export DOTNET_CLI_HOME="$PWD/.net_cli_home"; 64 | export NUGET_PACKAGES="$PWD/.nuget_packages"; 65 | 66 | # Put dotnet tools in $PATH to be able to use them 67 | export PATH="$DOTNET_CLI_HOME/.dotnet/tools:$PATH" 68 | 69 | # Without this, there are warnings about LANG, LC_ALL and locales. 70 | # Many tests fail due those warnings showing up in test outputs too... 71 | # This solution is from: https://gist.github.com/aabs/fba5cd1a8038fb84a46909250d34a5c1 72 | export LOCALE_ARCHIVE="${pkgs.glibcLocales}/lib/locale/locale-archive" 73 | 74 | # For the bundle of SSL certificates to be used in applications (like curl and others...) 75 | export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt 76 | ''; 77 | })).env; 78 | }; 79 | } 80 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How This Mod Was Created 2 | 3 | Refer to the [_SMAPI_ modder 4 | guide](https://stardewvalleywiki.com/Modding:Modder_Guide) to learn how to 5 | create _SMAPI_ mods. This is a simplified version of the guide and without using 6 | any GUI from an IDE like _Visual Studio_. 7 | 8 | 1. Create the project's directory and go into this directory: 9 | 10 | ```bash 11 | mkdir DisplayEnergy && cd DisplayEnergy 12 | ``` 13 | 14 | 2. Spin up the development environment: 15 | 16 | ```bash 17 | nix develop 18 | ``` 19 | 20 | 3. Create a solution: 21 | 22 | ```bash 23 | dotnet new sln 24 | ``` 25 | 26 | 4. Create a _Class Library_ project and add it to the solution: 27 | 28 | ```bash 29 | dotnet new classlib -o DisplayEnergy && dotnet sln add DisplayEnergy/DisplayEnergy.csproj 30 | ``` 31 | 32 | 5. Delete the _Class1.cs_ or _MyClass.cs_ file (it was generated in the previous step, but it's not needed): 33 | 34 | ```bash 35 | rm -f DisplayEnergy/Class1.cs DisplayEnergy/MyClass.cs 36 | ``` 37 | 38 | 6. Add [_SMAPI_ package](https://smapi.io/package/readme) to allow modding with _SMAPI_: 39 | 40 | ```bash 41 | dotnet add DisplayEnergy package Pathoschild.Stardew.ModBuildConfig --version 4.0.0 42 | ``` 43 | 44 | 7. Create the _ModEntry.cs_ and _manifest.json_ files (see examples in the [_SMAPI_ modder guide](https://stardewvalleywiki.com/Modding:Modder_Guide)): 45 | 46 | ```bash 47 | touch DisplayEnergy/ModEntry.cs DisplayEnergy/manifest.json 48 | ``` 49 | 50 | # Development Environment 51 | 52 | Reproducible development environment for .NET projects which relies on 53 | [Nix](https://github.com/NixOS/nix) [Flakes](https://nixos.wiki/wiki/Flakes), 54 | a purely functional and cross-platform package manager. 55 | 56 | **Install Steam and Stardew Valley** 57 | 58 | On NixOS, add `programs.steam.enable = true;` to NixOS' configuration. 59 | 60 | **Start development environment** 61 | 62 | ```bash 63 | nix develop 64 | ``` 65 | 66 | **Once inside the development environment...** 67 | 68 | _...download and install [SMAPI](https://smapi.io/):_ 69 | 70 | ```bash 71 | curl -O -L https://github.com/Pathoschild/SMAPI/releases/download/4.0.8/SMAPI-4.0.8-installer.zip && 72 | unzip SMAPI-4.0.8-installer.zip && 73 | steam-run ./SMAPI\ 4.0.8\ installer/install\ on\ Linux.sh && 74 | rm -rf "SMAPI 4.0.8 installer" SMAPI-4.0.8-installer.zip 75 | ``` 76 | 77 | _...launch [JetBrains Rider](https://www.jetbrains.com/rider/) or another IDE:_ 78 | 79 | ```bash 80 | # Launch JetBrains Rider 81 | just code 82 | # Launch Visual Studio Code 83 | just code code 84 | ``` 85 | 86 | _...or perhaps execute any of the other [just](https://github.com/casey/just) 87 | recipes/commands included in the [justfile](./justfile):_ 88 | 89 | ```bash 90 | # List all available just recipes 91 | just 92 | ``` 93 | 94 | _...change whatever needs to change, then build and test the mod:_ 95 | 96 | ```bash 97 | just build 98 | # Then launch Stardew Valley, the mod will be installed 99 | ``` 100 | 101 | # How to Release a New Version 102 | 103 | 1. Update the [semantic version](https://semver.org/) in the [mod manifest](./DisplayEnergy/manifest.json) and the [project file](./DisplayEnergy/DisplayEnergy.csproj). 104 | 105 | 2. Push all changes. 106 | 107 | 3. Create a release with [_GitHub CLI_](https://cli.github.com/): 108 | 109 | ```bash 110 | VERSION=$(cat DisplayEnergy/manifest.json | jq --raw-output '.Version') gh release create $VERSION "DisplayEnergy/bin/Debug/net6.0/DisplayEnergy $VERSION.zip" 111 | ``` 112 | 113 | 4. Download the ZIP archive _DisplayEnergy.VERSION_NUMBER.zip_ from the new release and upload it to [ModDrop](https://www.moddrop.com/stardew-valley/mods/1087175-displayenergy) / [NexusMods](https://www.nexusmods.com/stardewvalley/mods/10662). 114 | -------------------------------------------------------------------------------- /DisplayEnergy/ModEntry.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Xna.Framework; 2 | 3 | using StardewModdingAPI; 4 | using StardewModdingAPI.Events; 5 | 6 | using StardewValley; 7 | using StardewValley.Extensions; 8 | 9 | namespace dmarcoux.Stardew.DisplayEnergy 10 | { 11 | /// The mod entry point. 12 | public class ModEntry : Mod 13 | { 14 | /********* 15 | ** Properties 16 | *********/ 17 | /// The mod configuration from the player. 18 | private ModConfig Config; 19 | 20 | /********* 21 | ** Public methods 22 | *********/ 23 | /// The mod entry point, called after the mod is first loaded. 24 | /// Provides simplified APIs for writing mods. 25 | public override void Entry(IModHelper helper) 26 | { 27 | this.Config = this.Helper.ReadConfig(); 28 | helper.Events.GameLoop.GameLaunched += this.RegisterForGenericModConfigMenu; 29 | helper.Events.Display.RenderingHud += this.DisplayStamina; 30 | } 31 | 32 | 33 | /********* 34 | ** Private methods 35 | *********/ 36 | /// Display the player's stamina 37 | /// The event sender. 38 | /// The event data. 39 | private void DisplayStamina(object sender, RenderingHudEventArgs e) 40 | { 41 | Vector2 energyTextOffset = this.Config.EnergyTextOffset; 42 | if (Game1.showingHealth) 43 | { 44 | float x = energyTextOffset.X; 45 | energyTextOffset = energyTextOffset with { X = x + 50 }; 46 | } 47 | 48 | if (!Game1.eventUp) 49 | { 50 | Game1.spriteBatch.DrawString(Game1.dialogueFont, $"{(int)Game1.player.Stamina}/{Game1.player.maxStamina}", new Vector2(Game1.graphics.GraphicsDevice.Viewport.GetTitleSafeArea().Right - energyTextOffset.X, Game1.graphics.GraphicsDevice.Viewport.GetTitleSafeArea().Bottom - energyTextOffset.Y), Color.White); 51 | } 52 | } 53 | 54 | /// 55 | /// Raised after the game is launched, right before the first update tick. 56 | /// This happens once per game session (unrelated to loading saves). 57 | /// All mods are loaded and initialised at this point, so this is a good time to set up mod integrations. 58 | /// 59 | /// The event sender 60 | /// The event data 61 | private void RegisterForGenericModConfigMenu(object sender, GameLaunchedEventArgs e) 62 | { 63 | // Get Generic Mod Config Menu's API (if it's installed) 64 | var configMenu = this.Helper.ModRegistry.GetApi("spacechase0.GenericModConfigMenu"); 65 | if (configMenu is null) 66 | { 67 | return; 68 | } 69 | 70 | // Register this mod 71 | configMenu.Register( 72 | mod: this.ModManifest, 73 | reset: () => this.Config = new ModConfig(), 74 | save: () => this.Helper.WriteConfig(this.Config) 75 | ); 76 | 77 | // Add config options 78 | configMenu.AddNumberOption( 79 | mod: this.ModManifest, 80 | name: () => "Horizontal offset from right", 81 | tooltip: () => "Sets how far the energy text is offset from the right side of the screen", 82 | getValue: () => (int)this.Config.EnergyTextOffset.X, 83 | setValue: value => 84 | { 85 | this.Config.EnergyTextOffset = 86 | this.Config.EnergyTextOffset with { X = value }; 87 | }, 88 | min: 0, 89 | max: Game1.graphics.GraphicsDevice.Viewport.GetTitleSafeArea().Right); 90 | 91 | configMenu.AddNumberOption( 92 | mod: this.ModManifest, 93 | name: () => "Vertical offset from bottom", 94 | tooltip: () => "Sets how far the energy text is offset from the bottom side of the screen", 95 | getValue: () => (int)this.Config.EnergyTextOffset.Y, 96 | setValue: value => 97 | { 98 | this.Config.EnergyTextOffset = 99 | this.Config.EnergyTextOffset with { Y = value }; 100 | }, 101 | min: 0, 102 | max: Game1.graphics.GraphicsDevice.Viewport.GetTitleSafeArea().Bottom); 103 | } 104 | } 105 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Ll]og/ 33 | [Ll]ogs/ 34 | 35 | # Visual Studio 2015/2017 cache/options directory 36 | .vs/ 37 | # Uncomment if you have tasks that create the project's static files in wwwroot 38 | #wwwroot/ 39 | 40 | # Visual Studio 2017 auto generated files 41 | Generated\ Files/ 42 | 43 | # MSTest test Results 44 | [Tt]est[Rr]esult*/ 45 | [Bb]uild[Ll]og.* 46 | 47 | # NUnit 48 | *.VisualState.xml 49 | TestResult.xml 50 | nunit-*.xml 51 | 52 | # Build Results of an ATL Project 53 | [Dd]ebugPS/ 54 | [Rr]eleasePS/ 55 | dlldata.c 56 | 57 | # Benchmark Results 58 | BenchmarkDotNet.Artifacts/ 59 | 60 | # .NET Core 61 | project.lock.json 62 | project.fragment.lock.json 63 | artifacts/ 64 | 65 | # Tye 66 | .tye/ 67 | 68 | # ASP.NET Scaffolding 69 | ScaffoldingReadMe.txt 70 | 71 | # StyleCop 72 | StyleCopReport.xml 73 | 74 | # Files built by Visual Studio 75 | *_i.c 76 | *_p.c 77 | *_h.h 78 | *.ilk 79 | *.meta 80 | *.obj 81 | *.iobj 82 | *.pch 83 | *.pdb 84 | *.ipdb 85 | *.pgc 86 | *.pgd 87 | *.rsp 88 | *.sbr 89 | *.tlb 90 | *.tli 91 | *.tlh 92 | *.tmp 93 | *.tmp_proj 94 | *_wpftmp.csproj 95 | *.log 96 | *.vspscc 97 | *.vssscc 98 | .builds 99 | *.pidb 100 | *.svclog 101 | *.scc 102 | 103 | # Chutzpah Test files 104 | _Chutzpah* 105 | 106 | # Visual C++ cache files 107 | ipch/ 108 | *.aps 109 | *.ncb 110 | *.opendb 111 | *.opensdf 112 | *.sdf 113 | *.cachefile 114 | *.VC.db 115 | *.VC.VC.opendb 116 | 117 | # Visual Studio profiler 118 | *.psess 119 | *.vsp 120 | *.vspx 121 | *.sap 122 | 123 | # Visual Studio Trace Files 124 | *.e2e 125 | 126 | # TFS 2012 Local Workspace 127 | $tf/ 128 | 129 | # Guidance Automation Toolkit 130 | *.gpState 131 | 132 | # ReSharper is a .NET coding add-in 133 | _ReSharper*/ 134 | *.[Rr]e[Ss]harper 135 | *.DotSettings.user 136 | 137 | # TeamCity is a build add-in 138 | _TeamCity* 139 | 140 | # DotCover is a Code Coverage Tool 141 | *.dotCover 142 | 143 | # AxoCover is a Code Coverage Tool 144 | .axoCover/* 145 | !.axoCover/settings.json 146 | 147 | # Coverlet is a free, cross platform Code Coverage Tool 148 | coverage*.json 149 | coverage*.xml 150 | coverage*.info 151 | 152 | # Visual Studio code coverage results 153 | *.coverage 154 | *.coveragexml 155 | 156 | # NCrunch 157 | _NCrunch_* 158 | .*crunch*.local.xml 159 | nCrunchTemp_* 160 | 161 | # MightyMoose 162 | *.mm.* 163 | AutoTest.Net/ 164 | 165 | # Web workbench (sass) 166 | .sass-cache/ 167 | 168 | # Installshield output folder 169 | [Ee]xpress/ 170 | 171 | # DocProject is a documentation generator add-in 172 | DocProject/buildhelp/ 173 | DocProject/Help/*.HxT 174 | DocProject/Help/*.HxC 175 | DocProject/Help/*.hhc 176 | DocProject/Help/*.hhk 177 | DocProject/Help/*.hhp 178 | DocProject/Help/Html2 179 | DocProject/Help/html 180 | 181 | # Click-Once directory 182 | publish/ 183 | 184 | # Publish Web Output 185 | *.[Pp]ublish.xml 186 | *.azurePubxml 187 | # Note: Comment the next line if you want to checkin your web deploy settings, 188 | # but database connection strings (with potential passwords) will be unencrypted 189 | *.pubxml 190 | *.publishproj 191 | 192 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 193 | # checkin your Azure Web App publish settings, but sensitive information contained 194 | # in these scripts will be unencrypted 195 | PublishScripts/ 196 | 197 | # NuGet Packages 198 | *.nupkg 199 | # NuGet Symbol Packages 200 | *.snupkg 201 | # The packages folder can be ignored because of Package Restore 202 | **/[Pp]ackages/* 203 | # except build/, which is used as an MSBuild target. 204 | !**/[Pp]ackages/build/ 205 | # Uncomment if necessary however generally it will be regenerated when needed 206 | #!**/[Pp]ackages/repositories.config 207 | # NuGet v3's project.json files produces more ignorable files 208 | *.nuget.props 209 | *.nuget.targets 210 | 211 | # Microsoft Azure Build Output 212 | csx/ 213 | *.build.csdef 214 | 215 | # Microsoft Azure Emulator 216 | ecf/ 217 | rcf/ 218 | 219 | # Windows Store app package directories and files 220 | AppPackages/ 221 | BundleArtifacts/ 222 | Package.StoreAssociation.xml 223 | _pkginfo.txt 224 | *.appx 225 | *.appxbundle 226 | *.appxupload 227 | 228 | # Visual Studio cache files 229 | # files ending in .cache can be ignored 230 | *.[Cc]ache 231 | # but keep track of directories ending in .cache 232 | !?*.[Cc]ache/ 233 | 234 | # Others 235 | ClientBin/ 236 | ~$* 237 | *~ 238 | *.dbmdl 239 | *.dbproj.schemaview 240 | *.jfm 241 | *.pfx 242 | *.publishsettings 243 | orleans.codegen.cs 244 | 245 | # Including strong name files can present a security risk 246 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 247 | #*.snk 248 | 249 | # Since there are multiple workflows, uncomment next line to ignore bower_components 250 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 251 | #bower_components/ 252 | 253 | # RIA/Silverlight projects 254 | Generated_Code/ 255 | 256 | # Backup & report files from converting an old project file 257 | # to a newer Visual Studio version. Backup files are not needed, 258 | # because we have git ;-) 259 | _UpgradeReport_Files/ 260 | Backup*/ 261 | UpgradeLog*.XML 262 | UpgradeLog*.htm 263 | ServiceFabricBackup/ 264 | *.rptproj.bak 265 | 266 | # SQL Server files 267 | *.mdf 268 | *.ldf 269 | *.ndf 270 | 271 | # Business Intelligence projects 272 | *.rdl.data 273 | *.bim.layout 274 | *.bim_*.settings 275 | *.rptproj.rsuser 276 | *- [Bb]ackup.rdl 277 | *- [Bb]ackup ([0-9]).rdl 278 | *- [Bb]ackup ([0-9][0-9]).rdl 279 | 280 | # Microsoft Fakes 281 | FakesAssemblies/ 282 | 283 | # GhostDoc plugin setting file 284 | *.GhostDoc.xml 285 | 286 | # Node.js Tools for Visual Studio 287 | .ntvs_analysis.dat 288 | node_modules/ 289 | 290 | # Visual Studio 6 build log 291 | *.plg 292 | 293 | # Visual Studio 6 workspace options file 294 | *.opt 295 | 296 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 297 | *.vbw 298 | 299 | # Visual Studio LightSwitch build output 300 | **/*.HTMLClient/GeneratedArtifacts 301 | **/*.DesktopClient/GeneratedArtifacts 302 | **/*.DesktopClient/ModelManifest.xml 303 | **/*.Server/GeneratedArtifacts 304 | **/*.Server/ModelManifest.xml 305 | _Pvt_Extensions 306 | 307 | # Paket dependency manager 308 | .paket/paket.exe 309 | paket-files/ 310 | 311 | # FAKE - F# Make 312 | .fake/ 313 | 314 | # CodeRush personal settings 315 | .cr/personal 316 | 317 | # Python Tools for Visual Studio (PTVS) 318 | __pycache__/ 319 | *.pyc 320 | 321 | # Cake - Uncomment if you are using it 322 | # tools/** 323 | # !tools/packages.config 324 | 325 | # Tabs Studio 326 | *.tss 327 | 328 | # Telerik's JustMock configuration file 329 | *.jmconfig 330 | 331 | # BizTalk build output 332 | *.btp.cs 333 | *.btm.cs 334 | *.odx.cs 335 | *.xsd.cs 336 | 337 | # OpenCover UI analysis results 338 | OpenCover/ 339 | 340 | # Azure Stream Analytics local run output 341 | ASALocalRun/ 342 | 343 | # MSBuild Binary and Structured Log 344 | *.binlog 345 | 346 | # NVidia Nsight GPU debugger configuration file 347 | *.nvuser 348 | 349 | # MFractors (Xamarin productivity tool) working folder 350 | .mfractor/ 351 | 352 | # Local History for Visual Studio 353 | .localhistory/ 354 | 355 | # BeatPulse healthcheck temp database 356 | healthchecksdb 357 | 358 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 359 | MigrationBackup/ 360 | 361 | # Ionide (cross platform F# VS Code tools) working folder 362 | .ionide/ 363 | 364 | # Fody - auto-generated XML schema 365 | FodyWeavers.xsd 366 | 367 | ## 368 | ## Visual studio for Mac 369 | ## 370 | 371 | 372 | # globs 373 | Makefile.in 374 | *.userprefs 375 | *.usertasks 376 | config.make 377 | config.status 378 | aclocal.m4 379 | install-sh 380 | autom4te.cache/ 381 | *.tar.gz 382 | tarballs/ 383 | test-results/ 384 | 385 | # Mac bundle stuff 386 | *.dmg 387 | *.app 388 | 389 | # content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore 390 | # General 391 | .DS_Store 392 | .AppleDouble 393 | .LSOverride 394 | 395 | # Icon must end with two \r 396 | Icon 397 | 398 | 399 | # Thumbnails 400 | ._* 401 | 402 | # Files that might appear in the root of a volume 403 | .DocumentRevisions-V100 404 | .fseventsd 405 | .Spotlight-V100 406 | .TemporaryItems 407 | .Trashes 408 | .VolumeIcon.icns 409 | .com.apple.timemachine.donotpresent 410 | 411 | # Directories potentially created on remote AFP share 412 | .AppleDB 413 | .AppleDesktop 414 | Network Trash Folder 415 | Temporary Items 416 | .apdisk 417 | 418 | # content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore 419 | # Windows thumbnail cache files 420 | Thumbs.db 421 | ehthumbs.db 422 | ehthumbs_vista.db 423 | 424 | # Dump file 425 | *.stackdump 426 | 427 | # Folder config file 428 | [Dd]esktop.ini 429 | 430 | # Recycle Bin used on file shares 431 | $RECYCLE.BIN/ 432 | 433 | # Windows Installer files 434 | *.cab 435 | *.msi 436 | *.msix 437 | *.msm 438 | *.msp 439 | 440 | # Windows shortcuts 441 | *.lnk 442 | 443 | # JetBrains Rider 444 | .idea/ 445 | *.sln.iml 446 | 447 | ## 448 | ## Visual Studio Code 449 | ## 450 | .vscode/* 451 | !.vscode/settings.json 452 | !.vscode/tasks.json 453 | !.vscode/launch.json 454 | !.vscode/extensions.json 455 | 456 | # Paths from the environment variables DOTNET_CLI_HOME and NUGET_PACKAGES 457 | .net_cli_home 458 | .nuget_packages 459 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | # All files 4 | [*] 5 | indent_style = space 6 | 7 | # Xml files 8 | [*.xml] 9 | indent_size = 2 10 | 11 | # C# files 12 | [*.cs] 13 | 14 | #### Core EditorConfig Options #### 15 | 16 | # Indentation and spacing 17 | indent_size = 4 18 | tab_width = 4 19 | 20 | # New line preferences 21 | end_of_line = crlf 22 | insert_final_newline = false 23 | 24 | #### .NET Coding Conventions #### 25 | [*.{cs,vb}] 26 | 27 | # Organize usings 28 | dotnet_separate_import_directive_groups = true 29 | dotnet_sort_system_directives_first = true 30 | file_header_template = unset 31 | 32 | # this. and Me. preferences 33 | dotnet_style_qualification_for_event = false:silent 34 | dotnet_style_qualification_for_field = false:silent 35 | dotnet_style_qualification_for_method = false:silent 36 | dotnet_style_qualification_for_property = false:silent 37 | 38 | # Language keywords vs BCL types preferences 39 | dotnet_style_predefined_type_for_locals_parameters_members = true:silent 40 | dotnet_style_predefined_type_for_member_access = true:silent 41 | 42 | # Parentheses preferences 43 | dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent 44 | dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent 45 | dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent 46 | dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent 47 | 48 | # Modifier preferences 49 | dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent 50 | 51 | # Expression-level preferences 52 | dotnet_style_coalesce_expression = true:suggestion 53 | dotnet_style_collection_initializer = true:suggestion 54 | dotnet_style_explicit_tuple_names = true:suggestion 55 | dotnet_style_null_propagation = true:suggestion 56 | dotnet_style_object_initializer = true:suggestion 57 | dotnet_style_operator_placement_when_wrapping = beginning_of_line 58 | dotnet_style_prefer_auto_properties = true:suggestion 59 | dotnet_style_prefer_compound_assignment = true:suggestion 60 | dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion 61 | dotnet_style_prefer_conditional_expression_over_return = true:suggestion 62 | dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion 63 | dotnet_style_prefer_inferred_tuple_names = true:suggestion 64 | dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion 65 | dotnet_style_prefer_simplified_boolean_expressions = true:suggestion 66 | dotnet_style_prefer_simplified_interpolation = true:suggestion 67 | 68 | # Field preferences 69 | dotnet_style_readonly_field = true:warning 70 | 71 | # Parameter preferences 72 | dotnet_code_quality_unused_parameters = all:suggestion 73 | 74 | # Suppression preferences 75 | dotnet_remove_unnecessary_suppression_exclusions = none 76 | 77 | #### C# Coding Conventions #### 78 | [*.cs] 79 | 80 | # var preferences 81 | csharp_style_var_elsewhere = false:silent 82 | csharp_style_var_for_built_in_types = false:silent 83 | csharp_style_var_when_type_is_apparent = false:silent 84 | 85 | # Expression-bodied members 86 | csharp_style_expression_bodied_accessors = true:silent 87 | csharp_style_expression_bodied_constructors = false:silent 88 | csharp_style_expression_bodied_indexers = true:silent 89 | csharp_style_expression_bodied_lambdas = true:suggestion 90 | csharp_style_expression_bodied_local_functions = false:silent 91 | csharp_style_expression_bodied_methods = false:silent 92 | csharp_style_expression_bodied_operators = false:silent 93 | csharp_style_expression_bodied_properties = true:silent 94 | 95 | # Pattern matching preferences 96 | csharp_style_pattern_matching_over_as_with_null_check = true:suggestion 97 | csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion 98 | csharp_style_prefer_not_pattern = true:suggestion 99 | csharp_style_prefer_pattern_matching = true:silent 100 | csharp_style_prefer_switch_expression = true:suggestion 101 | 102 | # Null-checking preferences 103 | csharp_style_conditional_delegate_call = true:suggestion 104 | 105 | # Modifier preferences 106 | csharp_prefer_static_local_function = true:warning 107 | csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:silent 108 | 109 | # Code-block preferences 110 | csharp_prefer_braces = true:silent 111 | csharp_prefer_simple_using_statement = true:suggestion 112 | 113 | # Expression-level preferences 114 | csharp_prefer_simple_default_expression = true:suggestion 115 | csharp_style_deconstructed_variable_declaration = true:suggestion 116 | csharp_style_inlined_variable_declaration = true:suggestion 117 | csharp_style_pattern_local_over_anonymous_function = true:suggestion 118 | csharp_style_prefer_index_operator = true:suggestion 119 | csharp_style_prefer_range_operator = true:suggestion 120 | csharp_style_throw_expression = true:suggestion 121 | csharp_style_unused_value_assignment_preference = discard_variable:suggestion 122 | csharp_style_unused_value_expression_statement_preference = discard_variable:silent 123 | 124 | # 'using' directive preferences 125 | csharp_using_directive_placement = outside_namespace:silent 126 | 127 | #### C# Formatting Rules #### 128 | 129 | # New line preferences 130 | csharp_new_line_before_catch = true 131 | csharp_new_line_before_else = true 132 | csharp_new_line_before_finally = true 133 | csharp_new_line_before_members_in_anonymous_types = true 134 | csharp_new_line_before_members_in_object_initializers = true 135 | csharp_new_line_before_open_brace = all 136 | csharp_new_line_between_query_expression_clauses = true 137 | 138 | # Indentation preferences 139 | csharp_indent_block_contents = true 140 | csharp_indent_braces = false 141 | csharp_indent_case_contents = true 142 | csharp_indent_case_contents_when_block = true 143 | csharp_indent_labels = one_less_than_current 144 | csharp_indent_switch_labels = true 145 | 146 | # Space preferences 147 | csharp_space_after_cast = false 148 | csharp_space_after_colon_in_inheritance_clause = true 149 | csharp_space_after_comma = true 150 | csharp_space_after_dot = false 151 | csharp_space_after_keywords_in_control_flow_statements = true 152 | csharp_space_after_semicolon_in_for_statement = true 153 | csharp_space_around_binary_operators = before_and_after 154 | csharp_space_around_declaration_statements = false 155 | csharp_space_before_colon_in_inheritance_clause = true 156 | csharp_space_before_comma = false 157 | csharp_space_before_dot = false 158 | csharp_space_before_open_square_brackets = false 159 | csharp_space_before_semicolon_in_for_statement = false 160 | csharp_space_between_empty_square_brackets = false 161 | csharp_space_between_method_call_empty_parameter_list_parentheses = false 162 | csharp_space_between_method_call_name_and_opening_parenthesis = false 163 | csharp_space_between_method_call_parameter_list_parentheses = false 164 | csharp_space_between_method_declaration_empty_parameter_list_parentheses = false 165 | csharp_space_between_method_declaration_name_and_open_parenthesis = false 166 | csharp_space_between_method_declaration_parameter_list_parentheses = false 167 | csharp_space_between_parentheses = false 168 | csharp_space_between_square_brackets = false 169 | 170 | # Wrapping preferences 171 | csharp_preserve_single_line_blocks = true 172 | csharp_preserve_single_line_statements = true 173 | 174 | #### Naming styles #### 175 | [*.{cs,vb}] 176 | 177 | # Naming rules 178 | 179 | dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.severity = suggestion 180 | dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.symbols = types_and_namespaces 181 | dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.style = pascalcase 182 | 183 | dotnet_naming_rule.interfaces_should_be_ipascalcase.severity = suggestion 184 | dotnet_naming_rule.interfaces_should_be_ipascalcase.symbols = interfaces 185 | dotnet_naming_rule.interfaces_should_be_ipascalcase.style = ipascalcase 186 | 187 | dotnet_naming_rule.type_parameters_should_be_tpascalcase.severity = suggestion 188 | dotnet_naming_rule.type_parameters_should_be_tpascalcase.symbols = type_parameters 189 | dotnet_naming_rule.type_parameters_should_be_tpascalcase.style = tpascalcase 190 | 191 | dotnet_naming_rule.methods_should_be_pascalcase.severity = suggestion 192 | dotnet_naming_rule.methods_should_be_pascalcase.symbols = methods 193 | dotnet_naming_rule.methods_should_be_pascalcase.style = pascalcase 194 | 195 | dotnet_naming_rule.properties_should_be_pascalcase.severity = suggestion 196 | dotnet_naming_rule.properties_should_be_pascalcase.symbols = properties 197 | dotnet_naming_rule.properties_should_be_pascalcase.style = pascalcase 198 | 199 | dotnet_naming_rule.events_should_be_pascalcase.severity = suggestion 200 | dotnet_naming_rule.events_should_be_pascalcase.symbols = events 201 | dotnet_naming_rule.events_should_be_pascalcase.style = pascalcase 202 | 203 | dotnet_naming_rule.local_variables_should_be_camelcase.severity = suggestion 204 | dotnet_naming_rule.local_variables_should_be_camelcase.symbols = local_variables 205 | dotnet_naming_rule.local_variables_should_be_camelcase.style = camelcase 206 | 207 | dotnet_naming_rule.local_constants_should_be_camelcase.severity = suggestion 208 | dotnet_naming_rule.local_constants_should_be_camelcase.symbols = local_constants 209 | dotnet_naming_rule.local_constants_should_be_camelcase.style = camelcase 210 | 211 | dotnet_naming_rule.parameters_should_be_camelcase.severity = suggestion 212 | dotnet_naming_rule.parameters_should_be_camelcase.symbols = parameters 213 | dotnet_naming_rule.parameters_should_be_camelcase.style = camelcase 214 | 215 | dotnet_naming_rule.public_fields_should_be_pascalcase.severity = suggestion 216 | dotnet_naming_rule.public_fields_should_be_pascalcase.symbols = public_fields 217 | dotnet_naming_rule.public_fields_should_be_pascalcase.style = pascalcase 218 | 219 | dotnet_naming_rule.private_fields_should_be__camelcase.severity = suggestion 220 | dotnet_naming_rule.private_fields_should_be__camelcase.symbols = private_fields 221 | dotnet_naming_rule.private_fields_should_be__camelcase.style = _camelcase 222 | 223 | dotnet_naming_rule.private_static_fields_should_be_s_camelcase.severity = suggestion 224 | dotnet_naming_rule.private_static_fields_should_be_s_camelcase.symbols = private_static_fields 225 | dotnet_naming_rule.private_static_fields_should_be_s_camelcase.style = s_camelcase 226 | 227 | dotnet_naming_rule.public_constant_fields_should_be_pascalcase.severity = suggestion 228 | dotnet_naming_rule.public_constant_fields_should_be_pascalcase.symbols = public_constant_fields 229 | dotnet_naming_rule.public_constant_fields_should_be_pascalcase.style = pascalcase 230 | 231 | dotnet_naming_rule.private_constant_fields_should_be_pascalcase.severity = suggestion 232 | dotnet_naming_rule.private_constant_fields_should_be_pascalcase.symbols = private_constant_fields 233 | dotnet_naming_rule.private_constant_fields_should_be_pascalcase.style = pascalcase 234 | 235 | dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.severity = suggestion 236 | dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.symbols = public_static_readonly_fields 237 | dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.style = pascalcase 238 | 239 | dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.severity = suggestion 240 | dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.symbols = private_static_readonly_fields 241 | dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = pascalcase 242 | 243 | dotnet_naming_rule.enums_should_be_pascalcase.severity = suggestion 244 | dotnet_naming_rule.enums_should_be_pascalcase.symbols = enums 245 | dotnet_naming_rule.enums_should_be_pascalcase.style = pascalcase 246 | 247 | dotnet_naming_rule.local_functions_should_be_pascalcase.severity = suggestion 248 | dotnet_naming_rule.local_functions_should_be_pascalcase.symbols = local_functions 249 | dotnet_naming_rule.local_functions_should_be_pascalcase.style = pascalcase 250 | 251 | dotnet_naming_rule.non_field_members_should_be_pascalcase.severity = suggestion 252 | dotnet_naming_rule.non_field_members_should_be_pascalcase.symbols = non_field_members 253 | dotnet_naming_rule.non_field_members_should_be_pascalcase.style = pascalcase 254 | 255 | # Symbol specifications 256 | 257 | dotnet_naming_symbols.interfaces.applicable_kinds = interface 258 | dotnet_naming_symbols.interfaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 259 | dotnet_naming_symbols.interfaces.required_modifiers = 260 | 261 | dotnet_naming_symbols.enums.applicable_kinds = enum 262 | dotnet_naming_symbols.enums.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 263 | dotnet_naming_symbols.enums.required_modifiers = 264 | 265 | dotnet_naming_symbols.events.applicable_kinds = event 266 | dotnet_naming_symbols.events.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 267 | dotnet_naming_symbols.events.required_modifiers = 268 | 269 | dotnet_naming_symbols.methods.applicable_kinds = method 270 | dotnet_naming_symbols.methods.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 271 | dotnet_naming_symbols.methods.required_modifiers = 272 | 273 | dotnet_naming_symbols.properties.applicable_kinds = property 274 | dotnet_naming_symbols.properties.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 275 | dotnet_naming_symbols.properties.required_modifiers = 276 | 277 | dotnet_naming_symbols.public_fields.applicable_kinds = field 278 | dotnet_naming_symbols.public_fields.applicable_accessibilities = public, internal 279 | dotnet_naming_symbols.public_fields.required_modifiers = 280 | 281 | dotnet_naming_symbols.private_fields.applicable_kinds = field 282 | dotnet_naming_symbols.private_fields.applicable_accessibilities = private, protected, protected_internal, private_protected 283 | dotnet_naming_symbols.private_fields.required_modifiers = 284 | 285 | dotnet_naming_symbols.private_static_fields.applicable_kinds = field 286 | dotnet_naming_symbols.private_static_fields.applicable_accessibilities = private, protected, protected_internal, private_protected 287 | dotnet_naming_symbols.private_static_fields.required_modifiers = static 288 | 289 | dotnet_naming_symbols.types_and_namespaces.applicable_kinds = namespace, class, struct, interface, enum 290 | dotnet_naming_symbols.types_and_namespaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 291 | dotnet_naming_symbols.types_and_namespaces.required_modifiers = 292 | 293 | dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method 294 | dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 295 | dotnet_naming_symbols.non_field_members.required_modifiers = 296 | 297 | dotnet_naming_symbols.type_parameters.applicable_kinds = namespace 298 | dotnet_naming_symbols.type_parameters.applicable_accessibilities = * 299 | dotnet_naming_symbols.type_parameters.required_modifiers = 300 | 301 | dotnet_naming_symbols.private_constant_fields.applicable_kinds = field 302 | dotnet_naming_symbols.private_constant_fields.applicable_accessibilities = private, protected, protected_internal, private_protected 303 | dotnet_naming_symbols.private_constant_fields.required_modifiers = const 304 | 305 | dotnet_naming_symbols.local_variables.applicable_kinds = local 306 | dotnet_naming_symbols.local_variables.applicable_accessibilities = local 307 | dotnet_naming_symbols.local_variables.required_modifiers = 308 | 309 | dotnet_naming_symbols.local_constants.applicable_kinds = local 310 | dotnet_naming_symbols.local_constants.applicable_accessibilities = local 311 | dotnet_naming_symbols.local_constants.required_modifiers = const 312 | 313 | dotnet_naming_symbols.parameters.applicable_kinds = parameter 314 | dotnet_naming_symbols.parameters.applicable_accessibilities = * 315 | dotnet_naming_symbols.parameters.required_modifiers = 316 | 317 | dotnet_naming_symbols.public_constant_fields.applicable_kinds = field 318 | dotnet_naming_symbols.public_constant_fields.applicable_accessibilities = public, internal 319 | dotnet_naming_symbols.public_constant_fields.required_modifiers = const 320 | 321 | dotnet_naming_symbols.public_static_readonly_fields.applicable_kinds = field 322 | dotnet_naming_symbols.public_static_readonly_fields.applicable_accessibilities = public, internal 323 | dotnet_naming_symbols.public_static_readonly_fields.required_modifiers = readonly, static 324 | 325 | dotnet_naming_symbols.private_static_readonly_fields.applicable_kinds = field 326 | dotnet_naming_symbols.private_static_readonly_fields.applicable_accessibilities = private, protected, protected_internal, private_protected 327 | dotnet_naming_symbols.private_static_readonly_fields.required_modifiers = readonly, static 328 | 329 | dotnet_naming_symbols.local_functions.applicable_kinds = local_function 330 | dotnet_naming_symbols.local_functions.applicable_accessibilities = * 331 | dotnet_naming_symbols.local_functions.required_modifiers = 332 | 333 | # Naming styles 334 | 335 | dotnet_naming_style.pascalcase.required_prefix = 336 | dotnet_naming_style.pascalcase.required_suffix = 337 | dotnet_naming_style.pascalcase.word_separator = 338 | dotnet_naming_style.pascalcase.capitalization = pascal_case 339 | 340 | dotnet_naming_style.ipascalcase.required_prefix = I 341 | dotnet_naming_style.ipascalcase.required_suffix = 342 | dotnet_naming_style.ipascalcase.word_separator = 343 | dotnet_naming_style.ipascalcase.capitalization = pascal_case 344 | 345 | dotnet_naming_style.tpascalcase.required_prefix = T 346 | dotnet_naming_style.tpascalcase.required_suffix = 347 | dotnet_naming_style.tpascalcase.word_separator = 348 | dotnet_naming_style.tpascalcase.capitalization = pascal_case 349 | 350 | dotnet_naming_style._camelcase.required_prefix = _ 351 | dotnet_naming_style._camelcase.required_suffix = 352 | dotnet_naming_style._camelcase.word_separator = 353 | dotnet_naming_style._camelcase.capitalization = camel_case 354 | 355 | dotnet_naming_style.camelcase.required_prefix = 356 | dotnet_naming_style.camelcase.required_suffix = 357 | dotnet_naming_style.camelcase.word_separator = 358 | dotnet_naming_style.camelcase.capitalization = camel_case 359 | 360 | dotnet_naming_style.s_camelcase.required_prefix = s_ 361 | dotnet_naming_style.s_camelcase.required_suffix = 362 | dotnet_naming_style.s_camelcase.word_separator = 363 | dotnet_naming_style.s_camelcase.capitalization = camel_case 364 | 365 | --------------------------------------------------------------------------------