MiX Headlamp 1.0.11

What it does
  Turns the Miner's Hat into a bright LED headlamp. When a player with the permission wears the
  hat and switches it on, the plugin sets the hat's light to a long, wide spot beam. By default
  that is 100 m range, intensity 20, a 150 degree cone and warm white light. Worn hats are checked
  every 1.5 seconds and the beam is re-applied every 2.5 seconds, so it comes back after a respawn
  or reconnect. With InfiniteFuel on, a boosted hat never burns its fuel, and an empty hat is given
  1 low grade fuel once so it can be switched on.
  The light key still works: if the player holds a torch or flashlight, the key toggles that as
  normal; otherwise it toggles the hat.
  Needs the Miner's Hat item (hat.miner). BoostCandleHat also boosts the Candle Hat.

Install
  Drop plugins/MixHeadlamp.cs into carbon/plugins (Carbon) or oxide/plugins (Oxide).

Commands
  /headlamp      Any player. Says whether the boost is active, with the range and intensity.
  lighttoggle    Console command bound to the light key. Toggles a boosted hat when no hand-held
                 light is out, otherwise does the normal light toggle. Players only.

Permissions
  mixheadlamp.use   Gets the LED boost while RequirePermission is true. The plugin grants this
                    to the default group each time it loads, so every player has it out of the box.

Config highlights  (carbon/configs/MixHeadlamp.json)
  Enabled = true                  Master switch.
  RequirePermission = true        false = every player gets the boost, no permission check.
  BoostCandleHat = false          Also boost the Candle Hat.
  LightRange = 100                Beam range in metres (8 to 120).
  LightIntensity = 20             Beam brightness (1 to 20).
  SpotAngle = 150                 Outer cone in degrees (30 to 179).
  InnerSpotAngle = 130            Full-brightness inner cone in degrees (20 to SpotAngle).
  LightColor = "1 0.98 0.92 1"    Beam colour as red green blue alpha, 0 to 1.
  EnableShadows = false           Let the beam cast shadows. Costly on player PCs.
  InfiniteFuel = true             Boosted hats do not burn fuel. false = normal fuel use and no
                                  free fuel.

Tested
  Tested alone on Carbon 2.0.259.0 with Rust build 25454815 on 2026-09-28; runs without the rest of the MiX Server Pack.

Feedback
  Questions, bugs and ideas: MixMods Discord, discord.gg/MZCdmvFrQ, message B1.

Licence
  Free to run and change on your own servers. See LICENCE.txt.
