Skip to main content

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​

PropertyTypeDefault ValueDescription
ownerEntitynilThe entity (typically a player) that owns this widget.
bgImagenilThe background image widget used for the overlay.
shownbooleanfalseTracks whether the overlay is currently visible.

Main functions​

ToggleNutrients(show)​

  • Description: Shows or hides the nutrient vision overlay based on the show flag. Ensures the widget state matches the intended visibility and updates the internal shown flag.
  • Parameters: show (boolean) — if true, shows the overlay; if false, hides it.
  • Returns: Nothing.

Events & listeners​

  • Listens to: nutrientsvision — fired on TheWorld to signal a change in nutrient vision state. Triggers ToggleNutrients(data.enabled).
  • Pushes: None.