Skip to main content

FB2TinyShopComponent

Overview

  • Component that manages small shops.

Metadata

FieldValue
Kindcomponent
EnvironmentB2 - Simulation
Categorycomponents
ExtendsFB2Component
Requirerequire('Components.B2TinyShopComponent')

Properties (12)

NameTypeDescription
BargainRecordstable<FB1EntityId, FB2TradeRecordArray>
CachedDeliveryObjectIdstable<string, boolean>
DeliverRecordstable<FB1EntityId, FB2TradeRecordArray>
DeliveryListSellStandEntityIdFB1EntityId
LimitedSellStandEntityIdFB1EntityId
OwnerSiteIdstringUPROPERTY
SelectedObjectstable<string, FB2SelectedObjectInfo>
SellRecordstable<FB1EntityId, FB2TradeRecordArray>
ShopLevelintegerUPROPERTY X
ShopScorenumber
TinyShopIdstring
TinyShopOwnerEntityIdFB1EntityId

Functions (17)

FunctionParametersReturnsDescription
AddTinyShopScoreInAddScore: number, InTinyShopScoreType: EB1TinyShopScoreType-tiny shop score
BargainObjectInCharacterEntityId: FB1EntityId, InObjectEntityId: FB1EntityId, InSellPrice: integerbooleanReceives the bargaining result.
CreateTinyShopInTinyShopDTId: stringbooleanCreates Tiny Shop.
DeliverObjectInCharacterEntityId: FB1EntityId, InObjectEntityId: FB1EntityId, OutDeliveryPrice: integerbooleanDelivers an object and adjusts the delivery price.
GetTinyShopId-stringReturns Tiny Shop Id.
IsBargainableInEntityId: FB1EntityIdbooleanReturns whether Bargainable.
IsBuyableInCharacterEntityId: FB1EntityId, InObjectEntityId: FB1EntityIdbooleanReturns whether Buyable.
IsDeliverableByEntityIdInEntityId: FB1EntityIdbooleanReturns whether Deliverable By Entity Id.
IsDeliverableByObjectIdInObjectId: stringbooleanReturns whether Deliverable By Object Id.
IsTinyShopOwnerInEntityId: FB1EntityIdbooleanReturns whether the entity is the tiny-shop owner.
LogTinyShopInfo--
LogTradeRecordsInTradeType: EB1TradeType, InEntityId: FB1EntityId-
OnRegisterNewGeneratedSitesInSpawnerId: string, InOwnerEntityId: FB1EntityId-Callback invoked on Register New Generated Sites.
RefreshGeneratedSiteObjectsInForceRefresh: boolean-
SellObjectInCharacterEntityId: FB1EntityId, InObjectEntityId: FB1EntityId, OutSellPrice: integerbooleanSells an object.
SetScoreInScore: number-Sets Score.
TryRegisterOwnerInSpawnerId: string, InOwnerEntityId: FB1EntityId-

Override points (8)

Implement these in Lua as FB2TinyShopComponent.Override_Name = function(...) end.

FunctionParametersReturnsDescription
Override_AddTinyShopScoreInAddScore: number, InTinyShopScoreType: EB1TinyShopScoreType-tiny shop score
Override_BargainObjectInCharacterEntityId: FB1EntityId, InObjectEntityId: FB1EntityId, InSellPrice: integerbooleanReceives the bargaining result.
Override_CreateTinyShopInTinyShopDTId: stringbooleanCreates Tiny Shop.
Override_LogTinyShopInfo--
Override_LogTradeRecordsInTradeType: EB1TradeType, InEntityId: FB1EntityId-
Override_OnRegisterNewGeneratedSitesInSpawnerId: string, InOwnerEntityId: FB1EntityId-Callback invoked on Register New Generated Sites.
Override_RefreshGeneratedSiteObjects--
Override_TryRegisterOwnerInSpawnerId: string, InOwnerEntityId: FB1EntityId-