From f34795a82d62dadb41a8795c4fd6945a494687bd Mon Sep 17 00:00:00 2001
From: lewd_alt <210463139+lewd-alt@users.noreply.github.com>
Date: Sat, 13 Jun 2026 11:34:36 -0500
Subject: [PATCH] REDCODE changes
---
2DGAMELIB/2DGAMELIB.csproj | 16 ++++++++--------
2DGAMELIB/_2DGAMELIB/ParT.cs | 1 -
SlaveMatrix/Properties/launchSettings.json | 5 ++++-
SlaveMatrix/SlaveMatrix.csproj | 9 ++++++++-
SlaveMatrix/SlaveMatrix/GameClasses/Mods.cs | 2 +-
SlaveMatrix/SlaveMatrix/GameClasses/Program.cs | 6 +++++-
SlaveMatrix/SlaveMatrix/GameClasses/Sta.cs | 4 ++--
.../SlaveMatrix/GameClasses/TrainingUI.cs | 2 +-
SlaveMatrix/runtimeconfig.template.json | 5 +++++
global.json | 7 +++++++
10 files changed, 41 insertions(+), 16 deletions(-)
create mode 100644 SlaveMatrix/runtimeconfig.template.json
create mode 100644 global.json
diff --git a/2DGAMELIB/2DGAMELIB.csproj b/2DGAMELIB/2DGAMELIB.csproj
index 6f15fff..36ea877 100644
--- a/2DGAMELIB/2DGAMELIB.csproj
+++ b/2DGAMELIB/2DGAMELIB.csproj
@@ -3,26 +3,26 @@
2DGAMELIB
False
- True
- netstandard2.1
+ net8.0
x64
- AnyCPU
9.0
True
- true
+ true
+ false
+ SYSLIB0011;CA1416
-
-
-
-
+
+
+ NU1603
+
\ No newline at end of file
diff --git a/2DGAMELIB/_2DGAMELIB/ParT.cs b/2DGAMELIB/_2DGAMELIB/ParT.cs
index 7b85a4f..e3e4464 100644
--- a/2DGAMELIB/_2DGAMELIB/ParT.cs
+++ b/2DGAMELIB/_2DGAMELIB/ParT.cs
@@ -2,7 +2,6 @@ using Newtonsoft.Json;
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
-using static System.Net.Mime.MediaTypeNames;
namespace _2DGAMELIB
{
diff --git a/SlaveMatrix/Properties/launchSettings.json b/SlaveMatrix/Properties/launchSettings.json
index e73cfc4..3923c68 100644
--- a/SlaveMatrix/Properties/launchSettings.json
+++ b/SlaveMatrix/Properties/launchSettings.json
@@ -2,7 +2,10 @@
"profiles": {
"SlaveMatrix": {
"commandName": "Project",
- "workingDirectory": "$(SolutionDir)\\game_folder"
+ "workingDirectory": "../game_folder",
+ "environmentVariables": {
+ "DOTNET_SYSTEM_GLOBALIZATION_INVARIANT": "true"
+ }
},
"WSL": {
"commandName": "WSL2",
diff --git a/SlaveMatrix/SlaveMatrix.csproj b/SlaveMatrix/SlaveMatrix.csproj
index 3595ef2..a4aae05 100644
--- a/SlaveMatrix/SlaveMatrix.csproj
+++ b/SlaveMatrix/SlaveMatrix.csproj
@@ -4,7 +4,7 @@
SlaveMatrix
False
WinExe
- netcoreapp3.1
+ net8.0
x64
@@ -14,10 +14,17 @@
app.ico
+ true
+ true
+ true
+ CA1416
+
+
+
True
diff --git a/SlaveMatrix/SlaveMatrix/GameClasses/Mods.cs b/SlaveMatrix/SlaveMatrix/GameClasses/Mods.cs
index 20ce0a8..ad91803 100644
--- a/SlaveMatrix/SlaveMatrix/GameClasses/Mods.cs
+++ b/SlaveMatrix/SlaveMatrix/GameClasses/Mods.cs
@@ -628,7 +628,7 @@ namespace SlaveMatrix
private static void AutoSave()
{
- string s = Sta.SavePath + "\\0: ";
+ string s = Path.Combine(Sta.SavePath, "0: ");
foreach (string item in from e in Directory.EnumerateFiles(Sta.SavePath)
where e.StartsWith(s)
select e)
diff --git a/SlaveMatrix/SlaveMatrix/GameClasses/Program.cs b/SlaveMatrix/SlaveMatrix/GameClasses/Program.cs
index 260a122..7592b04 100644
--- a/SlaveMatrix/SlaveMatrix/GameClasses/Program.cs
+++ b/SlaveMatrix/SlaveMatrix/GameClasses/Program.cs
@@ -1,15 +1,19 @@
using System;
+using System.Reflection;
using _2DGAMELIB;
namespace SlaveMatrix
{
internal static class Program
{
+ static Program()
+ {
+ AppContext.SetSwitch("System.Drawing.EnableUnixSupport", true);
+ }
[STAThread]
private static void Main(string[] A_0)
{
-
Sta.LoadConfig();
double percent = 35.0;
diff --git a/SlaveMatrix/SlaveMatrix/GameClasses/Sta.cs b/SlaveMatrix/SlaveMatrix/GameClasses/Sta.cs
index d992f31..a8bf0ad 100644
--- a/SlaveMatrix/SlaveMatrix/GameClasses/Sta.cs
+++ b/SlaveMatrix/SlaveMatrix/GameClasses/Sta.cs
@@ -880,7 +880,7 @@ namespace SlaveMatrix
{
//if (!EncryptSave)
{
- GameData.SaveExMod(SavePath + "\\" + i + ": " + GameData.GetSaveDateString().Replace("/", "_") + ".sav");
+ GameData.SaveExMod(Path.Combine(SavePath, i + ": " + GameData.GetSaveDateString().Replace("/", "_") + ".sav"));
}
/*else
{
@@ -1410,7 +1410,7 @@ namespace SlaveMatrix
上着B_クロス初期化 = default(上着B_クロス情報);
上着B_前掛け初期化 = default(上着B_前掛け情報);
ブーツ初期化 = default(ブーツ情報);
- CurrentDirectory = Directory.GetCurrentDirectory();
+ CurrentDirectory = AppContext.BaseDirectory;
GameData = new GameState();
SavePath = Path.Combine(CurrentDirectory, "save");
ImiPath = Path.Combine(CurrentDirectory, "text", "Basement", "Training", "Imitation.txt");
diff --git a/SlaveMatrix/SlaveMatrix/GameClasses/TrainingUI.cs b/SlaveMatrix/SlaveMatrix/GameClasses/TrainingUI.cs
index 9ff1c11..e4ee289 100644
--- a/SlaveMatrix/SlaveMatrix/GameClasses/TrainingUI.cs
+++ b/SlaveMatrix/SlaveMatrix/GameClasses/TrainingUI.cs
@@ -2440,7 +2440,7 @@ namespace SlaveMatrix
{
((IDisposable)font)?.Dispose();
}
- 調教UI2.Film.DisplayLayer.Save(Path + "\\" + now.ToString("yyyy_MM_dd_HH_mm_ss") + ".png", ImageFormat.Png);
+ 調教UI2.Film.DisplayLayer.Save(System.IO.Path.Combine(Path, now.ToString("yyyy_MM_dd_HH_mm_ss") + ".png"), ImageFormat.Png);
ip.SubInfoIm = GameText.撮影しました + "\r\n" + GameText.写真はPhotoフォルダに保存されます;
if (Sta.GameData.TrainingTarget.Trained && !調教UI2.Cha.Body.Is拘束 && 調教UI2.Cha.Body.Is腕人 && !Sta.GameData.TrainingTarget.ChaD.撮影ピース経験)
{
diff --git a/SlaveMatrix/runtimeconfig.template.json b/SlaveMatrix/runtimeconfig.template.json
new file mode 100644
index 0000000..6906ea9
--- /dev/null
+++ b/SlaveMatrix/runtimeconfig.template.json
@@ -0,0 +1,5 @@
+{
+ "configProperties": {
+ "System.Drawing.EnableUnixSupport": true
+ }
+}
diff --git a/global.json b/global.json
new file mode 100644
index 0000000..dad2db5
--- /dev/null
+++ b/global.json
@@ -0,0 +1,7 @@
+{
+ "sdk": {
+ "version": "8.0.0",
+ "rollForward": "latestMajor",
+ "allowPrerelease": true
+ }
+}
\ No newline at end of file