Skip to content

Commit

Permalink
Rename shops to room owners, as it contains more than just a the shop…
Browse files Browse the repository at this point in the history
… stuff
  • Loading branch information
Mr-Auto committed Sep 7, 2023
1 parent 6e83d98 commit 0d49a84
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/game_api/rpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/game_api/state.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/game_api/state_structs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -982,11 +982,11 @@ struct ShopOwnerDetails
uint32_t shop_owner_uid;
};

struct ShopsInfo
struct RoomOwnersInfo
{
// key is the uid of an item
custom_map<int32_t, ItemOwnerDetails> items;
std::vector<ShopOwnerDetails> shop_owners;
custom_map<int32_t, ItemOwnerDetails> owned_items;
std::vector<ShopOwnerDetails> room_owners;
};

struct MultiLineTextRendering
Expand Down

0 comments on commit 0d49a84

Please sign in to comment.