Log inGet started
Package

colour.module

README.md

colour

The painter's own colour: what solvent takes, and how it comes back.

This is the stake in a fight where nobody is hurt. Solvent that hits the painter strips colour (1 = whole,
0 = none). At zero the painter is WASHED OUT: slowed, unable to paint or fire, easier to hold, until colour has
returned to cfg.colour.washedOut.reviveAt. Colour only returns while nobody is looking, after a delay, and
faster on friendly ground.

  local Colour = require("~.modules.colour")
  local colour = Colour.new(cfg.colour)
  local e = colour:wash(0.2)            -- solvent landed: { value, delta, washedOut = true when this hit did it }
  local events = colour:tick(dt, { seen = false, friendly = 0.6 })
  -- friendly 0..1: how much this ground is on the painter's side; events: { type = "revived" } when washed out ends
  colour.value   colour:isWashedOut()
  colour:restore(0.5)                   -- given back at once (a doctor, a safehouse); may end a wash-out
  colour:effects()   -- { speed, canPaint, canFire, grabWindow, drain }  drain 0..1: how grey the picture is
  colour:serialise()   colour:load(data)

The interface is documented in the header of init.luau; this file repeats it for the asset browser.