aboutsummaryrefslogtreecommitdiffstats
path: root/src/entities
diff options
context:
space:
mode:
authornathan <nathansmith@disroot.org>2026-01-19 14:10:40 +0000
committernathan <nathansmith@disroot.org>2026-01-19 14:10:40 +0000
commitf44d154d1372597742642596fe91c619613f81ef (patch)
tree22eb7aaefc5b1100e6294c7aa2fd63a97758a8cb /src/entities
parentf339de8c07647ed4c5d659639f0f3e6c271faf8f (diff)
downloadFindThings-f44d154d1372597742642596fe91c619613f81ef.tar.gz
FindThings-f44d154d1372597742642596fe91c619613f81ef.tar.bz2
FindThings-f44d154d1372597742642596fe91c619613f81ef.zip
Using inventory items
Diffstat (limited to 'src/entities')
-rw-r--r--src/entities/oldMint.c4
-rw-r--r--src/entities/stickyNickel.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/entities/oldMint.c b/src/entities/oldMint.c
index 445f34a..9e43fd9 100644
--- a/src/entities/oldMint.c
+++ b/src/entities/oldMint.c
@@ -30,8 +30,10 @@ InteractionCommand interactWithOldMint(Entity* entity, Game* game,
"Oh goodie it's an old mint!\nThough I advice you don't taste it\n...(assuming you want to live)");
addItemToInventory(&game->inventory, item);
return INTERACTION_TALK;
+ case SELECTION_USE:
+ return INTERACTION_KILL_ITEM;
default:
- entity->id = ENTITY_NONE;
+ entity->visable = false;
return INTERACTION_END;
}
}
diff --git a/src/entities/stickyNickel.c b/src/entities/stickyNickel.c
index 3738089..49a3fc7 100644
--- a/src/entities/stickyNickel.c
+++ b/src/entities/stickyNickel.c
@@ -32,8 +32,10 @@ InteractionCommand interactWithStickyNickel(Entity* entity, Game* game,
"Luck you, its a sticky nickel :D\nBetter wash your hands...");
addItemToInventory(&game->inventory, item);
return INTERACTION_TALK;
+ case SELECTION_USE:
+ return INTERACTION_KILL_ITEM;
default:
- entity->id = ENTITY_NONE;
+ entity->visable = false;
return INTERACTION_END;
}
}