From e853966be38ae6c5319df137c3b04a86e52b562b Mon Sep 17 00:00:00 2001 From: nathan Date: Sun, 11 Jan 2026 06:13:36 -0700 Subject: More inventory things --- src/entities/stickyNickel.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/entities/stickyNickel.c') diff --git a/src/entities/stickyNickel.c b/src/entities/stickyNickel.c index 94755c5..87d3687 100644 --- a/src/entities/stickyNickel.c +++ b/src/entities/stickyNickel.c @@ -1,4 +1,5 @@ #include "stickyNickel.h" +#include "ui.h" void initStickyNickel(Entity* entity) { @@ -11,3 +12,26 @@ void updateStickyNickel(Entity* entity, Game* game) DrawBillboard(game->player.camera, game->assets.textures[NICKEL_TEXTURE], entity->position, 1.0, WHITE); } + +InteractionCommand interactWithStickyNickel(Entity* entity, Game* game, + Selection selection) +{ + InventoryItem item = (InventoryItem){ + .id = STICKY_NICKEL, + .textureId = NICKEL_TEXTURE, + .count = 1 + }; + + switch (selection) + { + case SELECTION_INTERACT: + setInteractionChat( + &game->interactionChat, + "Luck you, its a sticky nickel :D\nBetter wash your hands..."); + addItemToInventory(&game->inventory, item); + return INTERACTION_TALK; + default: + entity->id = ENTITY_NONE; + return INTERACTION_END; + } +} -- cgit v1.2.3