FB2TinyShopComponent
Overview
- Component that manages small shops.
Metadata
| Field | Value |
|---|---|
| Kind | component |
| Environment | B2 - Simulation |
| Category | components |
| Extends | FB2Component |
| Require | require('Components.B2TinyShopComponent') |
Properties (12)
| Name | Type | Description |
|---|---|---|
BargainRecords | table<FB1EntityId, FB2TradeRecordArray> | |
CachedDeliveryObjectIds | table<string, boolean> | |
DeliverRecords | table<FB1EntityId, FB2TradeRecordArray> | |
DeliveryListSellStandEntityId | FB1EntityId | |
LimitedSellStandEntityId | FB1EntityId | |
OwnerSiteId | string | UPROPERTY |
SelectedObjects | table<string, FB2SelectedObjectInfo> | |
SellRecords | table<FB1EntityId, FB2TradeRecordArray> | |
ShopLevel | integer | UPROPERTY X |
ShopScore | number | |
TinyShopId | string | |
TinyShopOwnerEntityId | FB1EntityId |
Functions (17)
| Function | Parameters | Returns | Description |
|---|---|---|---|
AddTinyShopScore | InAddScore: number, InTinyShopScoreType: EB1TinyShopScoreType | - | tiny shop score |
BargainObject | InCharacterEntityId: FB1EntityId, InObjectEntityId: FB1EntityId, InSellPrice: integer | boolean | Receives the bargaining result. |
CreateTinyShop | InTinyShopDTId: string | boolean | Creates Tiny Shop. |
DeliverObject | InCharacterEntityId: FB1EntityId, InObjectEntityId: FB1EntityId, OutDeliveryPrice: integer | boolean | Delivers an object and adjusts the delivery price. |
GetTinyShopId | - | string | Returns Tiny Shop Id. |
IsBargainable | InEntityId: FB1EntityId | boolean | Returns whether Bargainable. |
IsBuyable | InCharacterEntityId: FB1EntityId, InObjectEntityId: FB1EntityId | boolean | Returns whether Buyable. |
IsDeliverableByEntityId | InEntityId: FB1EntityId | boolean | Returns whether Deliverable By Entity Id. |
IsDeliverableByObjectId | InObjectId: string | boolean | Returns whether Deliverable By Object Id. |
IsTinyShopOwner | InEntityId: FB1EntityId | boolean | Returns whether the entity is the tiny-shop owner. |
LogTinyShopInfo | - | - | |
LogTradeRecords | InTradeType: EB1TradeType, InEntityId: FB1EntityId | - | |
OnRegisterNewGeneratedSites | InSpawnerId: string, InOwnerEntityId: FB1EntityId | - | Callback invoked on Register New Generated Sites. |
RefreshGeneratedSiteObjects | InForceRefresh: boolean | - | |
SellObject | InCharacterEntityId: FB1EntityId, InObjectEntityId: FB1EntityId, OutSellPrice: integer | boolean | Sells an object. |
SetScore | InScore: number | - | Sets Score. |
TryRegisterOwner | InSpawnerId: string, InOwnerEntityId: FB1EntityId | - |
Override points (8)
Implement these in Lua as FB2TinyShopComponent.Override_Name = function(...) end.
| Function | Parameters | Returns | Description |
|---|---|---|---|
Override_AddTinyShopScore | InAddScore: number, InTinyShopScoreType: EB1TinyShopScoreType | - | tiny shop score |
Override_BargainObject | InCharacterEntityId: FB1EntityId, InObjectEntityId: FB1EntityId, InSellPrice: integer | boolean | Receives the bargaining result. |
Override_CreateTinyShop | InTinyShopDTId: string | boolean | Creates Tiny Shop. |
Override_LogTinyShopInfo | - | - | |
Override_LogTradeRecords | InTradeType: EB1TradeType, InEntityId: FB1EntityId | - | |
Override_OnRegisterNewGeneratedSites | InSpawnerId: string, InOwnerEntityId: FB1EntityId | - | Callback invoked on Register New Generated Sites. |
Override_RefreshGeneratedSiteObjects | - | - | |
Override_TryRegisterOwner | InSpawnerId: string, InOwnerEntityId: FB1EntityId | - |