From b6831b75a381a4a1b967919b24e4ff02663d7561 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Sun, 9 Feb 2025 14:05:39 -0500 Subject: [PATCH] This fixes the stupid 'bug' where nothing would render because I actually had the data type wrong in the json after moving to the new format. --- assets/devices.json | 18 ++++++------------ assets/enemies.json | 18 +++++++++--------- assets/items.json | 26 +++++++++++++------------- 3 files changed, 28 insertions(+), 34 deletions(-) diff --git a/assets/devices.json b/assets/devices.json index fd2bd1b..f4e86f2 100644 --- a/assets/devices.json +++ b/assets/devices.json @@ -9,10 +9,8 @@ "inventory_count": 0, "randomized": false, "components": [ - {"_type": "Tile", "config": {"chr": "\u2ac5"}}, - {"_type": "Device", - "config": {"test": true}, "events": ["Events::GUI::STAIRS_DOWN"] - } + {"_type": "Tile", "chr": "\u2ac5"}, + {"_type": "Device", "test": true, "events": ["Events::GUI::STAIRS_DOWN"]} ] }, "STAIRS_UP": { @@ -24,10 +22,8 @@ "inventory_count": 0, "placement": "fixed", "components": [ - {"_type": "Tile", "config": {"chr": "\u2259"}}, - {"_type": "Device", - "config": {"test": true}, "events": ["Events::GUI::STAIRS_UP"] - } + {"_type": "Tile", "chr": "\u2259"}, + {"_type": "Device", "test": true, "events": ["Events::GUI::STAIRS_UP"]} ] }, "SPIKE_TRAP": { @@ -38,10 +34,8 @@ "description": "Spikes stab you from the floor.", "inventory_count": 0, "components": [ - {"_type": "Tile", "config": {"chr": "\u1ac7"}}, - {"_type": "Device", - "config": {"test": true}, "events": ["Events::GUI::TRAP"] - } + {"_type": "Tile", "chr": "\u1ac7"}, + {"_type": "Device", "test": true, "events": ["Events::GUI::TRAP"]} ] } } diff --git a/assets/enemies.json b/assets/enemies.json index 5b8b71a..60c0bcc 100644 --- a/assets/enemies.json +++ b/assets/enemies.json @@ -3,21 +3,21 @@ "foreground": [255, 200, 125], "background": [30, 20, 75], "components": [ - {"_type": "Tile", "config": {"chr": "\ua66b"}}, - {"_type": "Combat", "config": {"hp": 200, "damage": 15}}, - {"_type": "Motion", "config": {"dx": 0, "dy": 0, "random": false}}, - {"_type": "LightSource", "config": {"strength": 70, "radius": 2}}, - {"_type": "EnemyConfig", "config": {"hearing_distance": 5}} + {"_type": "Tile", "chr": "\ua66b"}, + {"_type": "Combat", "hp": 200, "damage": 15}, + {"_type": "Motion", "dx": 0, "dy": 0, "random": false}, + {"_type": "LightSource", "strength": 70, "radius": 2}, + {"_type": "EnemyConfig", "hearing_distance": 5} ] }, "EVIL_EYE": { "foreground": [75, 200, 125], "background": [30, 20, 75], "components": [ - {"_type": "Tile", "config": {"chr": "\u08ac"}}, - {"_type": "Combat", "config": {"hp": 100, "damage": 50}}, - {"_type": "Motion", "config": {"dx": 0, "dy": 0, "random": false}}, - {"_type": "EnemyConfig", "config": {"hearing_distance": 10}} + {"_type": "Tile", "chr": "\u08ac"}, + {"_type": "Combat", "hp": 100, "damage": 50}, + {"_type": "Motion", "dx": 0, "dy": 0, "random": false}, + {"_type": "EnemyConfig", "hearing_distance": 10} ] } } diff --git a/assets/items.json b/assets/items.json index 455f8b6..f91a367 100644 --- a/assets/items.json +++ b/assets/items.json @@ -7,8 +7,8 @@ "description": "A torch that barely lights the way. You wonder if it'd be better to not see the person who murders you.", "inventory_count": 1, "components": [ - {"_type": "LightSource", "config": {"strength": 70, "radius": 2.0}}, - {"_type": "Tile", "config": {"chr": "\u0f08"}} + {"_type": "LightSource", "strength": 70, "radius": 2.0}, + {"_type": "Tile", "chr": "\u0f08"} ] }, "SWORD_RUSTY": { @@ -19,8 +19,8 @@ "description": "A sword left to rot in a deep hole where it acquired a patina of dirt and tetanus. You aren't sure if it's more deadly for you to hold it or for the people you stab with it.", "inventory_count": 1, "components": [ - {"_type": "Weapon", "config": {"damage": 15}}, - {"_type": "Tile", "config": {"chr": "\u1e37"}} + {"_type": "Weapon", "damage": 15}, + {"_type": "Tile", "chr": "\u1e37"} ] }, "SWORD_LIGHT_AND_FLAME": { @@ -31,9 +31,9 @@ "description": "A sword so powerful, a great man from the Land of The Rising Sun thrust it into the ocean of Nerf to chill its effects.", "inventory_count": 1, "components": [ - {"_type": "LightSource", "config": {"strength": 70, "radius": 1.8}}, - {"_type": "Tile", "config": {"chr": "\u0236"}}, - {"_type": "Weapon", "config": {"damage": 30}} + {"_type": "LightSource", "strength": 70, "radius": 1.8}, + {"_type": "Tile", "chr": "\u0236"}, + {"_type": "Weapon", "damage": 30} ] }, "CHEST_SMALL": { @@ -43,8 +43,8 @@ "background": [150, 100, 189], "description": "A small chest of gold. You wonder who would leave something like this around.", "components": [ - {"_type": "Tile", "config": {"chr": "\uaaea"}}, - {"_type": "Loot", "config": {"amount": 10}} + {"_type": "Tile", "chr": "\uaaea"}, + {"_type": "Loot", "amount": 10} ], "inventory_count": 1 }, @@ -56,8 +56,8 @@ "description": "A torch on a wall you can't pick up.", "inventory_count": 0, "components": [ - {"_type": "Tile", "config": {"chr": "\u077e"}}, - {"_type": "LightSource", "config": {"strength": 60, "radius": 1.8}} + {"_type": "Tile", "chr": "\u077e"}, + {"_type": "LightSource", "strength": 60, "radius": 1.8} ] }, "POTION_HEALING_SMALL": { @@ -68,8 +68,8 @@ "description": "A small healing potion.", "inventory_count": 1, "components": [ - {"_type": "Tile", "config": {"chr": "\u03eb"}}, - {"_type": "Curative", "config": {"hp": 20}} + {"_type": "Tile", "chr": "\u03eb"}, + {"_type": "Curative", "hp": 20} ] } }