From 71b322954c7210ce002314d89b81f4d03d53273b Mon Sep 17 00:00:00 2001 From: Ethan Conneely Date: Fri, 20 Sep 2024 20:52:39 +0100 Subject: [PATCH] Fix bug and move ldtk full into LDtkpackage --- .github/workflows/nuget.yaml | 1 + .gitignore | 12 +- LDtk.Codegen/Generators/BaseGenerator.cs | 5 +- LDtk.Codegen/Generators/ClassGenerator.cs | 3 +- LDtk.Codegen/Generators/EnumGenerator.cs | 4 +- LDtk.Codegen/Generators/IidGenerator.cs | 4 +- LDtk.Codegen/LDtkFile.cs | 14 - LDtk.Codegen/Program.cs | 5 +- LDtk.Example/Content/World.ldtk | 3358 +++++++++---------- LDtk.Example/LDtk.Example.csproj | 4 + LDtk.JsonSchema/Program.cs | 9 +- LDtk/Constants.cs | 21 + LDtk/Full/LDtkJsonFull.Partial.cs | 48 + {LDtk.Codegen => LDtk/Full}/LDtkJsonFull.cs | 12 +- LDtk/Full/LDtkJsonFullSourceGenerator.cs | 30 + LDtk/JsonPartials/LDtkFile.cs | 9 +- LDtk/LDtkJson.cs | 2 +- docs/Changelog.md | 8 +- 18 files changed, 1827 insertions(+), 1722 deletions(-) delete mode 100644 LDtk.Codegen/LDtkFile.cs create mode 100644 LDtk/Full/LDtkJsonFull.Partial.cs rename {LDtk.Codegen => LDtk/Full}/LDtkJsonFull.cs (99%) create mode 100644 LDtk/Full/LDtkJsonFullSourceGenerator.cs diff --git a/.github/workflows/nuget.yaml b/.github/workflows/nuget.yaml index e098da32..ad3f93ae 100644 --- a/.github/workflows/nuget.yaml +++ b/.github/workflows/nuget.yaml @@ -45,6 +45,7 @@ jobs: release: runs-on: ubuntu-latest needs: build + if: ${{ ! endsWith(inputs.version, '-beta') }} steps: - name: Create release env: diff --git a/.gitignore b/.gitignore index 00ea5707..1a313a3e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ -**/bin/ -**/obj/ - -.vs/ -Nuget/ -**/lcov.info +**/bin/ +**/obj/ + +.vs/ +Nuget/ +**/lcov.info diff --git a/LDtk.Codegen/Generators/BaseGenerator.cs b/LDtk.Codegen/Generators/BaseGenerator.cs index f5b984a6..85eb19f3 100644 --- a/LDtk.Codegen/Generators/BaseGenerator.cs +++ b/LDtk.Codegen/Generators/BaseGenerator.cs @@ -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; diff --git a/LDtk.Codegen/Generators/ClassGenerator.cs b/LDtk.Codegen/Generators/ClassGenerator.cs index 1b376ef8..52763756 100644 --- a/LDtk.Codegen/Generators/ClassGenerator.cs +++ b/LDtk.Codegen/Generators/ClassGenerator.cs @@ -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() { diff --git a/LDtk.Codegen/Generators/EnumGenerator.cs b/LDtk.Codegen/Generators/EnumGenerator.cs index b0fd27ec..e9cade4e 100644 --- a/LDtk.Codegen/Generators/EnumGenerator.cs +++ b/LDtk.Codegen/Generators/EnumGenerator.cs @@ -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() { diff --git a/LDtk.Codegen/Generators/IidGenerator.cs b/LDtk.Codegen/Generators/IidGenerator.cs index 0242f737..9b514d9f 100644 --- a/LDtk.Codegen/Generators/IidGenerator.cs +++ b/LDtk.Codegen/Generators/IidGenerator.cs @@ -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() { diff --git a/LDtk.Codegen/LDtkFile.cs b/LDtk.Codegen/LDtkFile.cs deleted file mode 100644 index 9143db60..00000000 --- a/LDtk.Codegen/LDtkFile.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace LDtk.Codegen; - -using System.IO; -using System.Text.Json; - -using LDtk; - -public partial class LDtkFile -{ - public static LDtkFile FromFile(string filePath) - { - return JsonSerializer.Deserialize(File.ReadAllText(filePath), Constants.SerializeOptions); - } -} diff --git a/LDtk.Codegen/Program.cs b/LDtk.Codegen/Program.cs index 2817f471..53743e10 100644 --- a/LDtk.Codegen/Program.cs +++ b/LDtk.Codegen/Program.cs @@ -6,8 +6,8 @@ namespace LDtk.Codegen; using CommandLine; -using LDtk; using LDtk.Codegen.Generators; +using LDtk.Full; public static class Program { @@ -30,10 +30,9 @@ static void HandleParseError(IEnumerable 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)) { diff --git a/LDtk.Example/Content/World.ldtk b/LDtk.Example/Content/World.ldtk index 6a235db0..7236df24 100644 --- a/LDtk.Example/Content/World.ldtk +++ b/LDtk.Example/Content/World.ldtk @@ -1,1680 +1,1680 @@ { - "__header__": { - "fileType": "LDtk Project JSON", - "app": "LDtk", - "doc": "https://ldtk.io/json", - "schema": "https://ldtk.io/files/JSON_SCHEMA.json", - "appAuthor": "Sebastien 'deepnight' Benard", - "appVersion": "1.5.3", - "url": "https://ldtk.io" - }, - "iid": "a166a7b0-7820-11ed-bac1-7b0dea379c49", - "jsonVersion": "1.5.3", - "appBuildId": 473703, - "nextUid": 147, - "identifierStyle": "Capitalize", - "toc": [], - "worldLayout": null, - "worldGridWidth": null, - "worldGridHeight": null, - "defaultLevelWidth": null, - "defaultLevelHeight": null, - "defaultPivotX": 0, - "defaultPivotY": 0, - "defaultGridSize": 16, - "defaultEntityWidth": 16, - "defaultEntityHeight": 16, - "bgColor": "#FCDFCD", - "defaultLevelBgColor": "#FCDFCD", - "minifyJson": false, - "externalLevels": true, - "exportTiled": false, - "simplifiedExport": false, - "imageExportMode": "None", - "exportLevelBg": true, - "pngFilePattern": null, - "backupOnSave": false, - "backupLimit": 10, - "backupRelPath": null, - "levelNamePattern": "%world_Level_%idx", - "tutorialDesc": null, - "customCommands": [{ - "command": "ldtkgen -i World.ldtk -o ../LDtkTypes/ --LevelClassName CustomLevelDataName --FileNameInNamespace --PointAsVector2", - "when": "AfterSave" - }], - "flags": [ "ExportOldTableOfContentData", "MultiWorlds" ], - "defs": { "layers": [ - { - "__type": "Entities", - "identifier": "Enemies", - "type": "Entities", - "uid": 99, - "doc": null, - "uiColor": null, - "gridSize": 16, - "guideGridWid": 0, - "guideGridHei": 0, - "displayOpacity": 1, - "inactiveOpacity": 0.6, - "hideInList": false, - "hideFieldsWhenInactive": true, - "canSelectWhenInactive": true, - "renderInWorldView": true, - "pxOffsetX": 0, - "pxOffsetY": 0, - "parallaxFactorX": 0, - "parallaxFactorY": 0, - "parallaxScaling": true, - "requiredTags": [], - "excludedTags": [], - "autoTilesKilledByOtherLayerUid": null, - "uiFilterTags": [], - "useAsyncRender": false, - "intGridValues": [], - "intGridValuesGroups": [], - "autoRuleGroups": [], - "autoSourceLayerDefUid": null, - "tilesetDefUid": null, - "tilePivotX": 0, - "tilePivotY": 0, - "biomeFieldUid": null - }, - { - "__type": "IntGrid", - "identifier": "Tiles", - "type": "IntGrid", - "uid": 54, - "doc": null, - "uiColor": null, - "gridSize": 16, - "guideGridWid": 0, - "guideGridHei": 0, - "displayOpacity": 1, - "inactiveOpacity": 1, - "hideInList": false, - "hideFieldsWhenInactive": true, - "canSelectWhenInactive": true, - "renderInWorldView": true, - "pxOffsetX": 0, - "pxOffsetY": 0, - "parallaxFactorX": 0, - "parallaxFactorY": 0, - "parallaxScaling": true, - "requiredTags": [], - "excludedTags": [], - "autoTilesKilledByOtherLayerUid": null, - "uiFilterTags": [], - "useAsyncRender": false, - "intGridValues": [ - { "value": 1, "identifier": "Mushroom", "color": "#FF0000", "tile": null, "groupUid": 0 }, - { "value": 2, "identifier": "Flower", "color": "#CF6A6A", "tile": null, "groupUid": 0 }, - { "value": 3, "identifier": "Grass", "color": "#45CA57", "tile": null, "groupUid": 0 }, - { "value": 4, "identifier": "Fence", "color": "#5A3C26", "tile": null, "groupUid": 0 }, - { "value": 5, "identifier": "Tree", "color": "#47AF28", "tile": null, "groupUid": 0 }, - { "value": 6, "identifier": "Ground", "color": "#0034FF", "tile": null, "groupUid": 0 }, - { "value": 7, "identifier": "Left_Ground", "color": "#8200FF", "tile": null, "groupUid": 0 } - ], - "intGridValuesGroups": [], - "autoRuleGroups": [ - { - "uid": 65, - "name": "Ground", - "color": null, - "icon": null, - "active": true, - "isOptional": false, - "rules": [ - { - "uid": 73, - "active": true, - "size": 3, - "tileRectsIds": [[9]], - "alpha": 1, - "chance": 1, - "breakOnMatch": true, - "pattern": [0,-6,0,-6,6,-6,0,-6,0], - "flipX": false, - "flipY": false, - "xModulo": 1, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": 0, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 9804454, - "perlinScale": 0.2, - "perlinOctaves": 2 - }, - { - "uid": 74, - "active": true, - "size": 3, - "tileRectsIds": [[22]], - "alpha": 1, - "chance": 1, - "breakOnMatch": true, - "pattern": [0,-6,0,-6,6,-6,0,6,0], - "flipX": false, - "flipY": false, - "xModulo": 1, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": 0, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 5650102, - "perlinScale": 0.2, - "perlinOctaves": 2 - }, - { - "uid": 69, - "active": true, - "size": 3, - "tileRectsIds": [ [3], [6] ], - "alpha": 1, - "chance": 1, - "breakOnMatch": true, - "pattern": [0,-6,0,-6,6,6,0,6,0], - "flipX": false, - "flipY": false, - "xModulo": 1, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": 0, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 514098, - "perlinScale": 0.2, - "perlinOctaves": 2 - }, - { - "uid": 93, - "active": true, - "size": 3, - "tileRectsIds": [ [3], [6] ], - "alpha": 1, - "chance": 1, - "breakOnMatch": true, - "pattern": [0,-6,0,-6,6,6,0,7,0], - "flipX": false, - "flipY": false, - "xModulo": 1, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": 0, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 514098, - "perlinScale": 0.2, - "perlinOctaves": 2 - }, - { - "uid": 72, - "active": true, - "size": 3, - "tileRectsIds": [ [5], [8] ], - "alpha": 1, - "chance": 1, - "breakOnMatch": true, - "pattern": [0,-6,0,6,6,-6,0,6,0], - "flipX": false, - "flipY": false, - "xModulo": 1, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": 0, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 514098, - "perlinScale": 0.2, - "perlinOctaves": 2 - }, - { - "uid": 70, - "active": true, - "size": 3, - "tileRectsIds": [[34]], - "alpha": 1, - "chance": 1, - "breakOnMatch": true, - "pattern": [0,-1000001,0,6,6,-6,0,-6,0], - "flipX": false, - "flipY": false, - "xModulo": 1, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": 0, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 514098, - "perlinScale": 0.2, - "perlinOctaves": 2 - }, - { - "uid": 71, - "active": true, - "size": 3, - "tileRectsIds": [[33]], - "alpha": 1, - "chance": 1, - "breakOnMatch": true, - "pattern": [0,-6,0,-6,6,6,0,-6,0], - "flipX": false, - "flipY": false, - "xModulo": 1, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": 0, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 514098, - "perlinScale": 0.2, - "perlinOctaves": 2 - }, - { - "uid": 81, - "active": true, - "size": 3, - "tileRectsIds": [ [29], [31] ], - "alpha": 1, - "chance": 1, - "breakOnMatch": true, - "pattern": [-6,6,0,6,6,0,0,0,0], - "flipX": false, - "flipY": false, - "xModulo": 1, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": 0, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 8589087, - "perlinScale": 0.2, - "perlinOctaves": 2 - }, - { - "uid": 121, - "active": true, - "size": 3, - "tileRectsIds": [ [29], [31] ], - "alpha": 1, - "chance": 1, - "breakOnMatch": true, - "pattern": [-6,7,0,6,6,0,0,0,0], - "flipX": false, - "flipY": false, - "xModulo": 1, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": 0, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 8589087, - "perlinScale": 0.2, - "perlinOctaves": 2 - }, - { - "uid": 82, - "active": true, - "size": 3, - "tileRectsIds": [ [30], [32] ], - "alpha": 1, - "chance": 1, - "breakOnMatch": true, - "pattern": [0,6,-6,0,6,6,0,0,0], - "flipX": false, - "flipY": false, - "xModulo": 1, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": null, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 583018, - "perlinScale": 0.2, - "perlinOctaves": 2 - }, - { - "uid": 122, - "active": true, - "size": 3, - "tileRectsIds": [[16]], - "alpha": 1, - "chance": 1, - "breakOnMatch": true, - "pattern": [0,0,0,0,7,0,0,6,0], - "flipX": false, - "flipY": false, - "xModulo": 1, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": null, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 890380, - "perlinScale": 0.2, - "perlinOctaves": 2 - }, - { - "uid": 97, - "active": true, - "size": 3, - "tileRectsIds": [[21]], - "alpha": 1, - "chance": 1, - "breakOnMatch": true, - "pattern": [0,6,0,0,6,0,0,-6,0], - "flipX": false, - "flipY": false, - "xModulo": 1, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": null, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 1655032, - "perlinScale": 0.2, - "perlinOctaves": 2 - }, - { - "uid": 96, - "active": true, - "size": 3, - "tileRectsIds": [[18]], - "alpha": 1, - "chance": 1, - "breakOnMatch": true, - "pattern": [0,0,0,0,6,0,0,6,0], - "flipX": false, - "flipY": false, - "xModulo": 1, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": null, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 890380, - "perlinScale": 0.2, - "perlinOctaves": 2 - }, - { - "uid": 95, - "active": true, - "size": 3, - "tileRectsIds": [[19]], - "alpha": 1, - "chance": 1, - "breakOnMatch": true, - "pattern": [0,0,0,0,7,0,0,-7,0], - "flipX": false, - "flipY": false, - "xModulo": 1, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": null, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 1655032, - "perlinScale": 0.2, - "perlinOctaves": 2 - }, - { - "uid": 92, - "active": true, - "size": 3, - "tileRectsIds": [[16]], - "alpha": 1, - "chance": 1, - "breakOnMatch": true, - "pattern": [0,0,0,0,7,0,0,7,0], - "flipX": false, - "flipY": false, - "xModulo": 1, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": null, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 890380, - "perlinScale": 0.2, - "perlinOctaves": 2 - }, - { - "uid": 87, - "active": true, - "size": 3, - "tileRectsIds": [[28]], - "alpha": 1, - "chance": 1, - "breakOnMatch": true, - "pattern": [0,5,0,6,6,6,0,0,0], - "flipX": false, - "flipY": false, - "xModulo": 1, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": null, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 1847569, - "perlinScale": 0.2, - "perlinOctaves": 2 - }, - { - "uid": 91, - "active": true, - "size": 1, - "tileRectsIds": [ [4], [7] ], - "alpha": 1, - "chance": 1, - "breakOnMatch": true, - "pattern": [6], - "flipX": false, - "flipY": false, - "xModulo": 1, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": null, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 1847569, - "perlinScale": 0.2, - "perlinOctaves": 2 - } - ], - "usesWizard": false, - "requiredBiomeValues": [], - "biomeRequirementMode": 0 - }, - { - "uid": 76, - "name": "Trees", - "color": null, - "icon": null, - "active": true, - "isOptional": false, - "rules": [ - { - "uid": 80, - "active": true, - "size": 3, - "tileRectsIds": [[10]], - "alpha": 1, - "chance": 1, - "breakOnMatch": true, - "pattern": [0,-5,0,0,5,0,0,5,0], - "flipX": false, - "flipY": false, - "xModulo": 1, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": null, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 3193271, - "perlinScale": 0.2, - "perlinOctaves": 2 - }, - { - "uid": 78, - "active": true, - "size": 3, - "tileRectsIds": [ [36], [37], [38] ], - "alpha": 1, - "chance": 1, - "breakOnMatch": true, - "pattern": [0,5,0,0,5,0,0,-5,0], - "flipX": false, - "flipY": false, - "xModulo": 1, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": null, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 1781631, - "perlinScale": 0.2, - "perlinOctaves": 2 - }, - { - "uid": 79, - "active": true, - "size": 1, - "tileRectsIds": [[23]], - "alpha": 1, - "chance": 0.52, - "breakOnMatch": true, - "pattern": [5], - "flipX": false, - "flipY": false, - "xModulo": 1, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": null, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 8665533, - "perlinScale": 0.2, - "perlinOctaves": 2 - }, - { - "uid": 77, - "active": true, - "size": 1, - "tileRectsIds": [ [11], [24], [25] ], - "alpha": 1, - "chance": 1, - "breakOnMatch": true, - "pattern": [5], - "flipX": false, - "flipY": false, - "xModulo": 1, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": null, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 8406507, - "perlinScale": 0.2, - "perlinOctaves": 2 - } - ], - "usesWizard": false, - "requiredBiomeValues": [], - "biomeRequirementMode": 0 - }, - { - "uid": 57, - "name": "Decorations", - "color": null, - "icon": null, - "active": true, - "isOptional": false, - "rules": [ - { - "uid": 62, - "active": true, - "size": 1, - "tileRectsIds": [ [45], [46] ], - "alpha": 1, - "chance": 1, - "breakOnMatch": true, - "pattern": [4], - "flipX": false, - "flipY": false, - "xModulo": 1, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": null, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 8350014, - "perlinScale": 0.2, - "perlinOctaves": 2 - }, - { - "uid": 60, - "active": true, - "size": 1, - "tileRectsIds": [ [43], [44] ], - "alpha": 1, - "chance": 1, - "breakOnMatch": true, - "pattern": [3], - "flipX": false, - "flipY": false, - "xModulo": 1, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": null, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 3554302, - "perlinScale": 0.2, - "perlinOctaves": 2 - }, - { - "uid": 59, - "active": true, - "size": 1, - "tileRectsIds": [ [41], [42] ], - "alpha": 1, - "chance": 1, - "breakOnMatch": true, - "pattern": [2], - "flipX": false, - "flipY": false, - "xModulo": 2, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": null, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 8822998, - "perlinScale": 0.2, - "perlinOctaves": 2 - }, - { - "uid": 109, - "active": true, - "size": 1, - "tileRectsIds": [[42]], - "alpha": 1, - "chance": 1, - "breakOnMatch": true, - "pattern": [2], - "flipX": false, - "flipY": false, - "xModulo": 1, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": null, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 8822998, - "perlinScale": 0.2, - "perlinOctaves": 2 - }, - { - "uid": 58, - "active": true, - "size": 1, - "tileRectsIds": [ [39], [40] ], - "alpha": 1, - "chance": 1, - "breakOnMatch": true, - "pattern": [1], - "flipX": false, - "flipY": false, - "xModulo": 1, - "yModulo": 1, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "None", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": null, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 9225721, - "perlinScale": 0.2, - "perlinOctaves": 2 - } - ], - "usesWizard": false, - "requiredBiomeValues": [], - "biomeRequirementMode": 0 - }, - { - "uid": 67, - "name": "Clouds", - "color": null, - "icon": null, - "active": true, - "isOptional": false, - "rules": [ - { - "uid": 68, - "active": true, - "size": 1, - "tileRectsIds": [ [14], [15] ], - "alpha": 1, - "chance": 0.22, - "breakOnMatch": true, - "pattern": [0], - "flipX": false, - "flipY": false, - "xModulo": 2, - "yModulo": 2, - "xOffset": 0, - "yOffset": 0, - "tileXOffset": 0, - "tileYOffset": 0, - "tileRandomXMin": 0, - "tileRandomXMax": 0, - "tileRandomYMin": 0, - "tileRandomYMax": 0, - "checker": "Horizontal", - "tileMode": "Single", - "pivotX": 0, - "pivotY": 0, - "outOfBoundsValue": null, - "invalidated": false, - "perlinActive": false, - "perlinSeed": 4732725, - "perlinScale": 0.2, - "perlinOctaves": 2 - } - ], - "usesWizard": false, - "requiredBiomeValues": [], - "biomeRequirementMode": 0 - } - ], - "autoSourceLayerDefUid": null, - "tilesetDefUid": 1, - "tilePivotX": 0, - "tilePivotY": 0, - "biomeFieldUid": null - } - ], "entities": [ - { - "identifier": "Enemy", - "uid": 98, - "tags": [], - "exportToToc": false, - "allowOutOfBounds": false, - "doc": null, - "width": 16, - "height": 16, - "resizableX": false, - "resizableY": false, - "minWidth": null, - "maxWidth": null, - "minHeight": null, - "maxHeight": null, - "keepAspectRatio": false, - "tileOpacity": 1, - "fillOpacity": 0.08, - "lineOpacity": 0, - "hollow": false, - "color": "#FF6B19", - "renderMode": "Tile", - "showName": false, - "tilesetId": 2, - "tileRenderMode": "FitInside", - "tileRect": { "tilesetUid": 2, "x": 16, "y": 16, "w": 16, "h": 16 }, - "uiTileRect": null, - "nineSliceBorders": [], - "maxCount": 0, - "limitScope": "PerLevel", - "limitBehavior": "MoveLastOne", - "pivotX": 0.5, - "pivotY": 0.5, - "fieldDefs": [ - { - "identifier": "Wander", - "doc": null, - "__type": "Array", - "uid": 100, - "type": "F_Point", - "isArray": true, - "canBeNull": false, - "arrayMinLength": null, - "arrayMaxLength": null, - "editorDisplayMode": "PointPathLoop", - "editorDisplayScale": 1, - "editorDisplayPos": "Above", - "editorLinkStyle": "StraightArrow", - "editorDisplayColor": null, - "editorAlwaysShow": false, - "editorShowInWorld": true, - "editorCutLongValues": true, - "editorTextSuffix": null, - "editorTextPrefix": null, - "useForSmartColor": false, - "exportToToc": false, - "searchable": false, - "min": null, - "max": null, - "regex": null, - "acceptFileTypes": null, - "defaultOverride": null, - "textLanguageMode": null, - "symmetricalRef": false, - "autoChainRef": true, - "allowOutOfLevelRef": true, - "allowedRefs": "OnlySame", - "allowedRefsEntityUid": null, - "allowedRefTags": [], - "tilesetUid": null - }, - { - "identifier": "Type", - "doc": null, - "__type": "LocalEnum.EnemyType", - "uid": 119, - "type": "F_Enum(118)", - "isArray": false, - "canBeNull": false, - "arrayMinLength": null, - "arrayMaxLength": null, - "editorDisplayMode": "EntityTile", - "editorDisplayScale": 1, - "editorDisplayPos": "Above", - "editorLinkStyle": "StraightArrow", - "editorDisplayColor": null, - "editorAlwaysShow": false, - "editorShowInWorld": true, - "editorCutLongValues": true, - "editorTextSuffix": null, - "editorTextPrefix": null, - "useForSmartColor": false, - "exportToToc": false, - "searchable": false, - "min": null, - "max": null, - "regex": null, - "acceptFileTypes": null, - "defaultOverride": null, - "textLanguageMode": null, - "symmetricalRef": false, - "autoChainRef": true, - "allowOutOfLevelRef": true, - "allowedRefs": "OnlySame", - "allowedRefsEntityUid": null, - "allowedRefTags": [], - "tilesetUid": null - }, - { - "identifier": "Color", - "doc": null, - "__type": "Color", - "uid": 143, - "type": "F_Color", - "isArray": false, - "canBeNull": false, - "arrayMinLength": null, - "arrayMaxLength": null, - "editorDisplayMode": "Hidden", - "editorDisplayScale": 1, - "editorDisplayPos": "Above", - "editorLinkStyle": "StraightArrow", - "editorDisplayColor": null, - "editorAlwaysShow": false, - "editorShowInWorld": true, - "editorCutLongValues": true, - "editorTextSuffix": null, - "editorTextPrefix": null, - "useForSmartColor": true, - "exportToToc": false, - "searchable": false, - "min": null, - "max": null, - "regex": null, - "acceptFileTypes": null, - "defaultOverride": { "id": "V_Int", "params": [10899536] }, - "textLanguageMode": null, - "symmetricalRef": false, - "autoChainRef": true, - "allowOutOfLevelRef": true, - "allowedRefs": "OnlySame", - "allowedRefsEntityUid": null, - "allowedRefTags": [], - "tilesetUid": null - } - ] - }, - { - "identifier": "Gun_Pickup", - "uid": 107, - "tags": [], - "exportToToc": false, - "allowOutOfBounds": false, - "doc": null, - "width": 16, - "height": 16, - "resizableX": false, - "resizableY": false, - "minWidth": null, - "maxWidth": null, - "minHeight": null, - "maxHeight": null, - "keepAspectRatio": false, - "tileOpacity": 1, - "fillOpacity": 0.08, - "lineOpacity": 0, - "hollow": false, - "color": "#4BE060", - "renderMode": "Tile", - "showName": false, - "tilesetId": 2, - "tileRenderMode": "FitInside", - "tileRect": { "tilesetUid": 2, "x": 0, "y": 16, "w": 16, "h": 16 }, - "uiTileRect": null, - "nineSliceBorders": [], - "maxCount": 0, - "limitScope": "PerLevel", - "limitBehavior": "MoveLastOne", - "pivotX": 0.5, - "pivotY": 1, - "fieldDefs": [] - }, - { - "identifier": "Player", - "uid": 120, - "tags": [], - "exportToToc": false, - "allowOutOfBounds": false, - "doc": null, - "width": 16, - "height": 16, - "resizableX": false, - "resizableY": false, - "minWidth": null, - "maxWidth": null, - "minHeight": null, - "maxHeight": null, - "keepAspectRatio": false, - "tileOpacity": 1, - "fillOpacity": 0.08, - "lineOpacity": 0, - "hollow": false, - "color": "#94D9B3", - "renderMode": "Tile", - "showName": false, - "tilesetId": 2, - "tileRenderMode": "FitInside", - "tileRect": { "tilesetUid": 2, "x": 80, "y": 0, "w": 16, "h": 16 }, - "uiTileRect": null, - "nineSliceBorders": [], - "maxCount": 1, - "limitScope": "PerWorld", - "limitBehavior": "PreventAdding", - "pivotX": 0.5, - "pivotY": 0.5, - "fieldDefs": [] - }, - { - "identifier": "RefTest", - "uid": 123, - "tags": [], - "exportToToc": false, - "allowOutOfBounds": false, - "doc": null, - "width": 16, - "height": 16, - "resizableX": false, - "resizableY": false, - "minWidth": null, - "maxWidth": null, - "minHeight": null, - "maxHeight": null, - "keepAspectRatio": false, - "tileOpacity": 1, - "fillOpacity": 0.08, - "lineOpacity": 0, - "hollow": false, - "color": "#94D9B3", - "renderMode": "Tile", - "showName": true, - "tilesetId": 1, - "tileRenderMode": "FitInside", - "tileRect": { "tilesetUid": 1, "x": 16, "y": 48, "w": 16, "h": 16 }, - "uiTileRect": null, - "nineSliceBorders": [], - "maxCount": 0, - "limitScope": "PerLevel", - "limitBehavior": "MoveLastOne", - "pivotX": 0, - "pivotY": 0, - "fieldDefs": [ - { - "identifier": "Test", - "doc": null, - "__type": "EntityRef", - "uid": 124, - "type": "F_EntityRef", - "isArray": false, - "canBeNull": true, - "arrayMinLength": null, - "arrayMaxLength": null, - "editorDisplayMode": "RefLinkBetweenCenters", - "editorDisplayScale": 1, - "editorDisplayPos": "Above", - "editorLinkStyle": "CurvedArrow", - "editorDisplayColor": null, - "editorAlwaysShow": false, - "editorShowInWorld": true, - "editorCutLongValues": true, - "editorTextSuffix": null, - "editorTextPrefix": null, - "useForSmartColor": false, - "exportToToc": false, - "searchable": false, - "min": null, - "max": null, - "regex": null, - "acceptFileTypes": null, - "defaultOverride": null, - "textLanguageMode": null, - "symmetricalRef": false, - "autoChainRef": true, - "allowOutOfLevelRef": true, - "allowedRefs": "OnlySame", - "allowedRefsEntityUid": null, - "allowedRefTags": [], - "tilesetUid": null - }, - { - "identifier": "TileTest", - "doc": null, - "__type": "Tile", - "uid": 140, - "type": "F_Tile", - "isArray": false, - "canBeNull": true, - "arrayMinLength": null, - "arrayMaxLength": null, - "editorDisplayMode": "ValueOnly", - "editorDisplayScale": 1, - "editorDisplayPos": "Above", - "editorLinkStyle": "StraightArrow", - "editorDisplayColor": null, - "editorAlwaysShow": false, - "editorShowInWorld": true, - "editorCutLongValues": true, - "editorTextSuffix": null, - "editorTextPrefix": null, - "useForSmartColor": false, - "exportToToc": false, - "searchable": false, - "min": null, - "max": null, - "regex": null, - "acceptFileTypes": null, - "defaultOverride": { - "id": "V_String", - "params": ["112,32,16,16"] - }, - "textLanguageMode": null, - "symmetricalRef": false, - "autoChainRef": true, - "allowOutOfLevelRef": true, - "allowedRefs": "OnlySame", - "allowedRefsEntityUid": null, - "allowedRefTags": [], - "tilesetUid": 1 - }, - { - "identifier": "Float", - "doc": null, - "__type": "Float", - "uid": 141, - "type": "F_Float", - "isArray": false, - "canBeNull": true, - "arrayMinLength": null, - "arrayMaxLength": null, - "editorDisplayMode": "Hidden", - "editorDisplayScale": 1, - "editorDisplayPos": "Above", - "editorLinkStyle": "StraightArrow", - "editorDisplayColor": null, - "editorAlwaysShow": false, - "editorShowInWorld": true, - "editorCutLongValues": true, - "editorTextSuffix": null, - "editorTextPrefix": null, - "useForSmartColor": false, - "exportToToc": false, - "searchable": false, - "min": null, - "max": null, - "regex": null, - "acceptFileTypes": null, - "defaultOverride": null, - "textLanguageMode": null, - "symmetricalRef": false, - "autoChainRef": true, - "allowOutOfLevelRef": true, - "allowedRefs": "OnlySame", - "allowedRefsEntityUid": null, - "allowedRefTags": [], - "tilesetUid": null - }, - { - "identifier": "EnemyType", - "doc": null, - "__type": "LocalEnum.EnemyType", - "uid": 142, - "type": "F_Enum(118)", - "isArray": false, - "canBeNull": true, - "arrayMinLength": null, - "arrayMaxLength": null, - "editorDisplayMode": "Hidden", - "editorDisplayScale": 1, - "editorDisplayPos": "Above", - "editorLinkStyle": "StraightArrow", - "editorDisplayColor": null, - "editorAlwaysShow": false, - "editorShowInWorld": true, - "editorCutLongValues": true, - "editorTextSuffix": null, - "editorTextPrefix": null, - "useForSmartColor": false, - "exportToToc": false, - "searchable": false, - "min": null, - "max": null, - "regex": null, - "acceptFileTypes": null, - "defaultOverride": null, - "textLanguageMode": null, - "symmetricalRef": false, - "autoChainRef": true, - "allowOutOfLevelRef": true, - "allowedRefs": "OnlySame", - "allowedRefsEntityUid": null, - "allowedRefTags": [], - "tilesetUid": null - } - ] - } - ], "tilesets": [ - { - "__cWid": 13, - "__cHei": 4, - "identifier": "Tilemap", - "uid": 1, - "relPath": "Atlas/Tilemap.png", - "embedAtlas": null, - "pxWid": 208, - "pxHei": 64, - "tileGridSize": 16, - "spacing": 0, - "padding": 0, - "tags": [], - "tagsSourceEnumUid": null, - "enumTags": [], - "customData": [], - "savedSelections": [], - "cachedPixelData": { - "opaqueTiles": "0000000000000000000000000000000000000000000000000000", - "averageColors": "00003fed2fed5bc54cb65bc55bc54cb65bc55bc5bbc48cb600000bd42fed4fed2bc300002bc31bc300001bc36bc52da85cb65cb64cb65cb65cb61cb61cb61cb71cb74bc54bc53bc33ca76cb66cb63ea82ea96d743e7439b228a15da84da800000000000000000000" - } - }, - { - "__cWid": 7, - "__cHei": 2, - "identifier": "Characters", - "uid": 2, - "relPath": "Characters.png", - "embedAtlas": null, - "pxWid": 112, - "pxHei": 32, - "tileGridSize": 16, - "spacing": 0, - "padding": 0, - "tags": [], - "tagsSourceEnumUid": null, - "enumTags": [], - "customData": [], - "savedSelections": [], - "cachedPixelData": { "opaqueTiles": "00000000000000", "averageColors": "77ac77ac67ac2fc54fc763be72be2c544ec93db747bd46bd3e533e54" } - } - ], "enums": [{ "identifier": "EnemyType", "uid": 118, "values": [ - { "id": "YellowBee", "tileRect": { "tilesetUid": 2, "x": 16, "y": 16, "w": 16, "h": 16 }, "color": 15649945 }, - { "id": "BlueBee", "tileRect": { "tilesetUid": 2, "x": 48, "y": 16, "w": 16, "h": 16 }, "color": 7846877 }, - { "id": "Slug", "tileRect": { "tilesetUid": 2, "x": 80, "y": 16, "w": 16, "h": 16 }, "color": 15619379 } - ], "iconTilesetUid": 2, "externalRelPath": null, "externalFileChecksum": null, "tags": [] }], "externalEnums": [], "levelFields": [ - { - "identifier": "Float", - "doc": null, - "__type": "Float", - "uid": 144, - "type": "F_Float", - "isArray": false, - "canBeNull": false, - "arrayMinLength": null, - "arrayMaxLength": null, - "editorDisplayMode": "Hidden", - "editorDisplayScale": 1, - "editorDisplayPos": "Above", - "editorLinkStyle": "StraightArrow", - "editorDisplayColor": null, - "editorAlwaysShow": false, - "editorShowInWorld": true, - "editorCutLongValues": true, - "editorTextSuffix": null, - "editorTextPrefix": null, - "useForSmartColor": false, - "exportToToc": false, - "searchable": false, - "min": null, - "max": null, - "regex": null, - "acceptFileTypes": null, - "defaultOverride": null, - "textLanguageMode": null, - "symmetricalRef": false, - "autoChainRef": true, - "allowOutOfLevelRef": true, - "allowedRefs": "OnlySame", - "allowedRefsEntityUid": null, - "allowedRefTags": [], - "tilesetUid": null - }, - { - "identifier": "Tile", - "doc": null, - "__type": "Array", - "uid": 145, - "type": "F_Tile", - "isArray": true, - "canBeNull": false, - "arrayMinLength": null, - "arrayMaxLength": null, - "editorDisplayMode": "EntityTile", - "editorDisplayScale": 1, - "editorDisplayPos": "Above", - "editorLinkStyle": "StraightArrow", - "editorDisplayColor": null, - "editorAlwaysShow": false, - "editorShowInWorld": true, - "editorCutLongValues": true, - "editorTextSuffix": null, - "editorTextPrefix": null, - "useForSmartColor": false, - "exportToToc": false, - "searchable": false, - "min": null, - "max": null, - "regex": null, - "acceptFileTypes": null, - "defaultOverride": null, - "textLanguageMode": null, - "symmetricalRef": false, - "autoChainRef": true, - "allowOutOfLevelRef": true, - "allowedRefs": "OnlySame", - "allowedRefsEntityUid": null, - "allowedRefTags": [], - "tilesetUid": 1 - }, - { - "identifier": "Multilines", - "doc": null, - "__type": "String", - "uid": 146, - "type": "F_Text", - "isArray": false, - "canBeNull": true, - "arrayMinLength": null, - "arrayMaxLength": null, - "editorDisplayMode": "Hidden", - "editorDisplayScale": 1, - "editorDisplayPos": "Above", - "editorLinkStyle": "StraightArrow", - "editorDisplayColor": null, - "editorAlwaysShow": false, - "editorShowInWorld": true, - "editorCutLongValues": true, - "editorTextSuffix": null, - "editorTextPrefix": null, - "useForSmartColor": false, - "exportToToc": false, - "searchable": false, - "min": null, - "max": null, - "regex": null, - "acceptFileTypes": null, - "defaultOverride": null, - "textLanguageMode": null, - "symmetricalRef": false, - "autoChainRef": true, - "allowOutOfLevelRef": true, - "allowedRefs": "OnlySame", - "allowedRefsEntityUid": null, - "allowedRefTags": [], - "tilesetUid": null - } - ] }, - "levels": [], - "worlds": [{ "iid": "2c81d720-b4d0-11ec-9871-056972512958", "identifier": "World", "defaultLevelWidth": 256, "defaultLevelHeight": 256, "worldGridWidth": 32, "worldGridHeight": 32, "worldLayout": "GridVania", "levels": [ - { - "identifier": "Level_1", - "iid": "2038b2a1-8dc0-11ec-a0e2-e5abc8178676", - "uid": 0, - "worldX": 672, - "worldY": 0, - "worldDepth": 0, - "pxWid": 384, - "pxHei": 320, - "__bgColor": "#FCDFCD", - "bgColor": null, - "useAutoIdentifier": false, - "bgRelPath": null, - "bgPos": null, - "bgPivotX": 0.5, - "bgPivotY": 0.5, - "__smartColor": "#FDEDE4", - "__bgPos": null, - "externalRelPath": "World/Level_1.ldtkl", - "fieldInstances": [ - { "__identifier": "Float", "__type": "Float", "__value": 0, "__tile": null, "defUid": 144, "realEditorValues": [null] }, - { "__identifier": "Tile", "__type": "Array", "__value": [ - { "tilesetUid": 1, "x": 80, "y": 48, "w": 16, "h": 16 }, - { "tilesetUid": 1, "x": 16, "y": 0, "w": 16, "h": 16 }, - { "tilesetUid": 1, "x": 48, "y": 48, "w": 16, "h": 16 } - ], "__tile": { "tilesetUid": 1, "x": 80, "y": 48, "w": 16, "h": 16 }, "defUid": 145, "realEditorValues": [ { - "id": "V_String", - "params": ["80,48,16,16"] - }, { - "id": "V_String", - "params": ["16,0,16,16"] - }, { - "id": "V_String", - "params": ["48,48,16,16"] - } ] }, - { "__identifier": "Multilines", "__type": "String", "__value": "test 1234\n1234", "__tile": null, "defUid": 146, "realEditorValues": [{ - "id": "V_String", - "params": ["test 1234\\n1234"] - }] } - ], - "layerInstances": null, - "__neighbours": [{ "levelIid": "2039c410-8dc0-11ec-a0e2-db95660971f6", "dir": "w" }] - }, - { - "identifier": "Level_0", - "iid": "2039c410-8dc0-11ec-a0e2-db95660971f6", - "uid": 108, - "worldX": 0, - "worldY": 0, - "worldDepth": 0, - "pxWid": 672, - "pxHei": 320, - "__bgColor": "#FCDFCD", - "bgColor": null, - "useAutoIdentifier": false, - "bgRelPath": null, - "bgPos": null, - "bgPivotX": 0.5, - "bgPivotY": 0.5, - "__smartColor": "#FDEDE4", - "__bgPos": null, - "externalRelPath": "World/Level_0.ldtkl", - "fieldInstances": [ - { "__identifier": "Float", "__type": "Float", "__value": 0, "__tile": null, "defUid": 144, "realEditorValues": [] }, - { "__identifier": "Tile", "__type": "Array", "__value": [], "__tile": null, "defUid": 145, "realEditorValues": [] }, - { "__identifier": "Multilines", "__type": "String", "__value": null, "__tile": null, "defUid": 146, "realEditorValues": [] } - ], - "layerInstances": null, - "__neighbours": [{ "levelIid": "2038b2a1-8dc0-11ec-a0e2-e5abc8178676", "dir": "e" }] - } - ] }], - "dummyWorldIid": "12773c30-ed50-11ed-ad68-b100668db9b7" -} \ No newline at end of file + "__header__": { + "fileType": "LDtk Project JSON", + "app": "LDtk", + "doc": "https://ldtk.io/json", + "schema": "https://ldtk.io/files/JSON_SCHEMA.json", + "appAuthor": "Sebastien 'deepnight' Benard", + "appVersion": "1.5.3", + "url": "https://ldtk.io" + }, + "iid": "a166a7b0-7820-11ed-bac1-7b0dea379c49", + "jsonVersion": "1.5.3", + "appBuildId": 473703, + "nextUid": 147, + "identifierStyle": "Capitalize", + "toc": [ ], + "worldLayout": null, + "worldGridWidth": null, + "worldGridHeight": null, + "defaultLevelWidth": null, + "defaultLevelHeight": null, + "defaultPivotX": 0, + "defaultPivotY": 0, + "defaultGridSize": 16, + "defaultEntityWidth": 16, + "defaultEntityHeight": 16, + "bgColor": "#FCDFCD", + "defaultLevelBgColor": "#FCDFCD", + "minifyJson": false, + "externalLevels": true, + "exportTiled": false, + "simplifiedExport": false, + "imageExportMode": "None", + "exportLevelBg": true, + "pngFilePattern": null, + "backupOnSave": false, + "backupLimit": 10, + "backupRelPath": null, + "levelNamePattern": "%world_Level_%idx", + "tutorialDesc": null, + "customCommands": [ { + "command": "ldtkgen -i World.ldtk -o ../LDtkTypes/ --LevelClassName CustomLevelDataName --PointAsVector2", + "when": "AfterSave" + } ], + "flags": [ "ExportOldTableOfContentData", "MultiWorlds" ], + "defs": { "layers": [ + { + "__type": "Entities", + "identifier": "Enemies", + "type": "Entities", + "uid": 99, + "doc": null, + "uiColor": null, + "gridSize": 16, + "guideGridWid": 0, + "guideGridHei": 0, + "displayOpacity": 1, + "inactiveOpacity": 0.6, + "hideInList": false, + "hideFieldsWhenInactive": true, + "canSelectWhenInactive": true, + "renderInWorldView": true, + "pxOffsetX": 0, + "pxOffsetY": 0, + "parallaxFactorX": 0, + "parallaxFactorY": 0, + "parallaxScaling": true, + "requiredTags": [ ], + "excludedTags": [ ], + "autoTilesKilledByOtherLayerUid": null, + "uiFilterTags": [ ], + "useAsyncRender": false, + "intGridValues": [ ], + "intGridValuesGroups": [ ], + "autoRuleGroups": [ ], + "autoSourceLayerDefUid": null, + "tilesetDefUid": null, + "tilePivotX": 0, + "tilePivotY": 0, + "biomeFieldUid": null + }, + { + "__type": "IntGrid", + "identifier": "Tiles", + "type": "IntGrid", + "uid": 54, + "doc": null, + "uiColor": null, + "gridSize": 16, + "guideGridWid": 0, + "guideGridHei": 0, + "displayOpacity": 1, + "inactiveOpacity": 1, + "hideInList": false, + "hideFieldsWhenInactive": true, + "canSelectWhenInactive": true, + "renderInWorldView": true, + "pxOffsetX": 0, + "pxOffsetY": 0, + "parallaxFactorX": 0, + "parallaxFactorY": 0, + "parallaxScaling": true, + "requiredTags": [ ], + "excludedTags": [ ], + "autoTilesKilledByOtherLayerUid": null, + "uiFilterTags": [ ], + "useAsyncRender": false, + "intGridValues": [ + { "value": 1, "identifier": "Mushroom", "color": "#FF0000", "tile": null, "groupUid": 0 }, + { "value": 2, "identifier": "Flower", "color": "#CF6A6A", "tile": null, "groupUid": 0 }, + { "value": 3, "identifier": "Grass", "color": "#45CA57", "tile": null, "groupUid": 0 }, + { "value": 4, "identifier": "Fence", "color": "#5A3C26", "tile": null, "groupUid": 0 }, + { "value": 5, "identifier": "Tree", "color": "#47AF28", "tile": null, "groupUid": 0 }, + { "value": 6, "identifier": "Ground", "color": "#0034FF", "tile": null, "groupUid": 0 }, + { "value": 7, "identifier": "Left_Ground", "color": "#8200FF", "tile": null, "groupUid": 0 } + ], + "intGridValuesGroups": [ ], + "autoRuleGroups": [ + { + "uid": 65, + "name": "Ground", + "color": null, + "icon": null, + "active": true, + "isOptional": false, + "rules": [ + { + "uid": 73, + "active": true, + "size": 3, + "tileRectsIds": [ [ 9 ] ], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [ 0, -6, 0, -6, 6, -6, 0, -6, 0 ], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": 0, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 9804454, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 74, + "active": true, + "size": 3, + "tileRectsIds": [ [ 22 ] ], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [ 0, -6, 0, -6, 6, -6, 0, 6, 0 ], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": 0, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 5650102, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 69, + "active": true, + "size": 3, + "tileRectsIds": [ [ 3 ], [ 6 ] ], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [ 0, -6, 0, -6, 6, 6, 0, 6, 0 ], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": 0, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 514098, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 93, + "active": true, + "size": 3, + "tileRectsIds": [ [ 3 ], [ 6 ] ], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [ 0, -6, 0, -6, 6, 6, 0, 7, 0 ], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": 0, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 514098, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 72, + "active": true, + "size": 3, + "tileRectsIds": [ [ 5 ], [ 8 ] ], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [ 0, -6, 0, 6, 6, -6, 0, 6, 0 ], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": 0, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 514098, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 70, + "active": true, + "size": 3, + "tileRectsIds": [ [ 34 ] ], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [ 0, -1000001, 0, 6, 6, -6, 0, -6, 0 ], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": 0, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 514098, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 71, + "active": true, + "size": 3, + "tileRectsIds": [ [ 33 ] ], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [ 0, -6, 0, -6, 6, 6, 0, -6, 0 ], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": 0, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 514098, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 81, + "active": true, + "size": 3, + "tileRectsIds": [ [ 29 ], [ 31 ] ], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [ -6, 6, 0, 6, 6, 0, 0, 0, 0 ], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": 0, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 8589087, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 121, + "active": true, + "size": 3, + "tileRectsIds": [ [ 29 ], [ 31 ] ], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [ -6, 7, 0, 6, 6, 0, 0, 0, 0 ], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": 0, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 8589087, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 82, + "active": true, + "size": 3, + "tileRectsIds": [ [ 30 ], [ 32 ] ], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [ 0, 6, -6, 0, 6, 6, 0, 0, 0 ], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": null, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 583018, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 122, + "active": true, + "size": 3, + "tileRectsIds": [ [ 16 ] ], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [ 0, 0, 0, 0, 7, 0, 0, 6, 0 ], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": null, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 890380, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 97, + "active": true, + "size": 3, + "tileRectsIds": [ [ 21 ] ], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [ 0, 6, 0, 0, 6, 0, 0, -6, 0 ], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": null, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 1655032, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 96, + "active": true, + "size": 3, + "tileRectsIds": [ [ 18 ] ], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [ 0, 0, 0, 0, 6, 0, 0, 6, 0 ], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": null, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 890380, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 95, + "active": true, + "size": 3, + "tileRectsIds": [ [ 19 ] ], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [ 0, 0, 0, 0, 7, 0, 0, -7, 0 ], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": null, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 1655032, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 92, + "active": true, + "size": 3, + "tileRectsIds": [ [ 16 ] ], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [ 0, 0, 0, 0, 7, 0, 0, 7, 0 ], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": null, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 890380, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 87, + "active": true, + "size": 3, + "tileRectsIds": [ [ 28 ] ], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [ 0, 5, 0, 6, 6, 6, 0, 0, 0 ], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": null, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 1847569, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 91, + "active": true, + "size": 1, + "tileRectsIds": [ [ 4 ], [ 7 ] ], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [ 6 ], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": null, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 1847569, + "perlinScale": 0.2, + "perlinOctaves": 2 + } + ], + "usesWizard": false, + "requiredBiomeValues": [ ], + "biomeRequirementMode": 0 + }, + { + "uid": 76, + "name": "Trees", + "color": null, + "icon": null, + "active": true, + "isOptional": false, + "rules": [ + { + "uid": 80, + "active": true, + "size": 3, + "tileRectsIds": [ [ 10 ] ], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [ 0, -5, 0, 0, 5, 0, 0, 5, 0 ], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": null, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 3193271, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 78, + "active": true, + "size": 3, + "tileRectsIds": [ [ 36 ], [ 37 ], [ 38 ] ], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [ 0, 5, 0, 0, 5, 0, 0, -5, 0 ], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": null, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 1781631, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 79, + "active": true, + "size": 1, + "tileRectsIds": [ [ 23 ] ], + "alpha": 1, + "chance": 0.52, + "breakOnMatch": true, + "pattern": [ 5 ], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": null, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 8665533, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 77, + "active": true, + "size": 1, + "tileRectsIds": [ [ 11 ], [ 24 ], [ 25 ] ], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [ 5 ], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": null, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 8406507, + "perlinScale": 0.2, + "perlinOctaves": 2 + } + ], + "usesWizard": false, + "requiredBiomeValues": [ ], + "biomeRequirementMode": 0 + }, + { + "uid": 57, + "name": "Decorations", + "color": null, + "icon": null, + "active": true, + "isOptional": false, + "rules": [ + { + "uid": 62, + "active": true, + "size": 1, + "tileRectsIds": [ [ 45 ], [ 46 ] ], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [ 4 ], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": null, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 8350014, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 60, + "active": true, + "size": 1, + "tileRectsIds": [ [ 43 ], [ 44 ] ], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [ 3 ], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": null, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 3554302, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 59, + "active": true, + "size": 1, + "tileRectsIds": [ [ 41 ], [ 42 ] ], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [ 2 ], + "flipX": false, + "flipY": false, + "xModulo": 2, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": null, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 8822998, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 109, + "active": true, + "size": 1, + "tileRectsIds": [ [ 42 ] ], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [ 2 ], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": null, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 8822998, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 58, + "active": true, + "size": 1, + "tileRectsIds": [ [ 39 ], [ 40 ] ], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [ 1 ], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": null, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 9225721, + "perlinScale": 0.2, + "perlinOctaves": 2 + } + ], + "usesWizard": false, + "requiredBiomeValues": [ ], + "biomeRequirementMode": 0 + }, + { + "uid": 67, + "name": "Clouds", + "color": null, + "icon": null, + "active": true, + "isOptional": false, + "rules": [ + { + "uid": 68, + "active": true, + "size": 1, + "tileRectsIds": [ [ 14 ], [ 15 ] ], + "alpha": 1, + "chance": 0.22, + "breakOnMatch": true, + "pattern": [ 0 ], + "flipX": false, + "flipY": false, + "xModulo": 2, + "yModulo": 2, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "Horizontal", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": null, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 4732725, + "perlinScale": 0.2, + "perlinOctaves": 2 + } + ], + "usesWizard": false, + "requiredBiomeValues": [ ], + "biomeRequirementMode": 0 + } + ], + "autoSourceLayerDefUid": null, + "tilesetDefUid": 1, + "tilePivotX": 0, + "tilePivotY": 0, + "biomeFieldUid": null + } + ], "entities": [ + { + "identifier": "Enemy", + "uid": 98, + "tags": [ ], + "exportToToc": false, + "allowOutOfBounds": false, + "doc": null, + "width": 16, + "height": 16, + "resizableX": false, + "resizableY": false, + "minWidth": null, + "maxWidth": null, + "minHeight": null, + "maxHeight": null, + "keepAspectRatio": false, + "tileOpacity": 1, + "fillOpacity": 0.08, + "lineOpacity": 0, + "hollow": false, + "color": "#FF6B19", + "renderMode": "Tile", + "showName": false, + "tilesetId": 2, + "tileRenderMode": "FitInside", + "tileRect": { "tilesetUid": 2, "x": 16, "y": 16, "w": 16, "h": 16 }, + "uiTileRect": null, + "nineSliceBorders": [ ], + "maxCount": 0, + "limitScope": "PerLevel", + "limitBehavior": "MoveLastOne", + "pivotX": 0.5, + "pivotY": 0.5, + "fieldDefs": [ + { + "identifier": "Wander", + "doc": null, + "__type": "Array", + "uid": 100, + "type": "F_Point", + "isArray": true, + "canBeNull": false, + "arrayMinLength": null, + "arrayMaxLength": null, + "editorDisplayMode": "PointPathLoop", + "editorDisplayScale": 1, + "editorDisplayPos": "Above", + "editorLinkStyle": "StraightArrow", + "editorDisplayColor": null, + "editorAlwaysShow": false, + "editorShowInWorld": true, + "editorCutLongValues": true, + "editorTextSuffix": null, + "editorTextPrefix": null, + "useForSmartColor": false, + "exportToToc": false, + "searchable": false, + "min": null, + "max": null, + "regex": null, + "acceptFileTypes": null, + "defaultOverride": null, + "textLanguageMode": null, + "symmetricalRef": false, + "autoChainRef": true, + "allowOutOfLevelRef": true, + "allowedRefs": "OnlySame", + "allowedRefsEntityUid": null, + "allowedRefTags": [ ], + "tilesetUid": null + }, + { + "identifier": "Type", + "doc": null, + "__type": "LocalEnum.EnemyType", + "uid": 119, + "type": "F_Enum(118)", + "isArray": false, + "canBeNull": false, + "arrayMinLength": null, + "arrayMaxLength": null, + "editorDisplayMode": "EntityTile", + "editorDisplayScale": 1, + "editorDisplayPos": "Above", + "editorLinkStyle": "StraightArrow", + "editorDisplayColor": null, + "editorAlwaysShow": false, + "editorShowInWorld": true, + "editorCutLongValues": true, + "editorTextSuffix": null, + "editorTextPrefix": null, + "useForSmartColor": false, + "exportToToc": false, + "searchable": false, + "min": null, + "max": null, + "regex": null, + "acceptFileTypes": null, + "defaultOverride": null, + "textLanguageMode": null, + "symmetricalRef": false, + "autoChainRef": true, + "allowOutOfLevelRef": true, + "allowedRefs": "OnlySame", + "allowedRefsEntityUid": null, + "allowedRefTags": [ ], + "tilesetUid": null + }, + { + "identifier": "Color", + "doc": null, + "__type": "Color", + "uid": 143, + "type": "F_Color", + "isArray": false, + "canBeNull": false, + "arrayMinLength": null, + "arrayMaxLength": null, + "editorDisplayMode": "Hidden", + "editorDisplayScale": 1, + "editorDisplayPos": "Above", + "editorLinkStyle": "StraightArrow", + "editorDisplayColor": null, + "editorAlwaysShow": false, + "editorShowInWorld": true, + "editorCutLongValues": true, + "editorTextSuffix": null, + "editorTextPrefix": null, + "useForSmartColor": true, + "exportToToc": false, + "searchable": false, + "min": null, + "max": null, + "regex": null, + "acceptFileTypes": null, + "defaultOverride": { "id": "V_Int", "params": [ 10899536 ] }, + "textLanguageMode": null, + "symmetricalRef": false, + "autoChainRef": true, + "allowOutOfLevelRef": true, + "allowedRefs": "OnlySame", + "allowedRefsEntityUid": null, + "allowedRefTags": [ ], + "tilesetUid": null + } + ] + }, + { + "identifier": "Gun_Pickup", + "uid": 107, + "tags": [ ], + "exportToToc": false, + "allowOutOfBounds": false, + "doc": null, + "width": 16, + "height": 16, + "resizableX": false, + "resizableY": false, + "minWidth": null, + "maxWidth": null, + "minHeight": null, + "maxHeight": null, + "keepAspectRatio": false, + "tileOpacity": 1, + "fillOpacity": 0.08, + "lineOpacity": 0, + "hollow": false, + "color": "#4BE060", + "renderMode": "Tile", + "showName": false, + "tilesetId": 2, + "tileRenderMode": "FitInside", + "tileRect": { "tilesetUid": 2, "x": 0, "y": 16, "w": 16, "h": 16 }, + "uiTileRect": null, + "nineSliceBorders": [ ], + "maxCount": 0, + "limitScope": "PerLevel", + "limitBehavior": "MoveLastOne", + "pivotX": 0.5, + "pivotY": 1, + "fieldDefs": [ ] + }, + { + "identifier": "Player", + "uid": 120, + "tags": [ ], + "exportToToc": false, + "allowOutOfBounds": false, + "doc": null, + "width": 16, + "height": 16, + "resizableX": false, + "resizableY": false, + "minWidth": null, + "maxWidth": null, + "minHeight": null, + "maxHeight": null, + "keepAspectRatio": false, + "tileOpacity": 1, + "fillOpacity": 0.08, + "lineOpacity": 0, + "hollow": false, + "color": "#94D9B3", + "renderMode": "Tile", + "showName": false, + "tilesetId": 2, + "tileRenderMode": "FitInside", + "tileRect": { "tilesetUid": 2, "x": 80, "y": 0, "w": 16, "h": 16 }, + "uiTileRect": null, + "nineSliceBorders": [ ], + "maxCount": 1, + "limitScope": "PerWorld", + "limitBehavior": "PreventAdding", + "pivotX": 0.5, + "pivotY": 0.5, + "fieldDefs": [ ] + }, + { + "identifier": "RefTest", + "uid": 123, + "tags": [ ], + "exportToToc": false, + "allowOutOfBounds": false, + "doc": null, + "width": 16, + "height": 16, + "resizableX": false, + "resizableY": false, + "minWidth": null, + "maxWidth": null, + "minHeight": null, + "maxHeight": null, + "keepAspectRatio": false, + "tileOpacity": 1, + "fillOpacity": 0.08, + "lineOpacity": 0, + "hollow": false, + "color": "#94D9B3", + "renderMode": "Tile", + "showName": true, + "tilesetId": 1, + "tileRenderMode": "FitInside", + "tileRect": { "tilesetUid": 1, "x": 16, "y": 48, "w": 16, "h": 16 }, + "uiTileRect": null, + "nineSliceBorders": [ ], + "maxCount": 0, + "limitScope": "PerLevel", + "limitBehavior": "MoveLastOne", + "pivotX": 0, + "pivotY": 0, + "fieldDefs": [ + { + "identifier": "Test", + "doc": null, + "__type": "EntityRef", + "uid": 124, + "type": "F_EntityRef", + "isArray": false, + "canBeNull": true, + "arrayMinLength": null, + "arrayMaxLength": null, + "editorDisplayMode": "RefLinkBetweenCenters", + "editorDisplayScale": 1, + "editorDisplayPos": "Above", + "editorLinkStyle": "CurvedArrow", + "editorDisplayColor": null, + "editorAlwaysShow": false, + "editorShowInWorld": true, + "editorCutLongValues": true, + "editorTextSuffix": null, + "editorTextPrefix": null, + "useForSmartColor": false, + "exportToToc": false, + "searchable": false, + "min": null, + "max": null, + "regex": null, + "acceptFileTypes": null, + "defaultOverride": null, + "textLanguageMode": null, + "symmetricalRef": false, + "autoChainRef": true, + "allowOutOfLevelRef": true, + "allowedRefs": "OnlySame", + "allowedRefsEntityUid": null, + "allowedRefTags": [ ], + "tilesetUid": null + }, + { + "identifier": "TileTest", + "doc": null, + "__type": "Tile", + "uid": 140, + "type": "F_Tile", + "isArray": false, + "canBeNull": true, + "arrayMinLength": null, + "arrayMaxLength": null, + "editorDisplayMode": "ValueOnly", + "editorDisplayScale": 1, + "editorDisplayPos": "Above", + "editorLinkStyle": "StraightArrow", + "editorDisplayColor": null, + "editorAlwaysShow": false, + "editorShowInWorld": true, + "editorCutLongValues": true, + "editorTextSuffix": null, + "editorTextPrefix": null, + "useForSmartColor": false, + "exportToToc": false, + "searchable": false, + "min": null, + "max": null, + "regex": null, + "acceptFileTypes": null, + "defaultOverride": { + "id": "V_String", + "params": [ "112,32,16,16" ] + }, + "textLanguageMode": null, + "symmetricalRef": false, + "autoChainRef": true, + "allowOutOfLevelRef": true, + "allowedRefs": "OnlySame", + "allowedRefsEntityUid": null, + "allowedRefTags": [ ], + "tilesetUid": 1 + }, + { + "identifier": "Float", + "doc": null, + "__type": "Float", + "uid": 141, + "type": "F_Float", + "isArray": false, + "canBeNull": true, + "arrayMinLength": null, + "arrayMaxLength": null, + "editorDisplayMode": "Hidden", + "editorDisplayScale": 1, + "editorDisplayPos": "Above", + "editorLinkStyle": "StraightArrow", + "editorDisplayColor": null, + "editorAlwaysShow": false, + "editorShowInWorld": true, + "editorCutLongValues": true, + "editorTextSuffix": null, + "editorTextPrefix": null, + "useForSmartColor": false, + "exportToToc": false, + "searchable": false, + "min": null, + "max": null, + "regex": null, + "acceptFileTypes": null, + "defaultOverride": null, + "textLanguageMode": null, + "symmetricalRef": false, + "autoChainRef": true, + "allowOutOfLevelRef": true, + "allowedRefs": "OnlySame", + "allowedRefsEntityUid": null, + "allowedRefTags": [ ], + "tilesetUid": null + }, + { + "identifier": "EnemyType", + "doc": null, + "__type": "LocalEnum.EnemyType", + "uid": 142, + "type": "F_Enum(118)", + "isArray": false, + "canBeNull": true, + "arrayMinLength": null, + "arrayMaxLength": null, + "editorDisplayMode": "Hidden", + "editorDisplayScale": 1, + "editorDisplayPos": "Above", + "editorLinkStyle": "StraightArrow", + "editorDisplayColor": null, + "editorAlwaysShow": false, + "editorShowInWorld": true, + "editorCutLongValues": true, + "editorTextSuffix": null, + "editorTextPrefix": null, + "useForSmartColor": false, + "exportToToc": false, + "searchable": false, + "min": null, + "max": null, + "regex": null, + "acceptFileTypes": null, + "defaultOverride": null, + "textLanguageMode": null, + "symmetricalRef": false, + "autoChainRef": true, + "allowOutOfLevelRef": true, + "allowedRefs": "OnlySame", + "allowedRefsEntityUid": null, + "allowedRefTags": [ ], + "tilesetUid": null + } + ] + } + ], "tilesets": [ + { + "__cWid": 13, + "__cHei": 4, + "identifier": "Tilemap", + "uid": 1, + "relPath": "Atlas/Tilemap.png", + "embedAtlas": null, + "pxWid": 208, + "pxHei": 64, + "tileGridSize": 16, + "spacing": 0, + "padding": 0, + "tags": [ ], + "tagsSourceEnumUid": null, + "enumTags": [ ], + "customData": [ ], + "savedSelections": [ ], + "cachedPixelData": { + "opaqueTiles": "0000000000000000000000000000000000000000000000000000", + "averageColors": "00003fed2fed5bc54cb65bc55bc54cb65bc55bc5bbc48cb600000bd42fed4fed2bc300002bc31bc300001bc36bc52da85cb65cb64cb65cb65cb61cb61cb61cb71cb74bc54bc53bc33ca76cb66cb63ea82ea96d743e7439b228a15da84da800000000000000000000" + } + }, + { + "__cWid": 7, + "__cHei": 2, + "identifier": "Characters", + "uid": 2, + "relPath": "Characters.png", + "embedAtlas": null, + "pxWid": 112, + "pxHei": 32, + "tileGridSize": 16, + "spacing": 0, + "padding": 0, + "tags": [ ], + "tagsSourceEnumUid": null, + "enumTags": [ ], + "customData": [ ], + "savedSelections": [ ], + "cachedPixelData": { "opaqueTiles": "00000000000000", "averageColors": "77ac77ac67ac2fc54fc763be72be2c544ec93db747bd46bd3e533e54" } + } + ], "enums": [ { "identifier": "EnemyType", "uid": 118, "values": [ + { "id": "YellowBee", "tileRect": { "tilesetUid": 2, "x": 16, "y": 16, "w": 16, "h": 16 }, "color": 15649945 }, + { "id": "BlueBee", "tileRect": { "tilesetUid": 2, "x": 48, "y": 16, "w": 16, "h": 16 }, "color": 7846877 }, + { "id": "Slug", "tileRect": { "tilesetUid": 2, "x": 80, "y": 16, "w": 16, "h": 16 }, "color": 15619379 } + ], "iconTilesetUid": 2, "externalRelPath": null, "externalFileChecksum": null, "tags": [ ] } ], "externalEnums": [ ], "levelFields": [ + { + "identifier": "Float", + "doc": null, + "__type": "Float", + "uid": 144, + "type": "F_Float", + "isArray": false, + "canBeNull": false, + "arrayMinLength": null, + "arrayMaxLength": null, + "editorDisplayMode": "Hidden", + "editorDisplayScale": 1, + "editorDisplayPos": "Above", + "editorLinkStyle": "StraightArrow", + "editorDisplayColor": null, + "editorAlwaysShow": false, + "editorShowInWorld": true, + "editorCutLongValues": true, + "editorTextSuffix": null, + "editorTextPrefix": null, + "useForSmartColor": false, + "exportToToc": false, + "searchable": false, + "min": null, + "max": null, + "regex": null, + "acceptFileTypes": null, + "defaultOverride": null, + "textLanguageMode": null, + "symmetricalRef": false, + "autoChainRef": true, + "allowOutOfLevelRef": true, + "allowedRefs": "OnlySame", + "allowedRefsEntityUid": null, + "allowedRefTags": [ ], + "tilesetUid": null + }, + { + "identifier": "Tile", + "doc": null, + "__type": "Array", + "uid": 145, + "type": "F_Tile", + "isArray": true, + "canBeNull": false, + "arrayMinLength": null, + "arrayMaxLength": null, + "editorDisplayMode": "EntityTile", + "editorDisplayScale": 1, + "editorDisplayPos": "Above", + "editorLinkStyle": "StraightArrow", + "editorDisplayColor": null, + "editorAlwaysShow": false, + "editorShowInWorld": true, + "editorCutLongValues": true, + "editorTextSuffix": null, + "editorTextPrefix": null, + "useForSmartColor": false, + "exportToToc": false, + "searchable": false, + "min": null, + "max": null, + "regex": null, + "acceptFileTypes": null, + "defaultOverride": null, + "textLanguageMode": null, + "symmetricalRef": false, + "autoChainRef": true, + "allowOutOfLevelRef": true, + "allowedRefs": "OnlySame", + "allowedRefsEntityUid": null, + "allowedRefTags": [ ], + "tilesetUid": 1 + }, + { + "identifier": "Multilines", + "doc": null, + "__type": "String", + "uid": 146, + "type": "F_Text", + "isArray": false, + "canBeNull": true, + "arrayMinLength": null, + "arrayMaxLength": null, + "editorDisplayMode": "Hidden", + "editorDisplayScale": 1, + "editorDisplayPos": "Above", + "editorLinkStyle": "StraightArrow", + "editorDisplayColor": null, + "editorAlwaysShow": false, + "editorShowInWorld": true, + "editorCutLongValues": true, + "editorTextSuffix": null, + "editorTextPrefix": null, + "useForSmartColor": false, + "exportToToc": false, + "searchable": false, + "min": null, + "max": null, + "regex": null, + "acceptFileTypes": null, + "defaultOverride": null, + "textLanguageMode": null, + "symmetricalRef": false, + "autoChainRef": true, + "allowOutOfLevelRef": true, + "allowedRefs": "OnlySame", + "allowedRefsEntityUid": null, + "allowedRefTags": [ ], + "tilesetUid": null + } + ] }, + "levels": [ ], + "worlds": [ { "iid": "2c81d720-b4d0-11ec-9871-056972512958", "identifier": "World", "defaultLevelWidth": 256, "defaultLevelHeight": 256, "worldGridWidth": 32, "worldGridHeight": 32, "worldLayout": "GridVania", "levels": [ + { + "identifier": "Level_1", + "iid": "2038b2a1-8dc0-11ec-a0e2-e5abc8178676", + "uid": 0, + "worldX": 672, + "worldY": 0, + "worldDepth": 0, + "pxWid": 384, + "pxHei": 320, + "__bgColor": "#FCDFCD", + "bgColor": null, + "useAutoIdentifier": false, + "bgRelPath": null, + "bgPos": null, + "bgPivotX": 0.5, + "bgPivotY": 0.5, + "__smartColor": "#FDEDE4", + "__bgPos": null, + "externalRelPath": "World/Level_1.ldtkl", + "fieldInstances": [ + { "__identifier": "Float", "__type": "Float", "__value": 0, "__tile": null, "defUid": 144, "realEditorValues": [ null ] }, + { "__identifier": "Tile", "__type": "Array", "__value": [ + { "tilesetUid": 1, "x": 80, "y": 48, "w": 16, "h": 16 }, + { "tilesetUid": 1, "x": 16, "y": 0, "w": 16, "h": 16 }, + { "tilesetUid": 1, "x": 48, "y": 48, "w": 16, "h": 16 } + ], "__tile": { "tilesetUid": 1, "x": 80, "y": 48, "w": 16, "h": 16 }, "defUid": 145, "realEditorValues": [ { + "id": "V_String", + "params": [ "80,48,16,16" ] + }, { + "id": "V_String", + "params": [ "16,0,16,16" ] + }, { + "id": "V_String", + "params": [ "48,48,16,16" ] + } ] }, + { "__identifier": "Multilines", "__type": "String", "__value": "test 1234\n1234", "__tile": null, "defUid": 146, "realEditorValues": [ { + "id": "V_String", + "params": [ "test 1234\\n1234" ] + } ] } + ], + "layerInstances": null, + "__neighbours": [ { "levelIid": "2039c410-8dc0-11ec-a0e2-db95660971f6", "dir": "w" } ] + }, + { + "identifier": "Level_0", + "iid": "2039c410-8dc0-11ec-a0e2-db95660971f6", + "uid": 108, + "worldX": 0, + "worldY": 0, + "worldDepth": 0, + "pxWid": 672, + "pxHei": 320, + "__bgColor": "#FCDFCD", + "bgColor": null, + "useAutoIdentifier": false, + "bgRelPath": null, + "bgPos": null, + "bgPivotX": 0.5, + "bgPivotY": 0.5, + "__smartColor": "#FDEDE4", + "__bgPos": null, + "externalRelPath": "World/Level_0.ldtkl", + "fieldInstances": [ + { "__identifier": "Float", "__type": "Float", "__value": 0, "__tile": null, "defUid": 144, "realEditorValues": [ ] }, + { "__identifier": "Tile", "__type": "Array", "__value": [ ], "__tile": null, "defUid": 145, "realEditorValues": [ ] }, + { "__identifier": "Multilines", "__type": "String", "__value": null, "__tile": null, "defUid": 146, "realEditorValues": [ ] } + ], + "layerInstances": null, + "__neighbours": [ { "levelIid": "2038b2a1-8dc0-11ec-a0e2-e5abc8178676", "dir": "e" } ] + } + ] } ], + "dummyWorldIid": "12773c30-ed50-11ed-ad68-b100668db9b7" +} diff --git a/LDtk.Example/LDtk.Example.csproj b/LDtk.Example/LDtk.Example.csproj index ceecc122..0efe853f 100644 --- a/LDtk.Example/LDtk.Example.csproj +++ b/LDtk.Example/LDtk.Example.csproj @@ -20,6 +20,10 @@ --> + + + + diff --git a/LDtk.JsonSchema/Program.cs b/LDtk.JsonSchema/Program.cs index c1e52cc0..c7a6e634 100644 --- a/LDtk.JsonSchema/Program.cs +++ b/LDtk.JsonSchema/Program.cs @@ -99,7 +99,7 @@ public static async Task Main() "LevelFields", }; - ParseJson(json, "LDtk", "../LDtk/LDtkJson.cs", ignoreClasses, ignoreFields); + ParseJson(json, "LDtk", "LDtkFile", "../LDtk/LDtkJson.cs", ignoreClasses, ignoreFields); if (!File.Exists("FullSchema.json")) { @@ -110,12 +110,12 @@ public static async Task Main() { json = File.ReadAllText("FullSchema.json"); } - ParseJson(json, "LDtk.Codegen", "../LDtk.Codegen/LDtkJsonFull.cs", [], ["__FORCED_REFS"]); + ParseJson(json, "LDtk.Full", "LDtkFileFull", "../LDtk/Full/LDtkJsonFull.cs", [], ["__FORCED_REFS"]); return 0; } - static void ParseJson(string json, string ns, string output, string[] ignoreClasses, string[] ignoreFields) + static void ParseJson(string json, string ns, string className, string output, string[] ignoreClasses, string[] ignoreFields) { using StreamWriter file = new(output); @@ -134,7 +134,7 @@ static void ParseJson(string json, string ns, string output, string[] ignoreClas file.WriteLine(string.Join(Environment.NewLine, Namespaces)); file.WriteLine(); - CreateClass("LDtkFile", rootClass, file, ignoreFields); + CreateClass(className, rootClass, file, ignoreFields); foreach ((string key, JsonNode type) in root["otherTypes"].AsObject().OrderBy(x => ToCSharpName(x.Key).TrimStart('_'))) { @@ -402,6 +402,7 @@ static string ParseDocComment(string doc) { string documentation = doc .Replace(" the the ", " the ")// Temp Fix already fixed for next update + .Replace(" & ", " & ") .Replace("<...>", "<...>") .Replace("", "<Int>") .Replace("", "<Point>") diff --git a/LDtk/Constants.cs b/LDtk/Constants.cs index a6d9d8f4..96b28df7 100644 --- a/LDtk/Constants.cs +++ b/LDtk/Constants.cs @@ -3,6 +3,7 @@ namespace LDtk; using System.Text.Json; using System.Text.Json.Serialization; +using LDtk.Full; using LDtk.Parsers; /// General Constants used in LDtkMonogame. @@ -30,4 +31,24 @@ public static class Constants /// The converter used internally with JsonSerializer.Deserialize(..., Constants.SerializeOptions) not needed by the user just use .FromFile instead. public static readonly LDtkJsonSourceGenerator JsonSourceGenerator = new(SerializeOptions); + + /// The converter used internally by LDtkFileFull with JsonSerializer.Deserialize(..., Constants.SerializeOptionsFull) not needed by the user just use .FromFile instead. + public static readonly JsonSerializerOptions SerializeOptionsFull = new() + { + Converters = + { + new JsonStringEnumConverter(), + new RectangleConverter(), + new Vector2Converter(), + new ColorConverter(), + new PointConverter(), + new GuidConverter(), + }, + DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, + ReadCommentHandling = JsonCommentHandling.Skip, + AllowTrailingCommas = true, + }; + + /// The converter used internally by LDtkFileFull with JsonSerializer.Deserialize(..., Constants.SerializeOptions) not needed by the user just use .FromFile instead. + public static readonly LDtkJsonFullSourceGenerator JsonSourceGeneratorFull = new(SerializeOptionsFull); } diff --git a/LDtk/Full/LDtkJsonFull.Partial.cs b/LDtk/Full/LDtkJsonFull.Partial.cs new file mode 100644 index 00000000..63c2e628 --- /dev/null +++ b/LDtk/Full/LDtkJsonFull.Partial.cs @@ -0,0 +1,48 @@ +namespace LDtk.Full; + +using System; +using System.IO; +using System.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; + +public partial class LDtkFileFull +{ + /// Gets or sets the absolute path to the ldtkFile. + [JsonIgnore] + public string FilePath { get; set; } = string.Empty; + + + /// Loads the ldtk world file from disk directly using json source generator. + /// Path to the .ldtk file. + /// Returns the file loaded from the path. + public static LDtkFileFull FromFile(string filePath) + { + LDtkFileFull? file = JsonSerializer.Deserialize(File.ReadAllText(filePath), Constants.JsonSourceGeneratorFull.LDtkFileFull); + if (file == null) + { + throw new LDtkException($"Failed to Deserialize ldtk file from {filePath}"); + } + ValidateFile(file); + file.FilePath = Path.GetFullPath(filePath); + return file; + } + + static void ValidateFile(LDtkFileFull file) + { + if (Version.Parse(file.JsonVersion) < Version.Parse(Constants.SupportedLDtkVersion)) + { + throw new LDtkException("LDtk file version is not supported. Please update your LDtk version."); + } + + if (file.Flags == null) + { + throw new LDtkException("LDtk file is missing required flags. Please enable them in the ldtk file flags in the UI."); + } + + if (!file.Flags.Contains(Flag.MultiWorlds)) + { + throw new LDtkException("LDtk file is not a multiworld file. Please enable MultiWorlds in the ldtk file flags."); + } + } +} diff --git a/LDtk.Codegen/LDtkJsonFull.cs b/LDtk/Full/LDtkJsonFull.cs similarity index 99% rename from LDtk.Codegen/LDtkJsonFull.cs rename to LDtk/Full/LDtkJsonFull.cs index 4cc8af84..ef88c8f3 100644 --- a/LDtk.Codegen/LDtkJsonFull.cs +++ b/LDtk/Full/LDtkJsonFull.cs @@ -1,4 +1,4 @@ -namespace LDtk.Codegen; +namespace LDtk.Full; #nullable disable #pragma warning disable CS8618, CS1591, CS8632, IDE1006 @@ -6,13 +6,13 @@ namespace LDtk.Codegen; // LDtk 1.5.3 using System; -using System.Text.Json.Serialization; using System.Text.Json; +using System.Text.Json.Serialization; using Microsoft.Xna.Framework; /// This is the root of any Project JSON file. It contains: - the project settings, - an array of levels, - a group of definitions (that can probably be safely ignored for most users). -public partial class LDtkFile +public partial class LDtkFileFull { /// LDtk application build identifier.
This is only used to identify the LDtk version that generated this particular project file, which can be useful for specific bug fixing. Note that the build identifier is just the date of the release, so it's not unique to each user (one single global ID per LDtk public release), and as a result, completely anonymous.
[JsonPropertyName("appBuildId")] @@ -32,7 +32,7 @@ public partial class LDtkFile /// Project background color [JsonPropertyName("bgColor")] - public Color BgColor { get; set; } + public string BgColor { get; set; } /// An array of command lines that can be ran manually by the user [JsonPropertyName("customCommands")] @@ -138,7 +138,7 @@ public partial class LDtkFile [JsonPropertyName("pngFilePattern")] public string? PngFilePattern { get; set; } - /// If TRUE, a very simplified will be generated on saving, for quicker & easier engine integration. + /// If TRUE, a very simplified will be generated on saving, for quicker & easier engine integration. [JsonPropertyName("simplifiedExport")] public bool SimplifiedExport { get; set; } @@ -282,7 +282,7 @@ public partial class AutoRuleDef [JsonPropertyName("pivotY")] public float PivotY { get; set; } - /// Pattern width & height. Should only be 1,3,5 or 7. + /// Pattern width & height. Should only be 1,3,5 or 7. [JsonPropertyName("size")] public int Size { get; set; } diff --git a/LDtk/Full/LDtkJsonFullSourceGenerator.cs b/LDtk/Full/LDtkJsonFullSourceGenerator.cs new file mode 100644 index 00000000..2d7e193a --- /dev/null +++ b/LDtk/Full/LDtkJsonFullSourceGenerator.cs @@ -0,0 +1,30 @@ +namespace LDtk.Full; + +using System.Text.Json; +using System.Text.Json.Serialization; + +using Microsoft.Xna.Framework; + +/// The json source generator for LDtk files. +[JsonSourceGenerationOptions(GenerationMode = JsonSourceGenerationMode.Metadata)] +[JsonSerializable(typeof(JsonElement))] +[JsonSerializable(typeof(bool))] +[JsonSerializable(typeof(bool[]))] +[JsonSerializable(typeof(float))] +[JsonSerializable(typeof(float[]))] +[JsonSerializable(typeof(int))] +[JsonSerializable(typeof(int[]))] +[JsonSerializable(typeof(string))] +[JsonSerializable(typeof(string[]))] +[JsonSerializable(typeof(Color))] +[JsonSerializable(typeof(Color[]))] +[JsonSerializable(typeof(Point))] +[JsonSerializable(typeof(Point[]))] +[JsonSerializable(typeof(Vector2))] +[JsonSerializable(typeof(Vector2[]))] +[JsonSerializable(typeof(EntityReference))] +[JsonSerializable(typeof(EntityReference[]))] +[JsonSerializable(typeof(TilesetRectangle))] +[JsonSerializable(typeof(TilesetRectangle[]))] +[JsonSerializable(typeof(LDtkFileFull))] +public partial class LDtkJsonFullSourceGenerator : JsonSerializerContext; diff --git a/LDtk/JsonPartials/LDtkFile.cs b/LDtk/JsonPartials/LDtkFile.cs index 785d3bc5..296b9b0a 100644 --- a/LDtk/JsonPartials/LDtkFile.cs +++ b/LDtk/JsonPartials/LDtkFile.cs @@ -23,9 +23,9 @@ public LDtkFile() { } [JsonIgnore] public ContentManager? Content { get; set; } - /// An array containing various advanced flags (ie. options or other states). + /// An array containing various advanced flags (ie. options or other states). Possible values: DiscardPreCsvIntGrid, ExportOldTableOfContentData, ExportPreCsvIntGridFormat, IgnoreBackupSuggest, PrependIndexToLevelFileNames, MultiWorlds, UseMultilinesType [JsonPropertyName("flags")] - public string[]? Flags { get; set; } + public Flag[]? Flags { get; set; } /// Loads the ldtk world file from disk directly using json source generator. /// Path to the .ldtk file. @@ -82,7 +82,7 @@ static void ValidateFile(LDtkFile file) throw new LDtkException("LDtk file is missing required flags. Please enable them in the ldtk file flags in the UI."); } - if (!file.Flags.Contains("MultiWorlds")) + if (!file.Flags.Contains(Flag.MultiWorlds)) { throw new LDtkException("LDtk file is not a multiworld file. Please enable MultiWorlds in the ldtk file flags."); } @@ -151,3 +151,6 @@ public T GetEntityRef(EntityReference reference) throw new LDtkException($"No EntityRef of type {typeof(T).Name} found in this level"); } } + +/// An array containing various advanced flags (ie. options or other states). Possible values: DiscardPreCsvIntGrid, ExportOldTableOfContentData, ExportPreCsvIntGridFormat, IgnoreBackupSuggest, PrependIndexToLevelFileNames, MultiWorlds, UseMultilinesType +public enum Flag { DiscardPreCsvIntGrid, ExportOldTableOfContentData, ExportPreCsvIntGridFormat, IgnoreBackupSuggest, PrependIndexToLevelFileNames, MultiWorlds, UseMultilinesType, } diff --git a/LDtk/LDtkJson.cs b/LDtk/LDtkJson.cs index 82ef4073..0eade402 100644 --- a/LDtk/LDtkJson.cs +++ b/LDtk/LDtkJson.cs @@ -6,8 +6,8 @@ namespace LDtk; // LDtk 1.5.3 using System; -using System.Text.Json.Serialization; using System.Text.Json; +using System.Text.Json.Serialization; using Microsoft.Xna.Framework; diff --git a/docs/Changelog.md b/docs/Changelog.md index b303a178..c8cf1f00 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -2,7 +2,13 @@ Changelog for versions -## [1.4.0](https://github.com/IrishBruse/LDtkMonogame/compare/v1.3.1...v1.3.2) +## [1.5.0](https://github.com/IrishBruse/LDtkMonogame/compare/v1.4.0...v1.5.0) + +- Moved LDtkFileFull into LDtk package which conatins alot of editor specific fields used mainly by codegen +- +- Fixed Codegen bug + +## [1.4.0](https://github.com/IrishBruse/LDtkMonogame/compare/v1.3.1...v1.4.0) - Update MonoGame v3.8.2 and Dotnet 8