Refactor Merchandise and shelves
Shelves are now saved in a special section in the InteriorRefList and must be loaded dynamically when the shop is loaded. Merchandise for the shop is loaded once and saved in the private merchandise chest for the shop. Optimize updating merchandise to refresh the shelves from the response of the update instead of refetching the merchandise. A single shelf can be loaded and paged indpedent from other shelves in the cell.
This commit is contained in:
@@ -24,8 +24,8 @@ bool RegisterFuncs(RE::BSScript::IVirtualMachine* a_vm)
|
||||
a_vm->RegisterFunction("Load", "BRInteriorRefList", LoadInteriorRefList);
|
||||
a_vm->RegisterFunction("LoadByShopId", "BRInteriorRefList", LoadInteriorRefListByShopId);
|
||||
//a_vm->RegisterFunction("Toggle", "BRMerchandiseList", ToggleMerchandise);
|
||||
//a_vm->RegisterFunction("NextPage", "BRMerchandiseList", LoadNextMerchandise);
|
||||
//a_vm->RegisterFunction("PrevPage", "BRMerchandiseList", LoadPrevMerchandise);
|
||||
a_vm->RegisterFunction("NextPage", "BRMerchandiseList", LoadNextMerchandise);
|
||||
a_vm->RegisterFunction("PrevPage", "BRMerchandiseList", LoadPrevMerchandise);
|
||||
a_vm->RegisterFunction("Load", "BRMerchandiseList", LoadMerchandiseByShopId);
|
||||
//a_vm->RegisterFunction("Refresh", "BRMerchandiseList", RefreshMerchandise);
|
||||
a_vm->RegisterFunction("Replace3D", "BRMerchandiseList", ReplaceMerch3D);
|
||||
|
||||
Reference in New Issue
Block a user