Nutrientsover
Based on game build 714014 | Last updated: 2026-03-08
Overview
NutrientsOver is a UI widget that shows or hides a fullscreen overlay texture to indicate when the player currently has nutrient vision enabled. It listens for the "nutrientsvision" event broadcast on TheWorld and reacts to changes in the player's vision state. The component is typically attached to the player entity as part of the UI rendering system and uses a full-screen image with a tinted transparency to visually communicate the effect.
Usage example
local inst = ThePlayer
inst:NutrientsOver = inst:AddWidget("nutrientsover", inst)
-- The widget automatically shows/hides based on nutrientsvision events
Dependencies & tags
Components used: playervision — accessed via owner.components.playervision:HasNutrientsVision() for initial state check.
Tags: None identified.
Properties
| Property | Type | Default Value | Description |
|---|---|---|---|
owner | Entity | nil | The entity (typically a player) that owns this widget. |
bg | Image | nil | The background image widget used for the overlay. |
shown | boolean | false | Tracks whether the overlay is currently visible. |
Main functions
ToggleNutrients(show)
- Description: Shows or hides the nutrient vision overlay based on the
showflag. Ensures the widget state matches the intended visibility and updates the internalshownflag. - Parameters:
show(boolean) — iftrue, shows the overlay; iffalse, hides it. - Returns: Nothing.
Events & listeners
- Listens to:
nutrientsvision— fired onTheWorldto signal a change in nutrient vision state. TriggersToggleNutrients(data.enabled). - Pushes: None.