static keys - items in inventory will save their assigned key

precursor to cleaning up/modularising inventory display, instead of needing to iterate through every item held to find unique copies, we can just check if the button pressed corresponds to any entity's Key {} index
This commit is contained in:
Llywelwyn 2023-10-05 00:52:34 +01:00
parent a7b4f621fb
commit d11971126c
19 changed files with 445 additions and 122 deletions

View file

@ -103,6 +103,7 @@ pub fn save_game(ecs: &mut World) {
InflictsDamage,
Intrinsics,
Item,
Key,
KnownSpells,
LootTable,
MagicItem,
@ -132,17 +133,20 @@ pub fn save_game(ecs: &mut World) {
SpawnParticleBurst,
SpawnParticleLine,
SpawnParticleSimple,
Stackable,
TakingTurn,
Telepath,
ToHitBonus,
Viewshed,
Charges,
WantsToApproach,
WantsToAssignKey,
WantsToDropItem,
WantsToFlee,
WantsToMelee,
WantsToPickupItem,
WantsToRemoveItem,
WantsToRemoveKey,
WantsToUseItem,
SerializationHelper,
DMSerializationHelper
@ -235,6 +239,7 @@ pub fn load_game(ecs: &mut World) {
InflictsDamage,
Intrinsics,
Item,
Key,
KnownSpells,
LootTable,
MagicItem,
@ -264,17 +269,20 @@ pub fn load_game(ecs: &mut World) {
SpawnParticleBurst,
SpawnParticleLine,
SpawnParticleSimple,
Stackable,
TakingTurn,
Telepath,
ToHitBonus,
Viewshed,
Charges,
WantsToApproach,
WantsToAssignKey,
WantsToDropItem,
WantsToFlee,
WantsToMelee,
WantsToPickupItem,
WantsToRemoveItem,
WantsToRemoveKey,
WantsToUseItem,
SerializationHelper,
DMSerializationHelper