Skip to content

Commit

Permalink
V2
Browse files Browse the repository at this point in the history
Added in Lua and Javascript parsers but will not be implemented into the
core mod for now.

Added in variant system

Created new directory system to replace the old file system as the file
system only supported the one directory and not allowing the creation
of new directories or traveling through them

Improved the object to blob system

Disabled writing the user cache until a solution can be found regarding
writing files and not trying to write files that are currently in use
  • Loading branch information
NimbusFox committed May 11, 2018
1 parent c428aa2 commit 5805eb5
Show file tree
Hide file tree
Showing 62 changed files with 2,307 additions and 259 deletions.
1 change: 0 additions & 1 deletion NLua
Submodule NLua deleted from cdab11
7 changes: 1 addition & 6 deletions NimbusFox.FoxCore.Client/ClientHook.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.Threading.Tasks;
using Plukit.Base;
using Plukit.Base;
using Staxel.Items;
using Staxel.Logic;
using Staxel.Modding;
Expand Down
22 changes: 2 additions & 20 deletions NimbusFox.FoxCore.Client/NimbusFox.FoxCore.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -29,6 +30,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Plukit.Base">
Expand All @@ -39,26 +41,6 @@
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\Staxel\bin\Staxel.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Staxel.Auth">
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\Staxel\bin\Staxel.Auth.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Staxel.Checks">
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\Staxel\bin\Staxel.Checks.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Staxel.ToolUtilities">
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\Staxel\bin\Staxel.ToolUtilities.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Staxel.Trace">
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\Staxel\bin\Staxel.Trace.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Staxel.ValueSource">
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\Staxel\bin\Staxel.ValueSource.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System">
<Private>False</Private>
</Reference>
Expand Down
1 change: 0 additions & 1 deletion NimbusFox.FoxCore.Client/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Plukit.Base;
using Staxel;
using Staxel.Core;
using Staxel.Effects;
using Staxel.Logic;
using Staxel.Particles;
using Staxel.Tiles;

