Update
This commit is contained in:
parent
3a9b693802
commit
c8d4462c18
@ -19,7 +19,7 @@ namespace SkinHide.Patches
|
|||||||
{
|
{
|
||||||
await __result;
|
await __result;
|
||||||
|
|
||||||
SkinHidePlugin.PlayerModelView = __instance.GetComponentInChildren<PlayerBody>();
|
SkinHidePlugin.PlayerModelView = __instance.PlayerBody;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,11 +20,11 @@ namespace SkinHide.Patches
|
|||||||
|
|
||||||
if (__instance.IsYourPlayer)
|
if (__instance.IsYourPlayer)
|
||||||
{
|
{
|
||||||
SkinHidePlugin.Player = __instance.GetComponentInChildren<PlayerBody>();
|
SkinHidePlugin.Player = __instance.PlayerBody;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SkinHidePlugin.Bot.Add(__instance.GetComponentInChildren<PlayerBody>());
|
SkinHidePlugin.Bot.Add(__instance.PlayerBody);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||||
//通过使用 "*",如下所示:
|
//通过使用 "*",如下所示:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.3.0")]
|
[assembly: AssemblyVersion("1.2.4.0")]
|
||||||
[assembly: AssemblyFileVersion("1.2.3.0")]
|
[assembly: AssemblyFileVersion("1.2.4.0")]
|
||||||
|
@ -10,7 +10,7 @@ using SkinHide.Patches;
|
|||||||
|
|
||||||
namespace SkinHide
|
namespace SkinHide
|
||||||
{
|
{
|
||||||
[BepInPlugin("com.kmyuhkyuk.SkinHide", "kmyuhkyuk-SkinHide", "1.2.3")]
|
[BepInPlugin("com.kmyuhkyuk.SkinHide", "kmyuhkyuk-SkinHide", "1.2.4")]
|
||||||
public class SkinHidePlugin : BaseUnityPlugin
|
public class SkinHidePlugin : BaseUnityPlugin
|
||||||
{
|
{
|
||||||
public static PlayerBody Player;
|
public static PlayerBody Player;
|
||||||
@ -19,6 +19,8 @@ namespace SkinHide
|
|||||||
|
|
||||||
public static List <PlayerBody> Bot = new List<PlayerBody>();
|
public static List <PlayerBody> Bot = new List<PlayerBody>();
|
||||||
|
|
||||||
|
private SettingsData settingsdata = new SettingsData();
|
||||||
|
|
||||||
public enum Part
|
public enum Part
|
||||||
{
|
{
|
||||||
All,
|
All,
|
||||||
@ -26,15 +28,6 @@ namespace SkinHide
|
|||||||
SkinDress
|
SkinDress
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ConfigEntry<bool> KeyPlayerSkinHide;
|
|
||||||
public static ConfigEntry<bool> KeyBotSkinHide;
|
|
||||||
|
|
||||||
public static ConfigEntry<Part> KeyPlayerSkinHidePart;
|
|
||||||
public static ConfigEntry<Part> KeyBotSkinHidePart;
|
|
||||||
|
|
||||||
public static ConfigEntry<KeyboardShortcut> KBSPlayerSkinHide;
|
|
||||||
public static ConfigEntry<KeyboardShortcut> KBSBotSkinHide;
|
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
Logger.LogInfo("Loaded: kmyuhkyuk-SkinHide");
|
Logger.LogInfo("Loaded: kmyuhkyuk-SkinHide");
|
||||||
@ -43,14 +36,14 @@ namespace SkinHide
|
|||||||
string SkinHidePartSettings = "隐藏部分设置 Skin Hide Part Settings";
|
string SkinHidePartSettings = "隐藏部分设置 Skin Hide Part Settings";
|
||||||
string KBSSettings = "快捷键设置 Keyboard Shortcut Settings";
|
string KBSSettings = "快捷键设置 Keyboard Shortcut Settings";
|
||||||
|
|
||||||
KeyPlayerSkinHide = Config.Bind<bool>(SkinHideSettings, "玩家服装隐藏 Player Skin Hide", false);
|
settingsdata.KeyPlayerSkinHide = Config.Bind<bool>(SkinHideSettings, "玩家服装隐藏 Player Skin Hide", false);
|
||||||
KeyBotSkinHide = Config.Bind<bool>(SkinHideSettings, "Bot服装隐藏 Bot Skin Hide", false);
|
settingsdata.KeyBotSkinHide = Config.Bind<bool>(SkinHideSettings, "Bot服装隐藏 Bot Skin Hide", false);
|
||||||
|
|
||||||
KeyPlayerSkinHidePart = Config.Bind<Part>(SkinHidePartSettings, "Player", Part.All);
|
settingsdata.KeyPlayerSkinHidePart = Config.Bind<Part>(SkinHidePartSettings, "Player", Part.All);
|
||||||
KeyBotSkinHidePart = Config.Bind<Part>(SkinHidePartSettings, "Bot", Part.All);
|
settingsdata.KeyBotSkinHidePart = Config.Bind<Part>(SkinHidePartSettings, "Bot", Part.All);
|
||||||
|
|
||||||
KBSPlayerSkinHide = Config.Bind<KeyboardShortcut>(KBSSettings, "玩家服装隐藏快捷键 Player Skin Hide", KeyboardShortcut.Empty);
|
settingsdata.KBSPlayerSkinHide = Config.Bind<KeyboardShortcut>(KBSSettings, "玩家服装隐藏快捷键 Player Skin Hide", KeyboardShortcut.Empty);
|
||||||
KBSBotSkinHide = Config.Bind<KeyboardShortcut>(KBSSettings, "Bot服装隐藏快捷键 Bot Skin Hide", KeyboardShortcut.Empty);
|
settingsdata.KBSBotSkinHide = Config.Bind<KeyboardShortcut>(KBSSettings, "Bot服装隐藏快捷键 Bot Skin Hide", KeyboardShortcut.Empty);
|
||||||
|
|
||||||
new PlayerModelViewPatch().Enable();
|
new PlayerModelViewPatch().Enable();
|
||||||
new PlayerPatch().Enable();
|
new PlayerPatch().Enable();
|
||||||
@ -58,25 +51,25 @@ namespace SkinHide
|
|||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
if (KBSPlayerSkinHide.Value.IsDown())
|
if (settingsdata.KBSPlayerSkinHide.Value.IsDown())
|
||||||
{
|
{
|
||||||
KeyPlayerSkinHide.Value = !KeyPlayerSkinHide.Value;
|
settingsdata.KeyPlayerSkinHide.Value = !settingsdata.KeyPlayerSkinHide.Value;
|
||||||
}
|
}
|
||||||
if (KBSBotSkinHide.Value.IsDown())
|
if (settingsdata.KBSBotSkinHide.Value.IsDown())
|
||||||
{
|
{
|
||||||
KeyBotSkinHide.Value = !KeyBotSkinHide.Value;
|
settingsdata.KeyBotSkinHide.Value = !settingsdata.KeyBotSkinHide.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
//PlayerModelView Skin Hide
|
//PlayerModelView Skin Hide
|
||||||
if (PlayerModelView != null)
|
if (PlayerModelView != null)
|
||||||
{
|
{
|
||||||
Hide(PlayerModelView, KeyPlayerSkinHidePart.Value, KeyPlayerSkinHide.Value);
|
Hide(PlayerModelView, settingsdata.KeyPlayerSkinHidePart.Value, settingsdata.KeyPlayerSkinHide.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Player Skin Hide
|
//Player Skin Hide
|
||||||
if (Player != null)
|
if (Player != null)
|
||||||
{
|
{
|
||||||
Hide(Player, KeyPlayerSkinHidePart.Value, KeyPlayerSkinHide.Value);
|
Hide(Player, settingsdata.KeyPlayerSkinHidePart.Value, settingsdata.KeyPlayerSkinHide.Value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -88,7 +81,7 @@ namespace SkinHide
|
|||||||
{
|
{
|
||||||
foreach (PlayerBody bot in Bot)
|
foreach (PlayerBody bot in Bot)
|
||||||
{
|
{
|
||||||
Hide(bot, KeyBotSkinHidePart.Value, KeyBotSkinHide.Value);
|
Hide(bot, settingsdata.KeyBotSkinHidePart.Value, settingsdata.KeyBotSkinHide.Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -134,5 +127,17 @@ namespace SkinHide
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class SettingsData
|
||||||
|
{
|
||||||
|
public ConfigEntry<bool> KeyPlayerSkinHide;
|
||||||
|
public ConfigEntry<bool> KeyBotSkinHide;
|
||||||
|
|
||||||
|
public ConfigEntry<Part> KeyPlayerSkinHidePart;
|
||||||
|
public ConfigEntry<Part> KeyBotSkinHidePart;
|
||||||
|
|
||||||
|
public ConfigEntry<KeyboardShortcut> KBSPlayerSkinHide;
|
||||||
|
public ConfigEntry<KeyboardShortcut> KBSBotSkinHide;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user