Skip to content

Commit 71b3229

Browse files
committed
Fix bug and move ldtk full into LDtkpackage
1 parent f47350d commit 71b3229

File tree

18 files changed

+1827
-1722
lines changed

18 files changed

+1827
-1722
lines changed

.github/workflows/nuget.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ jobs:
4545
release:
4646
runs-on: ubuntu-latest
4747
needs: build
48+
if: ${{ ! endsWith(inputs.version, '-beta') }}
4849
steps:
4950
- name: Create release
5051
env:

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
**/bin/
2-
**/obj/
3-
4-
.vs/
5-
Nuget/
6-
**/lcov.info
1+
**/bin/
2+
**/obj/
3+
4+
.vs/
5+
Nuget/
6+
**/lcov.info

LDtk.Codegen/Generators/BaseGenerator.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ namespace LDtk.Codegen.Generators;
55
using System.Text;
66

77
using LDtk.Codegen;
8+
using LDtk.Full;
89

9-
public class BaseGenerator(LDtkFile ldtkFile, Options options)
10+
public class BaseGenerator(LDtkFileFull ldtkFile, Options options)
1011
{
11-
internal readonly LDtkFile LDtkFile = ldtkFile;
12+
internal readonly LDtkFileFull LDtkFile = ldtkFile;
1213
internal readonly Options Options = options;
1314

1415
int indent;

LDtk.Codegen/Generators/ClassGenerator.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
namespace LDtk.Codegen.Generators;
22

33
using LDtk.Codegen;
4+
using LDtk.Full;
45

5-
public class ClassGenerator(LDtkFile ldtkFile, Options options) : BaseGenerator(ldtkFile, options)
6+
public class ClassGenerator(LDtkFileFull ldtkFile, Options options) : BaseGenerator(ldtkFile, options)
67
{
78
public void Generate()
89
{

LDtk.Codegen/Generators/EnumGenerator.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
namespace LDtk.Codegen.Generators;
22

3-
public class EnumGenerator(LDtkFile ldtkFile, Options options) : BaseGenerator(ldtkFile, options)
3+
using LDtk.Full;
4+
5+
public class EnumGenerator(LDtkFileFull ldtkFile, Options options) : BaseGenerator(ldtkFile, options)
46
{
57
public void Generate()
68
{

LDtk.Codegen/Generators/IidGenerator.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
namespace LDtk.Codegen.Generators;
22

3-
public class IidGenerator(LDtkFile ldtkFile, Options options) : BaseGenerator(ldtkFile, options)
3+
using LDtk.Full;
4+
5+
public class IidGenerator(LDtkFileFull ldtkFile, Options options) : BaseGenerator(ldtkFile, options)
46
{
57
public void Generate()
68
{

LDtk.Codegen/LDtkFile.cs

Lines changed: 0 additions & 14 deletions
This file was deleted.

LDtk.Codegen/Program.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ namespace LDtk.Codegen;
66

77
using CommandLine;
88

9-
using LDtk;
109
using LDtk.Codegen.Generators;
10+
using LDtk.Full;
1111

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

3131
static void Run(Options opt)
3232
{
33-
Console.WriteLine(opt);
3433
Options = opt;
3534

36-
LDtkFile file = LDtkFile.FromFile(Options.Input);
35+
LDtkFileFull file = LDtkFileFull.FromFile(Options.Input);
3736

3837
if (Version.Parse(file.JsonVersion) > Version.Parse(Constants.SupportedLDtkVersion))
3938
{

0 commit comments

Comments
 (0)