Skip to content

Commit

Permalink
v3
Browse files Browse the repository at this point in the history
  • Loading branch information
xoxfaby committed May 18, 2024
1 parent 262849c commit 56957b1
Show file tree
Hide file tree
Showing 20 changed files with 14 additions and 4,090 deletions.
37 changes: 1 addition & 36 deletions BetterUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,49 +34,14 @@ protected override void Awake()
{
base.Awake();


instance = this;
this.gameObject.hideFlags |= UnityEngine.HideFlags.HideAndDontSave;
this.gameObject.AddComponent<BetterUI.Language.UpdateChecker>();
BetterUI.Language.LoadLanguages();

if (ConfigManager.ComponentsItemSorting.Value)
ItemSorting.Hook();
if (ConfigManager.ComponentsStatsDisplay.Value)
StatsDisplay.Hook();
if (ConfigManager.ComponentsCommandImprovements.Value)
CommandImprovements.Hook();
if (ConfigManager.ComponentsDPSMeter.Value)
DPSMeter.Initialize();
if (ConfigManager.ComponentsBuffTimers.Value)
Buffs.Hook();
if (ConfigManager.ComponentsAdvancedIcons.Value)
AdvancedIcons.Hook();
if (ConfigManager.ComponentsItemCounters.Value)
ItemCounters.Hook();
if (ConfigManager.ComponentsMisc.Value)
Misc.Hook();

BetterUIWindow.Init();
RoR2.ItemCatalog.availability.CallWhenAvailable(ItemStats.Initialize);
}


protected override void OnEnable()
{
base.OnEnable();
BetterAPIModIntegration = BepInEx.Bootstrap.Chainloader.PluginInfos.ContainsKey("com.xoxfaby.BetterAPI");
BetterUIPlugin.Hooks.Add<RoR2.UI.HUD>("Awake", HUD_Awake);
}

internal static void HUD_Awake(Action<RoR2.UI.HUD> orig, RoR2.UI.HUD self)
{
orig(self);
hud = self;
objectivePanelController = self.GetComponentInChildren<RoR2.UI.ObjectivePanelController>(true);
if (onHUDAwake != null)
{
onHUDAwake.Invoke(hud);
}
}
}
}
5 changes: 5 additions & 0 deletions BetterUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,9 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

<ItemGroup>
<Folder Include="ModComponents\" />
<Folder Include="Utils\" />
</ItemGroup>
</Project>
10 changes: 4 additions & 6 deletions BetterUIWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,10 @@ public void createWindow(GameObject prefab)
if (!exists || instance == null)
{
spawnedGameObjects[prefab] = GameObject.Instantiate(prefab, BetterUIWindow.menuParent);
var button = spawnedGameObjects[prefab].transform.Find("Window/UpperLeftButtonPanel/DonateButton");
if (button)
{
Destroy(button.gameObject);
}

Destroy(spawnedGameObjects[prefab].transform.Find("Window/UpperLeftButtonPanel/DonateButton")?.gameObject);
Destroy(spawnedGameObjects[prefab].transform.Find("Window/UpperLeftButtonPanel/DiscordButton")?.gameObject);
Destroy(spawnedGameObjects[prefab].transform.Find("Window/SocialPanel/TwitterButton")?.gameObject);

}
}
}
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog

v3: core functionality only, stripped other useless features.

v2.something
removed dono link from main menu button menu as per new rules

Expand Down
553 changes: 0 additions & 553 deletions ConfigManager.cs

This file was deleted.

356 changes: 0 additions & 356 deletions ModComponents/AdvancedIcons.cs

This file was deleted.

261 changes: 0 additions & 261 deletions ModComponents/Buffs.cs

This file was deleted.

293 changes: 0 additions & 293 deletions ModComponents/CommandImprovements.cs

This file was deleted.

Loading

2 comments on commit 56957b1

@Quplet
Copy link

@Quplet Quplet commented on 56957b1 May 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bro what are you doing?

@IamLupo
Copy link

@IamLupo IamLupo commented on 56957b1 Jul 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bro what are you doing?

Yeah this really make me cry :'( A talented guy been bullied by the community. I have experienced the same thing in vermintide. And you cant do anything about it.

Please sign in to comment.