Skip to content

Commit

Permalink
Fix bug and move ldtk full into LDtkpackage
Browse files Browse the repository at this point in the history
  • Loading branch information
IrishBruse committed Sep 20, 2024
1 parent f47350d commit 71b3229
Show file tree
Hide file tree
Showing 18 changed files with 1,827 additions and 1,722 deletions.
1 change: 1 addition & 0 deletions .github/workflows/nuget.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
release:
runs-on: ubuntu-latest
needs: build
if: ${{ ! endsWith(inputs.version, '-beta') }}
steps:
- name: Create release
env:
Expand Down
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
**/bin/
**/obj/

.vs/
Nuget/
**/lcov.info
**/bin/
**/obj/

.vs/
Nuget/
**/lcov.info
5 changes: 3 additions & 2 deletions LDtk.Codegen/Generators/BaseGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ namespace LDtk.Codegen.Generators;
using System.Text;

using LDtk.Codegen;
using LDtk.Full;

public class BaseGenerator(LDtkFile ldtkFile, Options options)
public class BaseGenerator(LDtkFileFull ldtkFile, Options options)
{
internal readonly LDtkFile LDtkFile = ldtkFile;
internal readonly LDtkFileFull LDtkFile = ldtkFile;
internal readonly Options Options = options;

int indent;
Expand Down
3 changes: 2 additions & 1 deletion LDtk.Codegen/Generators/ClassGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
namespace LDtk.Codegen.Generators;

using LDtk.Codegen;
using LDtk.Full;

public class ClassGenerator(LDtkFile ldtkFile, Options options) : BaseGenerator(ldtkFile, options)
public class ClassGenerator(LDtkFileFull ldtkFile, Options options) : BaseGenerator(ldtkFile, options)
{
public void Generate()
{
Expand Down
4 changes: 3 additions & 1 deletion LDtk.Codegen/Generators/EnumGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
namespace LDtk.Codegen.Generators;

public class EnumGenerator(LDtkFile ldtkFile, Options options) : BaseGenerator(ldtkFile, options)
using LDtk.Full;

public class EnumGenerator(LDtkFileFull ldtkFile, Options options) : BaseGenerator(ldtkFile, options)
{
public void Generate()
{
Expand Down
4 changes: 3 additions & 1 deletion LDtk.Codegen/Generators/IidGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
namespace LDtk.Codegen.Generators;

public class IidGenerator(LDtkFile ldtkFile, Options options) : BaseGenerator(ldtkFile, options)
using LDtk.Full;

public class IidGenerator(LDtkFileFull ldtkFile, Options options) : BaseGenerator(ldtkFile, options)
{
public void Generate()
{
Expand Down
14 changes: 0 additions & 14 deletions LDtk.Codegen/LDtkFile.cs

This file was deleted.

5 changes: 2 additions & 3 deletions LDtk.Codegen/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ namespace LDtk.Codegen;

using CommandLine;

using LDtk;
using LDtk.Codegen.Generators;
using LDtk.Full;

public static class Program
{
Expand All @@ -30,10 +30,9 @@ static void HandleParseError(IEnumerable<Error> errs)

static void Run(Options opt)
{
Console.WriteLine(opt);
Options = opt;

LDtkFile file = LDtkFile.FromFile(Options.Input);
LDtkFileFull file = LDtkFileFull.FromFile(Options.Input);

if (Version.Parse(file.JsonVersion) > Version.Parse(Constants.SupportedLDtkVersion))
{
Expand Down
Loading

0 comments on commit 71b3229

Please sign in to comment.