forked from Reloaded-Project/Reloaded-II
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated: Mod Template w/ New Upgradable Format & Standard Features
Updated: Reloaded Mod Template Wiki Page
- Loading branch information
Showing
18 changed files
with
736 additions
and
440 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
source/Reloaded.Mod.Template/templates/configurable/Config.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
#if (IncludeConfig) | ||
using System.ComponentModel; | ||
using Reloaded.Mod.Interfaces; | ||
|
||
namespace Reloaded.Mod.Template.Template.Configuration; | ||
|
||
public class Config : Configurable<Config> | ||
{ | ||
/* | ||
User Properties: | ||
- Please put all of your configurable properties here. | ||
By default, configuration saves as "Config.json" in mod user config folder. | ||
Need more config files/classes? See Configuration.cs | ||
Available Attributes: | ||
- Category | ||
- DisplayName | ||
- Description | ||
- DefaultValue | ||
// Technically Supported but not Useful | ||
- Browsable | ||
- Localizable | ||
The `DefaultValue` attribute is used as part of the `Reset` button in Reloaded-Launcher. | ||
*/ | ||
|
||
[DisplayName("String")] | ||
[Description("This is a string.")] | ||
[DefaultValue("Default Name")] | ||
public string String { get; set; } = "Default Name"; | ||
|
||
[DisplayName("Int")] | ||
[Description("This is an int.")] | ||
[DefaultValue(42)] | ||
public int Integer { get; set; } = 42; | ||
|
||
[DisplayName("Bool")] | ||
[Description("This is a bool.")] | ||
[DefaultValue(true)] | ||
public bool Boolean { get; set; } = true; | ||
|
||
[DisplayName("Float")] | ||
[Description("This is a floating point number.")] | ||
[DefaultValue(6.987654F)] | ||
public float Float { get; set; } = 6.987654F; | ||
|
||
[DisplayName("Enum")] | ||
[Description("This is an enumerable.")] | ||
[DefaultValue(SampleEnum.ILoveIt)] | ||
public SampleEnum Reloaded { get; set; } = SampleEnum.ILoveIt; | ||
|
||
public enum SampleEnum | ||
{ | ||
NoOpinion, | ||
Sucks, | ||
IsMediocre, | ||
IsOk, | ||
IsCool, | ||
ILoveIt | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Allows you to override certain aspects of the configuration creation process (e.g. create multiple configurations). | ||
/// Override elements in <see cref="ConfiguratorMixinBase"/> for finer control. | ||
/// </summary> | ||
public class ConfiguratorMixin : ConfiguratorMixinBase | ||
{ | ||
// | ||
} | ||
#endif |
64 changes: 0 additions & 64 deletions
64
source/Reloaded.Mod.Template/templates/configurable/Configuration/Config.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.