-
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.
* Updated to MHv5 and TML11 (including configs)
- Loading branch information
hamstar0
committed
Jul 22, 2019
1 parent
ea5b86d
commit bd91f2b
Showing
14 changed files
with
83 additions
and
179 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
namespace Capitalism { | ||
public static partial class CapitalismAPI { | ||
public static CapitalismConfigData GetModSettings() { | ||
return CapitalismMod.Instance.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
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
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 |
---|---|---|
@@ -1,40 +1,10 @@ | ||
using HamstarHelpers.Components.Config; | ||
using HamstarHelpers.Helpers.DebugHelpers; | ||
using System; | ||
using System.IO; | ||
using Terraria; | ||
using System; | ||
using Terraria.ModLoader; | ||
|
||
|
||
namespace Capitalism { | ||
partial class CapitalismMod : Mod { | ||
public static string GithubUserName => "hamstar0"; | ||
public static string GithubProjectName => "tml-capitalism-mod"; | ||
|
||
public static string ConfigFileRelativePath { | ||
get { return ConfigurationDataBase.RelativePath + Path.DirectorySeparatorChar + CapitalismConfigData.ConfigFileName; } | ||
} | ||
public static void ReloadConfigFromFile() { | ||
if( Main.netMode != 0 ) { | ||
throw new Exception( "Cannot reload configs outside of single player." ); | ||
} | ||
if( CapitalismMod.Instance != null ) { | ||
if( !CapitalismMod.Instance.ConfigJson.LoadFile() ) { | ||
CapitalismMod.Instance.ConfigJson.SaveFile(); | ||
} | ||
} | ||
} | ||
|
||
public static void ResetConfigFromDefaults() { | ||
if( Main.netMode != 0 ) { | ||
throw new Exception( "Cannot reset to default configs outside of single player." ); | ||
} | ||
|
||
var newConfig = new CapitalismConfigData(); | ||
//new_config.SetDefaults(); | ||
|
||
CapitalismMod.Instance.ConfigJson.SetData( newConfig ); | ||
CapitalismMod.Instance.ConfigJson.SaveFile(); | ||
} | ||
} | ||
} |
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
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
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
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
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
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
Oops, something went wrong.