mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-26 00:35:41 +00:00
Move Bedrock json definitions to Conversion/CommonJsonDefinitions
This commit is contained in:
@@ -14,9 +14,8 @@ using OMI.Formats.Pck;
|
||||
using OMI.Workers.Language;
|
||||
using OMI.Workers.Pck;
|
||||
|
||||
using PckStudio.Conversion.Bedrock.Json;
|
||||
using PckStudio.Classes.Utils;
|
||||
using PckStudio.Conversion.Bedrock.JsonDefinitions;
|
||||
using PckStudio.Conversion.Common.JsonDefinitions;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
|
||||
@@ -63,7 +62,7 @@ namespace PckStudio.Conversion.Bedrock
|
||||
"uk_UA"
|
||||
};
|
||||
|
||||
static List<string> OffsetNames = new List<string>
|
||||
static string[] OffsetNames = new string[]
|
||||
{
|
||||
"HEAD", "HELMET",
|
||||
"BODY", "CHEST", "BELT",
|
||||
@@ -228,7 +227,7 @@ namespace PckStudio.Conversion.Bedrock
|
||||
SkinJSON skinJson = new SkinJSON(); // Skins.json
|
||||
JObject geometryJson = new JObject(); // Geometry.json
|
||||
|
||||
_loc = AcquireLocFile(skinPck) ?? throw new ArgumentNullException("Loc file acquire fail.");
|
||||
_loc = AcquireLocFile(skinPck) ?? throw new ArgumentNullException($"{nameof(AcquireLocFile)} failed.");
|
||||
|
||||
string bedrockPackName = "DummySkinPack";
|
||||
var packNameTranslations = _loc.GetLocEntries("IDS_DISPLAY_NAME");
|
||||
|
||||
@@ -19,7 +19,7 @@ using System;
|
||||
using System.Numerics;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace PckStudio.Conversion.Bedrock.JsonDefinitions
|
||||
namespace PckStudio.Conversion.Common.JsonDefinitions
|
||||
{
|
||||
internal class Geometry
|
||||
{
|
||||
@@ -18,7 +18,7 @@
|
||||
using System.Numerics;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace PckStudio.Conversion.Bedrock.JsonDefinitions
|
||||
namespace PckStudio.Conversion.Common.JsonDefinitions
|
||||
{
|
||||
internal class GeometryBone
|
||||
{
|
||||
@@ -35,7 +35,7 @@ namespace PckStudio.Conversion.Bedrock.JsonDefinitions
|
||||
//public string META_BoneType = null;
|
||||
|
||||
[JsonProperty(PropertyName = "name", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string Name = "partName";
|
||||
public string Name { get; set; } = "partName";
|
||||
|
||||
[JsonProperty(PropertyName = "parent", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string Parent = "parentName";
|
||||
@@ -18,7 +18,7 @@
|
||||
using System.Numerics;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace PckStudio.Conversion.Bedrock.JsonDefinitions
|
||||
namespace PckStudio.Conversion.Common.JsonDefinitions
|
||||
{
|
||||
internal class GeometryCube
|
||||
{
|
||||
@@ -37,15 +37,13 @@ namespace PckStudio.Conversion.Bedrock.JsonDefinitions
|
||||
[JsonProperty("size")]
|
||||
public float[] Size = { 0, 0, 0 };
|
||||
|
||||
// for whatever reason, uv is a float on LCE,
|
||||
// so I've kept it a float for the sake of consistency
|
||||
[JsonProperty("uv")]
|
||||
public float[] UV = { 0, 0 };
|
||||
|
||||
[JsonProperty("mirror")]
|
||||
public bool Mirror = false;
|
||||
[JsonProperty("mirror", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public bool Mirror { get; set; }
|
||||
|
||||
[JsonProperty("inflate")]
|
||||
public float Inflate = 0.0f;
|
||||
[JsonProperty("inflate", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public float Inflate { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@
|
||||
**/
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace PckStudio.Conversion.Bedrock.Json
|
||||
namespace PckStudio.Conversion.Common.JsonDefinitions
|
||||
{
|
||||
internal class Manifest
|
||||
{
|
||||
@@ -18,7 +18,7 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace PckStudio.Conversion.Bedrock.Json
|
||||
namespace PckStudio.Conversion.Common.JsonDefinitions
|
||||
{
|
||||
internal class ManifestHeader
|
||||
{
|
||||
@@ -18,7 +18,7 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace PckStudio.Conversion.Bedrock.Json
|
||||
namespace PckStudio.Conversion.Common.JsonDefinitions
|
||||
{
|
||||
internal class ManifestModule
|
||||
{
|
||||
@@ -17,7 +17,7 @@
|
||||
**/
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace PckStudio.Conversion.Bedrock.Json
|
||||
namespace PckStudio.Conversion.Common.JsonDefinitions
|
||||
{
|
||||
internal class SkinJSON
|
||||
{
|
||||
@@ -17,7 +17,7 @@
|
||||
**/
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace PckStudio.Conversion.Bedrock.Json
|
||||
namespace PckStudio.Conversion.Common.JsonDefinitions
|
||||
{
|
||||
internal class SkinObject
|
||||
{
|
||||
@@ -174,14 +174,14 @@
|
||||
<Compile Include="Classes\Conversion\Bedrock\FileExportContext.cs" />
|
||||
<Compile Include="Classes\Conversion\Bedrock\IExportContext.cs" />
|
||||
<Compile Include="Classes\Conversion\Bedrock\InMemoryExportContext.cs" />
|
||||
<Compile Include="Classes\Conversion\Bedrock\JsonDefinitions\Geometry.cs" />
|
||||
<Compile Include="Classes\Conversion\Bedrock\JsonDefinitions\GeometryBone.cs" />
|
||||
<Compile Include="Classes\Conversion\Bedrock\JsonDefinitions\GeometryCube.cs" />
|
||||
<Compile Include="Classes\Conversion\Bedrock\JsonDefinitions\ManifestModule.cs" />
|
||||
<Compile Include="Classes\Conversion\Bedrock\JsonDefinitions\SkinJSON.cs" />
|
||||
<Compile Include="Classes\Conversion\Bedrock\JsonDefinitions\Manifest.cs" />
|
||||
<Compile Include="Classes\Conversion\Bedrock\JsonDefinitions\ManifestHeader.cs" />
|
||||
<Compile Include="Classes\Conversion\Bedrock\JsonDefinitions\SkinObject.cs" />
|
||||
<Compile Include="Classes\Conversion\CommonJsonDefinitions\Geometry.cs" />
|
||||
<Compile Include="Classes\Conversion\CommonJsonDefinitions\GeometryBone.cs" />
|
||||
<Compile Include="Classes\Conversion\CommonJsonDefinitions\GeometryCube.cs" />
|
||||
<Compile Include="Classes\Conversion\CommonJsonDefinitions\ManifestModule.cs" />
|
||||
<Compile Include="Classes\Conversion\CommonJsonDefinitions\SkinJSON.cs" />
|
||||
<Compile Include="Classes\Conversion\CommonJsonDefinitions\Manifest.cs" />
|
||||
<Compile Include="Classes\Conversion\CommonJsonDefinitions\ManifestHeader.cs" />
|
||||
<Compile Include="Classes\Conversion\CommonJsonDefinitions\SkinObject.cs" />
|
||||
<Compile Include="Classes\Conversion\Bedrock\ZipExportContext.cs" />
|
||||
<Compile Include="Classes\Extentions\EnumerableExtentions.cs" />
|
||||
<Compile Include="Classes\FileTypes\CSMBFile.cs" />
|
||||
|
||||
Reference in New Issue
Block a user