Skip to content

Commit 3e97fbd

Browse files
Remove some templates, update API link
1 parent 771d4cc commit 3e97fbd

4 files changed

Lines changed: 4 additions & 104 deletions

File tree

Main.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class Main : MelonMod
99
internal const string Description = "Adds splash text to Void G114's menu.";
1010
internal const string Author = "Mabel Amber";
1111
internal const string Company = "Weather Electric";
12-
internal const string Version = "2.3.0";
12+
internal const string Version = "2.3.1";
1313
internal const string DownloadLink = "https://bonelab.thunderstore.io/package/SoulWithMae/SplashText/";
1414

1515
public static Save SaveData;
@@ -20,8 +20,6 @@ public override void OnInitializeMelon()
2020
Preferences.Setup();
2121
BoneMenu.Setup();
2222
UserData.Setup();
23-
TemplateProcessing.CacheUserFiles();
24-
TemplateProcessing.CacheSteamGames();
2523

2624
SaveData = DataManager.Instance._activeSave;
2725

Scripts/Helpers/TemplateProcessing.cs

Lines changed: 0 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -2,68 +2,6 @@
22

33
public static class TemplateProcessing
44
{
5-
private static readonly List<string> UserPicturesFilenames = [];
6-
private static readonly List<string> UserDocumentsFilenames = [];
7-
private static readonly List<string> UserDownloadsFilenames = [];
8-
private static readonly List<string> UserDesktopFilenames = [];
9-
private static readonly List<string> SteamGames = [];
10-
11-
internal static void CacheSteamGames()
12-
{
13-
if (!HelperMethods.IsAndroid())
14-
{
15-
var steamFolder = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86) + @"\Steam\steamapps\common";
16-
var folders = Directory.GetDirectories(steamFolder).ToList();
17-
foreach (var folder in folders)
18-
{
19-
var cleanFolderName = folder.Replace(steamFolder + "\\", "");
20-
SteamGames.Add(cleanFolderName);
21-
}
22-
}
23-
SteamGames.Add("(You're on a Quest, so I can't get your Steam games. Womp.)");
24-
}
25-
26-
internal static void CacheUserFiles()
27-
{
28-
// pictures
29-
var picturesFolder = Environment.GetFolderPath(Environment.SpecialFolder.MyPictures);
30-
var files = Directory.GetFiles(picturesFolder).ToList();
31-
foreach (var file in files)
32-
{
33-
UserPicturesFilenames.Add(Path.GetFileName(file));
34-
}
35-
36-
// documents
37-
var documentsFolder = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
38-
files = Directory.GetFiles(documentsFolder).ToList();
39-
foreach (var file in files)
40-
{
41-
UserDocumentsFilenames.Add(Path.GetFileName(file));
42-
}
43-
44-
// downloads
45-
var downloadsFolder = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "\\Downloads";
46-
files = Directory.GetFiles(downloadsFolder).ToList();
47-
foreach (var file in files)
48-
{
49-
UserDownloadsFilenames.Add(Path.GetFileName(file));
50-
}
51-
var folders = Directory.GetDirectories(downloadsFolder).ToList();
52-
foreach (var folder in folders)
53-
{
54-
var cleanFolderName = folder.Replace(downloadsFolder + "\\", "");
55-
UserDownloadsFilenames.Add(cleanFolderName);
56-
}
57-
58-
// desktop
59-
var desktopFolder = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
60-
files = Directory.GetFiles(desktopFolder).ToList();
61-
foreach (var file in files)
62-
{
63-
UserDesktopFilenames.Add(Path.GetFileName(file));
64-
}
65-
}
66-
675
private static readonly Dictionary<string, Func<string>> Replacements = new()
686
{
697
{ "[UserName]", () => HelperMethods.IsAndroid() ? "Quest User" : Environment.UserName },
@@ -120,36 +58,6 @@ internal static void CacheUserFiles()
12058
return drive.AvailableFreeSpace / 1024 / 1024 / 1024 + " GB";
12159
}
12260
},
123-
{ "[RandomUserPicture]", () =>
124-
{
125-
var rnd = new System.Random();
126-
return UserPicturesFilenames[rnd.Next(UserPicturesFilenames.Count)];
127-
}
128-
},
129-
{ "[RandomUserDocument]", () =>
130-
{
131-
var rnd = new System.Random();
132-
return UserDocumentsFilenames[rnd.Next(UserDocumentsFilenames.Count)];
133-
}
134-
},
135-
{ "[RandomUserDownloadsFile]", () =>
136-
{
137-
var rnd = new System.Random();
138-
return UserDownloadsFilenames[rnd.Next(UserDownloadsFilenames.Count)];
139-
}
140-
},
141-
{ "[RandomUserDesktopFile]", () =>
142-
{
143-
var rnd = new System.Random();
144-
return UserDesktopFilenames[rnd.Next(UserDesktopFilenames.Count)];
145-
}
146-
},
147-
{ "[RandomSteamGame]", () =>
148-
{
149-
var rnd = new System.Random();
150-
return SteamGames[rnd.Next(SteamGames.Count)];
151-
}
152-
}
15361
};
15462

15563
private static readonly Dictionary<string, Func<string>> Actions = new()
@@ -169,12 +77,6 @@ internal static void CacheUserFiles()
16977
HelperMethods.SpawnCrate(CommonBarcodes.NPCs.Nullbody, spawnLocation, Quaternion.identity, Vector3.one);
17078
return "";
17179
}
172-
},
173-
{ "[PeterGriffin]", () =>
174-
{
175-
Application.OpenURL("https://familyguy.fandom.com/wiki/Peter_Griffin");
176-
return "";
177-
}
17880
}
17981
};
18082

Scripts/Lists/BonelabSplashes.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public static class BonelabSplashes
100100
"get pink screen of death'd, idiot"
101101
];
102102

103-
private const string SplashAPI = "https://splashtext.weatherelectric.xyz/";
103+
private const string SplashAPI = "https://api.weatherelectric.xyz/splashes/";
104104

105105
public delegate void FetchTextCallback(string fetchedText);
106106

SplashText.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<LangVersion>default</LangVersion>
99
<IsPackable>false</IsPackable>
1010
<Company>Weather Electric</Company>
11-
<AssemblyVersion>2.3.0.0</AssemblyVersion>
12-
<FileVersion>2.3.0.0</FileVersion>
11+
<AssemblyVersion>2.3.1.0</AssemblyVersion>
12+
<FileVersion>2.3.1.0</FileVersion>
1313
<NeutralLanguage>en-US</NeutralLanguage>
1414
<AssemblyName>SplashText</AssemblyName>
1515
<Version>2.3.0</Version>

0 commit comments

Comments
 (0)