Skip to content

Commit

Permalink
More cleanup and prep for R2Northstar/NorthstarLauncher#766
Browse files Browse the repository at this point in the history
  • Loading branch information
ASpoonPlaysGames committed Aug 31, 2024
1 parent dcd23fd commit 23238e4
Show file tree
Hide file tree
Showing 15 changed files with 11 additions and 127 deletions.
4 changes: 0 additions & 4 deletions Advocate/Models/JSON/Manifest.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Advocate.Models.JSON
{
Expand Down
7 changes: 1 addition & 6 deletions Advocate/Models/JSON/Map.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json;
using System.Collections.Generic;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

namespace Advocate.Models.JSON
{
Expand Down
8 changes: 1 addition & 7 deletions Advocate/Models/JSON/Mod.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Advocate.Models.JSON
namespace Advocate.Models.JSON
{
internal class Mod
{
Expand Down
14 changes: 0 additions & 14 deletions Advocate/Models/JSON/RPak.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Advocate/Pages/Converter/ConverterPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Advocate.Logging;
using HandyControl.Themes;
using Microsoft.Win32;
Expand Down
14 changes: 1 addition & 13 deletions Advocate/Pages/Converter/DescriptionHelpWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.ObjectModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Advocate.Pages.Converter
{
Expand Down
13 changes: 0 additions & 13 deletions Advocate/Pages/Converter/SettingsWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Advocate.Logging;
using HandyControl.Themes;
using Microsoft.Win32;

namespace Advocate.Pages.Converter
Expand Down
14 changes: 1 addition & 13 deletions Advocate/Pages/NoseArtCreator/DescriptionHelpWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.ObjectModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Advocate.Pages.NoseArtCreator
{
Expand Down
3 changes: 0 additions & 3 deletions Advocate/Pages/NoseArtCreator/NoseArtCreatorPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Resources;
using System.Text.Json;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
Expand Down
13 changes: 0 additions & 13 deletions Advocate/Pages/NoseArtCreator/SettingsWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Advocate.Logging;
using HandyControl.Themes;
using Microsoft.Win32;

namespace Advocate.Pages.NoseArtCreator
Expand Down
9 changes: 3 additions & 6 deletions Advocate/Scripts/Conversion/Converter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -455,13 +455,10 @@ public bool Convert(string outputPath, string repakPath, string texconvPath, str
// set the message for the new conversion step
Info("Generating rpak.json...");

// we can just preload our rpak, since it should only contain textures
RPak rpak = new()
{
Preload = new() { { $"{SkinName}.rpak", true } }
};
// load our rpak on any map
Dictionary<string, string> rpakJson = new() { { $"{SkinName}.rpak", ".*" } };

File.WriteAllText($"{modTempFolderPath}/mods/{AuthorName}.{SkinName}/paks/rpak.json", JsonSerializer.Serialize(rpak, jsonOptions));
File.WriteAllText($"{modTempFolderPath}/mods/{AuthorName}.{SkinName}/paks/rpak.json", JsonSerializer.Serialize(rpakJson, jsonOptions));

// move progress bar
ConvertTaskComplete();
Expand Down
2 changes: 0 additions & 2 deletions Advocate/Scripts/Conversion/DescriptionHandler.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace Advocate.Scripts.Conversion
{
Expand Down
4 changes: 0 additions & 4 deletions Advocate/Scripts/DDS/Header.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Advocate.Logging;

namespace Advocate.Scripts.DDS
Expand Down
7 changes: 1 addition & 6 deletions Advocate/Scripts/NoseArts/DescriptionHandler.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Text.RegularExpressions;

namespace Advocate.Scripts.NoseArts
{
Expand Down
15 changes: 3 additions & 12 deletions Advocate/Scripts/NoseArts/NoseArtCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,11 @@
using System.Drawing;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Text;
using System.Text.Json;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using Advocate.Logging;
using Advocate.Models.JSON;
using static System.Windows.Forms.DataFormats;

namespace Advocate.Scripts.NoseArts
{
Expand Down Expand Up @@ -376,13 +370,10 @@ public bool CreateNoseArt(string outputPath, string repakPath, string texconvPat

Info("Writing rpak.json");

// we can just preload our rpak, since it should only contain textures
RPak rpak = new()
{
Preload = new() { { $"{ModName}.rpak", true } }
};
// load our rpak on any map
Dictionary<string, string> rpakJson = new() { { $"{ModName}.rpak", ".*" } };

File.WriteAllText($"{tempModPath}/mods/{AuthorName}.{ModName}/paks/rpak.json", JsonSerializer.Serialize(rpak, jsonOptions));
File.WriteAllText($"{tempModPath}/mods/{AuthorName}.{ModName}/paks/rpak.json", JsonSerializer.Serialize(rpakJson, jsonOptions));

// move progress bar
ConvertTaskComplete();
Expand Down

0 comments on commit 23238e4

Please sign in to comment.