Misc changes.

This commit is contained in:
Max 2021-03-19 21:41:46 -05:00
parent f979df89d1
commit 92c5245e79
8 changed files with 119 additions and 83 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup> </startup>
</configuration> </configuration>

View File

@ -9,9 +9,10 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BevelGenerator</RootNamespace> <RootNamespace>BevelGenerator</RootNamespace>
<AssemblyName>BevelGenerator</AssemblyName> <AssemblyName>BevelGenerator</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
@ -33,9 +34,8 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="RobloxFileFormat, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="RobloxFileFormat">
<SpecificVersion>False</SpecificVersion> <HintPath>..\..\Roblox-File-Format\RobloxFileFormat.dll</HintPath>
<HintPath>Packages\RobloxFileFormat.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />

View File

@ -374,6 +374,46 @@ namespace BevelGenerator
NumLODs += 1; NumLODs += 1;
} }
public void SaveV1(Stream stream)
{
using (StringWriter writer = new StringWriter())
{
writer.WriteLine("version 1.00");
writer.WriteLine(NumFaces);
for (int i = 0; i < NumFaces; i++)
{
var face = Faces[i];
for (int j = 0; j < 3; j++)
{
var vert = Verts[face[j]];
writer.Write('[');
writer.Write(vert.Position * 2f);
writer.Write("][");
writer.Write(vert.Normal);
writer.Write("][");
writer.Write(vert.UV.X);
writer.Write(", ");
writer.Write(vert.UV.Y);
writer.Write(", 0]");
}
}
using (BinaryWriter bin = new BinaryWriter(stream))
{
string file = writer.ToString();
byte[] mesh = Encoding.ASCII.GetBytes(file);
stream.Write(mesh, 0, mesh.Length);
}
}
}
public void Save(Stream stream) public void Save(Stream stream)
{ {
const ushort HeaderSize = 16; const ushort HeaderSize = 16;
@ -491,6 +531,7 @@ namespace BevelGenerator
{ {
float[] input = buffer float[] input = buffer
.Skip(1) .Skip(1)
.Where(str => !string.IsNullOrEmpty(str))
.Select(float.Parse) .Select(float.Parse)
.ToArray(); .ToArray();

View File

@ -217,7 +217,6 @@ namespace BevelGenerator
RenderFidelity = RenderFidelity.Automatic, RenderFidelity = RenderFidelity.Automatic,
PhysicsData = union.PhysicsData, PhysicsData = union.PhysicsData,
CollisionFidelity = CollisionFidelity.Box,
PhysicalConfigData = union.PhysicalConfigData, PhysicalConfigData = union.PhysicalConfigData,
}; };
@ -256,7 +255,7 @@ namespace BevelGenerator
using (FileStream file = File.OpenWrite(filePath)) using (FileStream file = File.OpenWrite(filePath))
{ {
file.SetLength(0); file.SetLength(0);
mesh.Save(file); mesh.SaveV1(file);
} }
return mesh; return mesh;

View File

@ -19,7 +19,7 @@ namespace BevelGenerator.Properties {
// class via a tool like ResGen or Visual Studio. // class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen // To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project. // with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources { internal class Resources {

View File

@ -20,6 +20,12 @@ local initMsg = Instance.new("Message")
initMsg.Text = "INITIALIZING..." initMsg.Text = "INITIALIZING..."
initMsg.Parent = workspace initMsg.Parent = workspace
spawn(function ()
local StarterPlayerScripts = StarterPlayer:WaitForChild("StarterPlayerScripts")
local loader = StarterPlayerScripts:WaitForChild("PlayerScriptsLoader")
loader.Disabled = true
end)
if not workspace.FilteringEnabled then if not workspace.FilteringEnabled then
initMsg.Text = "FATAL: Workspace.FilteringEnabled MUST be set to true!!!" initMsg.Text = "FATAL: Workspace.FilteringEnabled MUST be set to true!!!"
return 0 return 0

View File

@ -1,11 +1,7 @@
{ {
"name": "SNZ_CORE", "name": "MainModule",
"tree": "tree":
{
"$className": "Folder",
"MainModule":
{ {
"$path": "core.lua", "$path": "core.lua",
@ -54,5 +50,4 @@
"$path": "Client" "$path": "Client"
} }
} }
}
} }

View File

@ -1,11 +1,7 @@
{ {
"name": "SNZ_SHARED", "name": "MainModule",
"tree": "tree":
{
"$className": "Folder",
"MainModule":
{ {
"$path": "shared.lua", "$path": "shared.lua",
@ -42,5 +38,4 @@
} }
} }
} }
}
} }