Grave stones are not lootable and give 10 gold. No idea what gold even does. I mean, why _are_ there traders in a dungeon?
This commit is contained in:
parent
3b9525cca4
commit
baa4d8ee2b
3 changed files with 18 additions and 16 deletions
|
@ -49,20 +49,5 @@
|
|||
"events": ["Events::GUI::TRAP"]},
|
||||
{"_type": "Sprite", "name": "tripwire_trap"}
|
||||
]
|
||||
},
|
||||
"GRAVE_STONE": {
|
||||
"id": "GRAVE_STONE",
|
||||
"name": "Grave Stone",
|
||||
"description": "Something died here. Was this your doing?",
|
||||
"inventory_count": 0,
|
||||
"components": [
|
||||
{"_type": "Tile", "display": "\u21ef",
|
||||
"foreground": [32, 123, 164],
|
||||
"background": [24, 205, 189]
|
||||
},
|
||||
{"_type": "LightSource", "strength": 50, "radius": 0.5},
|
||||
{"_type": "Device", "config": {"test": true}, "events": []},
|
||||
{"_type": "Sprite", "name": "grave_stone"}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,5 +68,19 @@
|
|||
{"_type": "Curative", "hp": 200},
|
||||
{"_type": "Sprite", "name": "healing_potion_small"}
|
||||
]
|
||||
},
|
||||
"GRAVE_STONE": {
|
||||
"id": "GRAVE_STONE",
|
||||
"name": "Grave Stone",
|
||||
"description": "Something died here. Was this your doing?",
|
||||
"inventory_count": 1,
|
||||
"components": [
|
||||
{"_type": "Tile", "display": "\u21ef",
|
||||
"foreground": [32, 123, 164],
|
||||
"background": [24, 205, 189]
|
||||
},
|
||||
{"_type": "Loot", "amount": 10},
|
||||
{"_type": "Sprite", "name": "grave_stone"}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -132,8 +132,11 @@ void System::death(GameLevel &level, components::ComponentMap& components) {
|
|||
world.remove<Combat>(ent);
|
||||
world.remove<EnemyConfig>(ent);
|
||||
|
||||
auto entity_data = config.devices["GRAVE_STONE"];
|
||||
auto entity_data = config.items["GRAVE_STONE"];
|
||||
components::configure_entity(components, world, ent, entity_data["components"]);
|
||||
if(entity_data["inventory_count"] > 0) {
|
||||
world.set<InventoryItem>(ent, {entity_data["inventory_count"], entity_data});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue