From 0d49a84492622c1bf9a3bc0ce12b39055f0973cc Mon Sep 17 00:00:00 2001 From: Mr-Auto Date: Thu, 7 Sep 2023 17:02:20 +0200 Subject: [PATCH] Rename shops to room owners, as it contains more than just a the shop stuff --- src/game_api/rpc.cpp | 2 +- src/game_api/state.hpp | 2 +- src/game_api/state_structs.hpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/game_api/rpc.cpp b/src/game_api/rpc.cpp index 3755cdca9..e687d743b 100644 --- a/src/game_api/rpc.cpp +++ b/src/game_api/rpc.cpp @@ -1698,7 +1698,7 @@ void add_item_to_shop(int32_t item_uid, int32_t shop_owner_uid) state.layer_local(item->layer)->spawn_entity_over(to_id("ENT_TYPE_FX_SALEDIALOG_CONTAINER"), item, 0, 0.5); ItemOwnerDetails iod{shop_owner_uid, owner->type->id}; - state.ptr()->shops.items.insert({item->uid, iod}); + state.ptr()->room_owners.owned_items.insert({item->uid, iod}); return; } } diff --git a/src/game_api/state.hpp b/src/game_api/state.hpp index 5c464c4db..45cfc44cf 100644 --- a/src/game_api/state.hpp +++ b/src/game_api/state.hpp @@ -260,7 +260,7 @@ struct StateMemory uint8_t unknown31a; // padding probably uint8_t unknown31b; uint8_t unknown31c; - ShopsInfo shops; + RoomOwnersInfo room_owners; /// Number of frames since the game was launched uint32_t time_startup; uint32_t special_visibility_flags; diff --git a/src/game_api/state_structs.hpp b/src/game_api/state_structs.hpp index 70d9020a6..0ce77fde0 100644 --- a/src/game_api/state_structs.hpp +++ b/src/game_api/state_structs.hpp @@ -982,11 +982,11 @@ struct ShopOwnerDetails uint32_t shop_owner_uid; }; -struct ShopsInfo +struct RoomOwnersInfo { // key is the uid of an item - custom_map items; - std::vector shop_owners; + custom_map owned_items; + std::vector room_owners; }; struct MultiLineTextRendering