Class BotProfileStore
- Namespace
- GrindFest
- Assembly
- GrindFest.dll
Holds the player's bot configuration profiles and tracks which automation features are unlocked. Features are unlocked via Grimoire node IDs — this class reads the party's inscribed nodes list. The actual toggle states are stored per-profile.
JS callers reach this via Puerts as CS.GrindFest.BotProfileStore.Instance.
It lives nowhere in particular and cannot be missing. There is nothing to wire up in the
inspector, so there is no reason to keep an object for it in the scene: Instance
creates the one instance on first access (play mode only, never a second copy). Callers just read
BotProfileStore.Instance and use it.
This used to be an override on this class that built its own GameObject whenever no live one could be found, with no play-mode guard - the OneJS edit-mode preview mounts the UI outside play mode, the UI reads the store, and every editor tick that found no live one added another object to the open scene (hundreds of them, saved with the scene). The behaviour was right; the guard that makes it safe belongs in the base class, where it cannot be forgotten.
public class BotProfileStore : Singleton<BotProfileStore>
- Inheritance
-
objectBotProfileStore
- Inherited Members
Fields
Properties
Methods
- GetActiveProfileJson()
Returns the active profile as a JSON string for the JS panel.
- GetLootNameFilter()
Get the active profile's loot name filter.
- GetProfilesJson()
Returns all profiles as a JSON string.
- GetUnlockedFeaturesJson()
Returns all automation node IDs that are currently unlocked as a JSON array string.
- IsFeatureActive(string)
Check if a feature is both unlocked AND enabled. Called by Idle() every frame for each behavior.
- IsFeatureUnlocked(string)
Check if a specific automation feature is unlocked. Simply checks if the corresponding Grimoire node ID is inscribed.
- SetFeatureEnabled(string, bool)
Toggle a specific automation on/off in the active profile. Called from JS when the player flips a toggle.
- SetLootNameFilter(string)
Set the loot name filter on the active profile.