-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Menu Variants is now compatible with Fortrise new version! #16
Changes from 1 commit
8fc75b3
48c319b
183b275
e75e6ef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
using Monocle; | ||
using FortRise; | ||
using TowerFall; | ||
|
||
namespace MenuVariantsMod; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,9 @@ public class MyBezel | |
{ | ||
public static void MyLoad() | ||
{ | ||
if (MenuVariantModModule.Settings.BezelVariant > 0 && !BezelLoad.BezelList.Any()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Put this check so that when the configuration is set to use a custom logo, if on the next start this custom bezel is not present it will use the default one (user can delete the custom bezel folder and it dont crash) |
||
MenuVariantModModule.Settings.BezelVariant = 0; | ||
|
||
if (MenuVariantModModule.Settings.BezelVariant > 0) | ||
{ | ||
var LoadedBezel = BezelLoad.BezelList[MenuVariantModModule.Settings.BezelVariant - 1]; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,10 @@ public static void ctor(On.TowerFall.Logo.orig_ctor orig, Logo self) | |
self.RemoveAll(); | ||
var towerTarget = LogoData.Get<Vector2>("towerTarget"); | ||
var coreTarget = LogoData.Get<Vector2>("towerTarget"); | ||
|
||
if (MenuVariantModModule.Settings.MenuVariant >= MenuVariantModModule.Vanilla.Count) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same thing for logos |
||
MenuVariantModModule.Settings.MenuVariant = 0; | ||
|
||
if (MenuVariantsMod.MenuVariantModModule.Vanilla[MenuVariantModModule.Settings.MenuVariant]) | ||
{ | ||
if (MenuVariantModModule.Settings.MenuVariant == 0) | ||
|
@@ -135,7 +139,7 @@ public static void ctor(On.TowerFall.Logo.orig_ctor orig, Logo self) | |
} | ||
else | ||
{ | ||
var LoadedLogo = LogoLoad.LogoList[MenuVariantModModule.Settings.MenuVariant-2]; | ||
var LoadedLogo = LogoLoad.LogoList[MenuVariantModModule.Settings.MenuVariant - 2]; | ||
var atlas = LoadedLogo.Atlas; | ||
if (LoadedLogo.VanillaTitle) | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loading based on Mod Content Folder concatenating string with $, i also needed to get the logo xml resource and then then load the XML, i think its better then using a path from root