Using Oblomov's proposed sinusoidal brightness profile, making
the bright and dim extremes of the lantern's range shorter, and
stretching the middle. Also nerfed the total useful lifetime
of lanterns since we no longer have to inflate it by as large of
a "useless" range at the bottom end.
Seems like with higher exponents, the lantern quickly discharges
to virtual uselessness and actually spends most of its charge
range at a zero emission level.
Higher exponents >1 cause lantern to lose intense glow fast, but
glow dimly for longer, making them more realistic and "safer," as
players will have more time to get back to a charging station once
they start to feel the pressure of a dimming lantern.
Lower exponents <1 would cause a lantern to glow more intensely
but burn out quicker once it starts to dim, similar to torches,
making them also dangerous as it's easier to overestimate remaining
charge when budgeting time to get back out of a cave.
The new formula has some values that can be tweaked to alter the
gameplay balance effect of this, in addition to total max charge
and discharge rate.
- Clean up group expansion logic
- Lanterns covered in lux will never net-discharge, even if they
are not getting enough power to charge, so that they can be
carried and installed as light fixtures, with a supply of
flux from above, and can be "paused" in a flux flow when not
in use without discharging.
Relying on the dynamic light thing for lanterns when they are
placed on the ground causes unexpected behavior when it comes to
lens activation and the displacement of dynamic light outside of
the node space of the lantern itself. It also causes issues with
lanterns lost deep underwater, i.e. they don't emit light when
they effectively should.
- Check for water in same node (carried by player) and
one node above (esp. for placed stack)
- Slightly optimize node group check
- Fix float rounding error, since meta floats are not
perfectly round-tripped, to reduce spurious rate changes
- Add debugging info to trace phase transitions on all
lantern items
- Correct initial charge setting (for /giveme'd items)
- Fix failure to detect immersion in water
- Reduce re-wield animations
Compute current charge based on past rate and
time, like a soaking AISM, but do NOT update the
totals in metadata unless the rate changed or
we crossed a charge level threshold. This means
that we should only see the re-wield anim when
the charge level changes, the item is brought
in or out of water, or moved around a reactor.
We are losing the randomness factor from the
soaking AISM, but it's probably fine to have a
more exact discharge time for this sort of item.