mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-20 01:46:15 +00:00
fix lobby view pane issues
This commit is contained in:
1 parent
76ddfa4126
commit
d27bf67f65
5 files changed
+5
-14
No files matched your search
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Reactor" Version="2.3.1" />
|
<PackageReference Include="Reactor" Version="2.3.1" />
|
||||||
<PackageReference Include="BepInEx.Unity.IL2CPP" Version="6.0.0-be.697" Private="false" ExcludeAssets="runtime;native" />
|
<PackageReference Include="BepInEx.Unity.IL2CPP" Version="6.0.0-be.697" Private="false" ExcludeAssets="runtime;native" />
|
||||||
<PackageReference Include="AmongUs.GameLibs.Steam" Version="2024.8.13" PrivateAssets="all" />
|
<PackageReference Include="AmongUs.GameLibs.Steam" Version="2024.9.4" PrivateAssets="all" />
|
||||||
|
|
||||||
<PackageReference Include="BepInEx.AutoPlugin" Version="1.1.0" PrivateAssets="all" />
|
<PackageReference Include="BepInEx.AutoPlugin" Version="1.1.0" PrivateAssets="all" />
|
||||||
<PackageReference Include="BepInEx.IL2CPP.MSBuild" Version="2.0.1" PrivateAssets="all" ExcludeAssets="runtime" />
|
<PackageReference Include="BepInEx.IL2CPP.MSBuild" Version="2.0.1" PrivateAssets="all" ExcludeAssets="runtime" />
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ internal interface IModdedOption
|
|||||||
string Title { get; }
|
string Title { get; }
|
||||||
StringNames StringName { get; }
|
StringNames StringName { get; }
|
||||||
IMiraPlugin? ParentMod { get; set; }
|
IMiraPlugin? ParentMod { get; set; }
|
||||||
BaseGameSetting? Data { get; }
|
BaseGameSetting Data { get; }
|
||||||
Type? AdvancedRole { get; set; }
|
Type? AdvancedRole { get; set; }
|
||||||
OptionBehaviour? OptionBehaviour { get; }
|
OptionBehaviour? OptionBehaviour { get; }
|
||||||
Func<bool> Visible { get; set; }
|
Func<bool> Visible { get; set; }
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public abstract class ModdedOption<T> : IModdedOption
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the BaseGameSetting data of the option.
|
/// Gets the BaseGameSetting data of the option.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public BaseGameSetting? Data { get; protected init; }
|
public BaseGameSetting Data { get; protected init; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the parent mod of the option.
|
/// Gets or sets the parent mod of the option.
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using MiraAPI.PluginLoading;
|
|||||||
using MiraAPI.Roles;
|
using MiraAPI.Roles;
|
||||||
using MiraAPI.Utilities;
|
using MiraAPI.Utilities;
|
||||||
using MiraAPI.Utilities.Assets;
|
using MiraAPI.Utilities.Assets;
|
||||||
|
using Reactor.Utilities;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Events;
|
using UnityEngine.Events;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
@@ -128,11 +129,6 @@ public static class LobbyViewPanePatches
|
|||||||
|
|
||||||
foreach (var group in filteredGroups)
|
foreach (var group in filteredGroups)
|
||||||
{
|
{
|
||||||
if (group.Options.Count == 0)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
var categoryHeaderMasked = Object.Instantiate(
|
var categoryHeaderMasked = Object.Instantiate(
|
||||||
instance.categoryHeaderOrigin,
|
instance.categoryHeaderOrigin,
|
||||||
instance.settingsContainer,
|
instance.settingsContainer,
|
||||||
@@ -176,11 +172,6 @@ public static class LobbyViewPanePatches
|
|||||||
|
|
||||||
var data = option.Data;
|
var data = option.Data;
|
||||||
|
|
||||||
if (data == null)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (data.Type == OptionTypes.Checkbox)
|
if (data.Type == OptionTypes.Checkbox)
|
||||||
{
|
{
|
||||||
viewSettingsInfoPanel.SetInfoCheckbox(
|
viewSettingsInfoPanel.SetInfoCheckbox(
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public static class SettingPatches
|
|||||||
MiraNumberSuffixes.Percent => value.ToString(__instance.FormatString, NumberFormatInfo.InvariantInfo) + "%",
|
MiraNumberSuffixes.Percent => value.ToString(__instance.FormatString, NumberFormatInfo.InvariantInfo) + "%",
|
||||||
_ => DestroyableSingleton<TranslationController>.Instance.GetString(
|
_ => DestroyableSingleton<TranslationController>.Instance.GetString(
|
||||||
StringNames.GameSecondsAbbrev,
|
StringNames.GameSecondsAbbrev,
|
||||||
(Il2CppSystem.Object[]) [value.ToString(__instance.FormatString, CultureInfo.InvariantCulture)]),
|
(Il2CppSystem.Object[])[value.ToString(__instance.FormatString, CultureInfo.InvariantCulture)]),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user