FB2CollectionComponent
Overview
- Component that manages collections.
Metadata
| Field | Value |
|---|---|
| Kind | component |
| Environment | B2 - Simulation |
| Category | components |
| Extends | FB2Component |
| Require | require('Components.B2CollectionComponent') |
Properties (8)
| Name | Type | Description |
|---|---|---|
CategoryToInfoMap | table<string, FB2CollectionCategoryInfo> | Collection (encyclopedia) data (info on unlocked objects). |
CollectedObjectIds | table<string, boolean> | |
CollectionInformations | FB1CollectionInformation[] | Collection info (partial info acquired from others; latest 10 entries). |
ReceivedCollectionRewardIds | table<string, boolean> | Info on received rewards (used to prevent duplicate claims). |
TagToCompletedObjectNumMap | table<string, integer> | |
bNeedUpdateCollectedObjectIds | boolean | |
bNeedUpdateCompleteObjectsByTag | boolean | |
bUnlockAll | boolean | Whether all collection info is known (e.g. a convenience-store NPC). |
Functions (18)
| Function | Parameters | Returns | Description |
|---|---|---|---|
AddCollectionInformation | InObjectId: string, InCollectionInformationTableRow: FB1CollectionInformationTableRow | - | Adds Collection Information. |
CollectObject_ByGameObjectId | InCharacterEntityId: FB1EntityId, InGameObjectId: FB1EntityId | boolean | |
CollectObject_ByObjectId | InCharacterEntityId: FB1EntityId, InObjectId: string | boolean | |
GetCategoryToInfoMap | - | table<string, FB2CollectionCategoryInfo> | Returns Category To Info Map. |
GetCollectedObjectCount | InCollectionCategory: string | integer | Returns Collected Object Count. |
GetCollectedObjectIds | - | table<string, boolean> | Returns Collected Object Ids. |
GetCollectionInformations | - | FB1CollectionInformation[] | Returns Collection Informations. |
GetType | - | EB2ComponentType | Returns Type. |
GetUnlockAllFlag | - | boolean | Returns Unlock All Flag. |
InitialUnlock | InFirstDiscovererEntityId: FB1EntityId, InCollectionInitialUnlockType: EB1CollectionInitialUnlockType, InHouseholdDtId: string | boolean | |
IsCollectedCategory | InCollectionCategory: string | boolean | Returns whether Collected Category. |
IsCollectedCollectTag | InCollectTag: string | boolean | Returns whether Collected Collect Tag. |
IsCollectedObject_ByEntityId | InObjectId: FB1EntityId | boolean | Returns whether Collected Object_By Entity Id. |
IsCollectedObject_ByObjectId | InObjectId: string | boolean | Returns whether Collected Object_By Object Id. |
MergeCollectionData | InCollectionComponent: FB2CollectionComponent | boolean | |
OpenWidget | InCharacterEntityId: FB1EntityId | - | |
SetUnlockAllFlag | bInUnlockAll: boolean | - | Sets Unlock All Flag. |
UpdateCollectionDataFromCharacterInventory | - | - | Updates Collection Data From Character Inventory. |
Override points (5)
Implement these in Lua as FB2CollectionComponent.Override_Name = function(...) end.
| Function | Parameters | Returns | Description |
|---|---|---|---|
Override_AddCollectionInformation | InObjectId: string, InCollectionInformationTableRow: FB1CollectionInformationTableRow | - | Adds Collection Information. |
Override_InitialUnlock | InFirstDiscovererEntityId: FB1EntityId, InCollectionInitialUnlockType: EB1CollectionInitialUnlockType, InHouseholdDtId: string | boolean | |
Override_MergeCollectionData | InCollectionComponent: FB2CollectionComponent | boolean | |
Override_OpenWidget | InCharacterEntityId: FB1EntityId | - | |
Override_UpdateCollectionDataFromCharacterInventory | - | - | Updates Collection Data From Character Inventory. |