-
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.
-tons of ugly code to recolor various parts of the M1911Tactical -tons of ugly code to correct M1911Tactical & M1911Operator low cap mag position
- Loading branch information
1 parent
73dfea3
commit 439695b
Showing
16 changed files
with
447 additions
and
44 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
File renamed without changes.
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,19 @@ | ||
using BepInEx.Configuration; | ||
using UnityEngine; | ||
|
||
namespace Better1911.Configs | ||
{ | ||
public class FrameConfig : SharedConfigs | ||
{ | ||
public FrameConfig(string section, ConfigFile config) | ||
{ | ||
Color c = new Color32(0xFF, 0xFF, 0xFF, 0xFF); | ||
Recolor = config.Bind(section, nameof(Recolor), c, "Color of the frame"); | ||
Roughness = config.Bind(section, nameof(Roughness), 1f, "Roughness of the material. Decrease for a more mirrored finish."); | ||
Metallic = config.Bind(section, nameof(Metallic), 1f, "Metallic value for the material. Decrease for a flatter more polymer look."); | ||
NormalStrength = config.Bind(section, nameof(NormalStrength), 1f, "Strength of the normal maps. Increase this for a more rugged look or decrease for a smoother look."); | ||
Specularity = config.Bind(section, nameof(Specularity), 0f, "Specularity for the material."); | ||
RemoveTexture = config.Bind(section, nameof(RemoveTexture), false, "Enable to remove texture. This can allow cleaner finishes and better recoloring."); | ||
} | ||
} | ||
} |
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,21 @@ | ||
using BepInEx.Configuration; | ||
using Color = UnityEngine.Color; | ||
|
||
namespace Better1911.Configs | ||
{ | ||
public class GlowSightsConfig | ||
{ | ||
public ConfigEntry<bool> DisableGlowSights { get; } | ||
public ConfigEntry<bool> CustomColor { get; } | ||
public ConfigEntry<Color> RearColor { get; } | ||
public ConfigEntry<Color> FrontColor { get; } | ||
|
||
public GlowSightsConfig(string section, ConfigFile config) | ||
{ | ||
DisableGlowSights = config.Bind(section, nameof(DisableGlowSights), false, "Hide the glow sights"); | ||
CustomColor = config.Bind(section, nameof(CustomColor), false, "Enable custom coloring of the glow sights"); | ||
RearColor = config.Bind(section, nameof(RearColor), Color.blue, "Color of the rear glow sights"); | ||
FrontColor = config.Bind(section, nameof(FrontColor), Color.yellow, "Color of the front glow sight"); | ||
} | ||
} | ||
} |
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,18 @@ | ||
using BepInEx.Configuration; | ||
using UnityEngine; | ||
|
||
namespace Better1911.Configs | ||
{ | ||
public class GripsConfig : SharedConfigs | ||
{ | ||
public GripsConfig(string section, ConfigFile config) | ||
{ | ||
Color c = new Color32(0x1C, 0x1C, 0x1C, 0xFF); | ||
Recolor = config.Bind(section, nameof(Recolor), c, "Color of the grips"); | ||
Roughness = config.Bind(section, nameof(Roughness), 0.409f, "Roughness of the material. Decrease for a more mirrored finish."); | ||
Metallic = config.Bind(section, nameof(Metallic), 0.489f, "Metallic value for the material. Decrease for a flatter more polymer look."); | ||
NormalStrength = config.Bind(section, nameof(NormalStrength), 1f, "Strength of the normal maps. Increase this for a more rugged look or decrease for a smoother look."); | ||
Specularity = config.Bind(section, nameof(Specularity), 0f, "Specularity for the material."); | ||
} | ||
} | ||
} |
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,22 @@ | ||
using BepInEx.Configuration; | ||
|
||
namespace Better1911.Configs | ||
{ | ||
public class GunCustomizationConfig | ||
{ | ||
public ConfigEntry<bool> CustomMaterials { get; } | ||
|
||
public FrameConfig Frame { get; } | ||
public SlideConfig Slide { get; } | ||
public GripsConfig Grips { get; } | ||
|
||
public GunCustomizationConfig(string section, ConfigFile config) | ||
{ | ||
CustomMaterials = config.Bind(section, nameof(CustomMaterials), false, "Enable material editing"); | ||
|
||
Slide = new SlideConfig(nameof(Slide), config); | ||
Frame = new FrameConfig(nameof(Frame), config); | ||
Grips = new GripsConfig(nameof(Grips), config); | ||
} | ||
} | ||
} |
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,22 @@ | ||
using BepInEx.Configuration; | ||
|
||
namespace Better1911.Configs | ||
{ | ||
public class MagazineConfig | ||
{ | ||
public ConfigEntry<bool> FixMagPos { get; } | ||
public ConfigEntry<MagazineMaterial> CustomMagazineMaterial { get; } | ||
public MagazineConfig(string section, ConfigFile config) | ||
{ | ||
FixMagPos = config.Bind(section, nameof(FixMagPos), true, "Attempts to fix the standard capacity magazine positions for M1911 Tactical & Operator"); | ||
CustomMagazineMaterial = config.Bind(section, nameof(CustomMagazineMaterial), MagazineMaterial.Default, "Select Slide or Frame if you want your magazine material to match"); | ||
} | ||
|
||
public enum MagazineMaterial | ||
{ | ||
Default, | ||
Slide, | ||
Frame | ||
} | ||
} | ||
} |
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,21 @@ | ||
using BepInEx.Configuration; | ||
|
||
namespace Better1911.Configs | ||
{ | ||
public class RootConfig | ||
{ | ||
public ConfigEntry<bool> DisableRedDot { get; } | ||
public GlowSightsConfig GlowSights { get; } | ||
public GunCustomizationConfig GunCustomization { get; } | ||
public MagazineConfig Magazine { get; } | ||
|
||
public RootConfig(ConfigFile config) | ||
{ | ||
DisableRedDot = config.Bind("Red Dot", nameof(DisableRedDot), true, "Hide the red dot"); | ||
|
||
GlowSights = new GlowSightsConfig(nameof(GlowSights), config); | ||
GunCustomization = new GunCustomizationConfig(nameof(GunCustomization), config); | ||
Magazine = new MagazineConfig(nameof(Magazine), config); | ||
} | ||
} | ||
} |
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,21 @@ | ||
using BepInEx.Configuration; | ||
using UnityEngine; | ||
|
||
namespace Better1911.Configs | ||
{ | ||
public class SharedConfigs : IConfig | ||
{ | ||
public ConfigEntry<Color> Recolor { get; set; } | ||
public ConfigEntry<float> Roughness { get; set; } | ||
public ConfigEntry<float> Metallic { get; set; } | ||
public ConfigEntry<float> NormalStrength { get; set; } | ||
public ConfigEntry<float> Specularity { get; set; } | ||
public ConfigEntry<bool> RemoveTexture { get; set; } | ||
|
||
Color IConfig.Recolor => Recolor.Value; | ||
float IConfig.Roughness => Roughness.Value; | ||
float IConfig.Metallic => Metallic.Value; | ||
float IConfig.NormalStrength => NormalStrength.Value; | ||
float IConfig.Specularity => Specularity.Value; | ||
} | ||
} |
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,19 @@ | ||
using BepInEx.Configuration; | ||
using UnityEngine; | ||
|
||
namespace Better1911.Configs | ||
{ | ||
public class SlideConfig : SharedConfigs | ||
{ | ||
public SlideConfig(string section, ConfigFile config) | ||
{ | ||
Color c = new Color32(0xFF, 0xFF, 0xFF, 0xFF); | ||
Recolor = config.Bind(section, nameof(Recolor), c, "Color of the slide"); | ||
Roughness = config.Bind(section, nameof(Roughness), 1f, "Roughness of the material. Decrease for a more mirrored finish."); | ||
Metallic = config.Bind(section, nameof(Metallic), 1f, "Metallic value for the material. Decrease for a flatter more polymer look."); | ||
NormalStrength = config.Bind(section, nameof(NormalStrength), 1f, "Strength of the normal maps. Increase this for a more rugged look or decrease for a smoother look."); | ||
Specularity = config.Bind(section, nameof(Specularity), 1f, "Specularity for the material."); | ||
RemoveTexture = config.Bind(section, nameof(RemoveTexture), false, "Enable to remove texture. This can allow cleaner finishes and better recoloring."); | ||
} | ||
} | ||
} |
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,13 @@ | ||
using UnityEngine; | ||
|
||
namespace Better1911 | ||
{ | ||
public interface IConfig | ||
{ | ||
float Metallic { get; } | ||
float NormalStrength { get; } | ||
float Roughness { get; } | ||
Color Recolor { get; } | ||
float Specularity { get; } | ||
} | ||
} |
Oops, something went wrong.