namespace NimbusFox.FoxCore.Client.Staxel.Builders.Logic {
public class ParticleHostEntityLogic : EntityLogic {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Plukit.Base;
using Plukit.Base;
using Staxel;
using Staxel.Client;
using Staxel.Core;
using Staxel.Draw;
using Staxel.Effects;
using Staxel.Logic;
Expand Down
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.Threading.Tasks;
using NimbusFox.FoxCore.Client.Staxel.Builders.Logic;
using NimbusFox.FoxCore.Client.Staxel.Builders.Logic;
using NimbusFox.FoxCore.Client.Staxel.Builders.Painter;
using Staxel.Logic;

Expand Down
10 changes: 9 additions & 1 deletion NimbusFox.FoxCore.Tests/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Conari" publicKeyToken="4bbd2ef743db151e" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.2.0.873" newVersion="1.2.0.873" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
1 change: 1 addition & 0 deletions NimbusFox.FoxCore.Tests/NimbusFox.FoxCore.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NimbusFox.FoxCore\NimbusFox.FoxCore.csproj">
Expand Down
41 changes: 15 additions & 26 deletions NimbusFox.FoxCore.Tests/Program.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NimbusFox.FoxCore.Managers;
using Plukit.Base;
using Staxel.FoxCore.Classes;
using Staxel.FoxCore.Managers;

namespace NimbusFox.FoxCore.Tests {
namespace NimbusFox.FoxCore.Tests {
class Program {
// Writes blobs to files made from an object
//static void Main(string[] args) {
Expand Down Expand Up @@ -54,20 +43,20 @@ class Program {
//}

static void Main(string[] args) {
var dic = new Dictionary<Guid, List<Guid>>();
for (var i = 0; i < 10; i++) {
var list = new List<Guid>();
for (var j = 0; j < 10; j++) {
list.Add(Guid.NewGuid());
}
dic.Add(Guid.NewGuid(), list);
}

if (!Directory.Exists("./Results")) {
Directory.CreateDirectory("./Results");
}

File.WriteAllText($"./Results/{Guid.NewGuid().ToString()}.txt", FileManager.SerializeObject(dic));
//var dic = new Dictionary<Guid, List<Guid>>();
//for (var i = 0; i < 10; i++) {
// var list = new List<Guid>();
// for (var j = 0; j < 10; j++) {
// list.Add(Guid.NewGuid());
// }
// dic.Add(Guid.NewGuid(), list);
//}

//if (!Directory.Exists("./Results")) {
// Directory.CreateDirectory("./Results");
//}

//File.WriteAllText($"./Results/{Guid.NewGuid().ToString()}.txt", FileManager.SerializeObject(dic));
}
}
}
1 change: 0 additions & 1 deletion NimbusFox.FoxCore.Tests/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
Expand Down
4 changes: 4 additions & 0 deletions NimbusFox.FoxCore.Tests/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Jint" version="2.11.58" targetFramework="net452" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -28,6 +29,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down
1 change: 0 additions & 1 deletion NimbusFox.FoxCore.VersionCheck/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
Expand Down
6 changes: 2 additions & 4 deletions NimbusFox.FoxCore.VersionCheck/VersionCheck.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace NimbusFox.FoxCore.VersionCheck {
public static class VersionCheck {
private static string[] VersionToRemove => new [] {
"NimbusFox.FoxCore.V1-20180228",
"NimbusFox.FoxCore.V1-20180226"
"NimbusFox.FoxCore.V1-20180226",
"NimbusFox.FoxCore.V1.2"
};

public static void Check() {
Expand Down
8 changes: 1 addition & 7 deletions NimbusFox.FoxCore/Classes/CodeEntry.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 NimbusFox.FoxCore.Classes {
namespace NimbusFox.FoxCore.Classes {
public class CodeEntry {
public readonly string Code;
public readonly uint Rotation;
Expand Down
3 changes: 1 addition & 2 deletions NimbusFox.FoxCore/Classes/Converters.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using System;
using Plukit.Base;
using Staxel.Core;
using Staxel.FoxCore;
using Staxel.FoxCore.Enums;
using NimbusFox.FoxCore.Enums;

namespace NimbusFox.FoxCore {
public static class Converters {
Expand Down
10 changes: 10 additions & 0 deletions NimbusFox.FoxCore/Classes/Delegates.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Plukit.Base;

namespace NimbusFox.FoxCore.Delegates {
public delegate string Command<in TStringArray, in TBlob, in TClientServer, in TICommands, TObjectArray, out TString>(TStringArray array, TBlob blob, TClientServer clientServer, TICommands commandsApi, out TObjectArray objectArray);
}
13 changes: 9 additions & 4 deletions NimbusFox.FoxCore/Classes/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Plukit.Base;

namespace Staxel.FoxCore.Classes {
namespace NimbusFox.FoxCore.Classes {
public static class Extensions {

public static void ObjectToBlob(this Blob blob, string key, object data) {
Expand Down Expand Up @@ -245,6 +242,14 @@ private static object SetProcessProperty(Blob blob, string key, Type type, objec
return Convert.ChangeType(blob.GetDouble(key), type);
}

if (blob.KeyValueIteratable[key].Kind != BlobEntryKind.Blob) {
try {
return blob.GetString(key);
} catch {
return blob.GetBool(key);
}
}

Blob blob2;

if (blob.TryGetBlob(key, out blob2)) {
Expand Down
6 changes: 1 addition & 5 deletions NimbusFox.FoxCore/Classes/UserCache.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Staxel.FoxCore.Classes {
namespace NimbusFox.FoxCore.Classes {
public class UserCache {
public string DisplayName { get; set; }
public string Uid { get; set; }
Expand Down
1 change: 0 additions & 1 deletion NimbusFox.FoxCore/Classes/VectorCubeD.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using Plukit.Base;
using Staxel.FoxCore;

namespace NimbusFox.FoxCore.Classes {
[Serializable]
Expand Down
1 change: 0 additions & 1 deletion NimbusFox.FoxCore/Classes/VectorCubeI.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using Plukit.Base;
using Staxel.FoxCore;

namespace NimbusFox.FoxCore.Classes {
[Serializable]
Expand Down
8 changes: 1 addition & 7 deletions NimbusFox.FoxCore/Classes/VectorData.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 NimbusFox.FoxCore.Classes {
namespace NimbusFox.FoxCore.Classes {
public class VectorData {
public string Code { get; set; }
public uint Rotation { get; set; }
Expand Down
6 changes: 1 addition & 5 deletions NimbusFox.FoxCore/Classes/VectorFileData.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;
using System.Collections.Generic;
using Plukit.Base;

namespace NimbusFox.FoxCore.Classes {
Expand Down
File renamed without changes.
10 changes: 2 additions & 8 deletions NimbusFox.FoxCore/Classes/VoxelOutput.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NimbusFox.FoxCore.Classes;
using Staxel.Voxel;
using Staxel.Voxel;

namespace Staxel.FoxCore.Classes {
namespace NimbusFox.FoxCore.Classes {
public class VoxelOutput {
public VoxelObject Voxels { get; internal set; }
public VectorFileData JsonData { get; internal set; }
Expand Down
3 changes: 1 addition & 2 deletions NimbusFox.FoxCore/Classes/Voxels.Core/MagicaVoxel.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.IO;
using System.IO;
using System.Linq;

namespace Voxels
Expand Down
5 changes: 1 addition & 4 deletions NimbusFox.FoxCore/Classes/Voxels.Core/MeshBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.Generic;

namespace Voxels {
public enum MeshType {
Expand Down
3 changes: 1 addition & 2 deletions NimbusFox.FoxCore/Classes/Voxels.Core/QbclFile.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.IO;
using System.IO;
using System.Text;

namespace Voxels {
Expand Down
Loading

0 comments on commit 5805eb5

Please sign in to comment.