Various fixes
- GlobalSaveDataSystem should now have the correct save path for Linux devices. - GlobalSaveDataSystem now uses Path.DirectorySeparatorChar in its directory paths instead of "\\" - Moved the Sunken Sea ModMenu's display name to the UI localization file
This commit is contained in:
1 parent
e3044a8d72
commit
507fab02cc
4 files changed
+12
-7
No files matched your search
@@ -2,6 +2,7 @@ SmallWorldWarning: "[c/FF0000:SMALL WORLDS NOT SUPPORTED BY CALAMITY]"
|
||||
// Main Menu Name
|
||||
MainMenu: Calamity Style
|
||||
MainMenuClassic: Calamity Style - Classic
|
||||
MainMenuSunken: Calamity Style - Sunken
|
||||
// Main UI Elements
|
||||
Adrenaline: Adrenaline
|
||||
Nanomachines: Nanomachines
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace CalamityMod.MainMenu
|
||||
/// </summary>
|
||||
public const string FirstTimeOpeningSunkenSeaOverhaulKey = "HasOpenedTheSunkenSeaOverhaulForTheFirstTime";
|
||||
|
||||
public override string DisplayName => "Calamity Style - Sunken";
|
||||
public override string DisplayName => CalamityUtils.GetTextValue("UI.MainMenuSunken");
|
||||
|
||||
public override Asset<Texture2D> Logo => ModContent.Request<Texture2D>("CalamityMod/MainMenu/LogoSunken");
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@ namespace CalamityMod.MainMenu
|
||||
"PolypPanaseaPurple",
|
||||
"PolypPanaseaRadiant",
|
||||
"PolypPanaseaTurquoise",
|
||||
"PolypPanaseaGoldCoated",
|
||||
"PolypPanaseaGreenCoated",
|
||||
"PolypPanaseaPurpleCoated",
|
||||
"PolypPanaseaRadiantCoated",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Terraria;
|
||||
@@ -13,21 +14,25 @@ namespace CalamityMod.Systems
|
||||
/// <summary>
|
||||
/// The directory in which all files related to globall saved data are stored.
|
||||
/// </summary>
|
||||
internal static string GlobalSaveDataDirectoryPath => Main.SavePath + "\\CalamityModGlobalSaveData\\";
|
||||
|
||||
internal static string GlobalSaveDataDirectoryPath;
|
||||
|
||||
/// <summary>
|
||||
/// The path to the text file which contains all globally saved data keys.
|
||||
/// </summary>
|
||||
internal static string GlobalSaveDataKeysPath => Main.SavePath + "\\CalamityModGlobalSaveData\\GlobalSaveDataKeys.txt";
|
||||
internal static string GlobalSaveDataKeysPath;
|
||||
|
||||
/// <summary>
|
||||
/// The path to the README file explaining the purpose of the directory.
|
||||
/// </summary>
|
||||
internal static string READMEPath => Main.SavePath + "\\CalamityModGlobalSaveData\\README.txt";
|
||||
internal static string READMEPath;
|
||||
|
||||
public override void OnModLoad()
|
||||
{
|
||||
string savePathByOS = OperatingSystem.IsLinux() ? "~/.local/share/Terraria/tModloader/" : Main.SavePath;
|
||||
GlobalSaveDataDirectoryPath = savePathByOS + Path.DirectorySeparatorChar + "CalamityModGlobalSaveData";
|
||||
GlobalSaveDataKeysPath = savePathByOS + Path.DirectorySeparatorChar + "CalamityModGlobalSaveData" + Path.DirectorySeparatorChar + "GlobalSaveDataKeys.txt";
|
||||
READMEPath = savePathByOS + Path.DirectorySeparatorChar + "CalamityModGlobalSaveData" + Path.DirectorySeparatorChar + "README.txt";
|
||||
|
||||
// Ensure that the save data keys text file exists. If not, create a new one.
|
||||
if (!File.Exists(GlobalSaveDataKeysPath))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user