17 Commits

Author SHA1 Message Date
Aaron Suen
9fb4cf55b2 Deprecate register_limited_abm
This has just been an alias to minetest.register_abm
for a while now, and all ABM enhancement features
have been added directly to the core API.
2021-07-10 11:09:44 -04:00
Aaron Suen
d348b04668 Fix torch AISM bugs
Torches being inert when not wielded
- Not snuffing in water
- Not getting ashy as they approach expiry
2021-02-03 22:02:30 -05:00
Aaron Suen
984e87e155 Consistent ABM labeling
- Make sure every ABM has a label
- Use consistent case
- More concise names / consistent voice
2020-06-17 07:09:20 -04:00
Aaron Suen
55efdfa027 Fire ambiance consolidation
- Fire flame and torch flame use the same ambiance def via
  a new flame_ambiance group.
- Items can now emit ambiance via AISM.
2020-05-26 18:48:03 -04:00
Aaron Suen
35292eb259 Switch to an internal sound API
Avoid mangling official Minetest API
functions that mods may want to
use directly.
2020-04-05 21:22:51 -04:00
Aaron Suen
0f474b90e4 Remove debug code. 2020-03-15 09:03:44 -04:00
Aaron Suen
8a5835f21b Add visible stages of lit torch decay. 2020-03-15 09:02:58 -04:00
Aaron Suen
061d100723 Re-increase torch water quenching radius a little. 2019-11-18 22:55:36 -05:00
Aaron Suen
b9fb3660d0 Run AISMs on item_entities too.
Even though they're ephemeral and supposedly short-lived,
throwing a torch into water should probably extinguish it
before it lands at the bottom.
2019-11-18 22:35:10 -05:00
Aaron Suen
8c45be8abb Make handheld torches more forgiving.
You can now wade in shallow water or stand closer to a
waterfall without torches going out.
2019-11-18 22:17:17 -05:00
Aaron Suen
07850123d7 Standardize high-resolution gametime.
Use high-res version in a few places we were using integer-res
timer before.  This should e.g. smooth time variation of wind
strength for ambient sounds.
2019-11-10 08:10:34 -05:00
Aaron Suen
fdd881ae53 Active ItemStack Modifier overhaul.
AISM's now tick against stacks, including in piles, shelves,
and player inventories, (hopefully) efficiently compared to
the old way with separate ABMs.  Item entity support is also
possible, but not necessary yet.

This started out as a bugfix for being able to put a torch inside a
shelf, which didn't make much sense gameplay-wise.  It ended up
going quite a bit further.

- Aggregate now gets wet in stack form.  Swimming with dry
  concrete now has consequences.
- Lux reactions, radiation, and infusion should now behave more
  consistently.
- Sponges can now wet or dry in stack form, including inside
  containers.
- Torch ignition, quenching, and extinguishing is now more
  consistent regardless of context, and torches are now more
  dangerous, and can ignite things in more contexts.
2019-10-29 20:03:18 -04:00
Aaron Suen
b6168151bf Style consistency.
Avoid redefining tables on every call.
2019-10-06 12:06:36 -04:00
Aaron Suen
b8d340587e Deprecated function cleanup. 2019-10-05 17:49:16 -04:00
Aaron Suen
0a29fd34e9 Clean up sound handling, fix floating point timers. 2019-10-01 19:24:39 -04:00
Aaron Suen
8a65ab5367 Torch logic refactors.
- Unify burn-out logic to just always become ash.
- Reduce logic depth a bit on wield tick, but look for some
  early bail-outs.
- Combine ABM's.
2019-10-01 19:01:06 -04:00
Aaron Suen
a193b966a2 Code reorg, texture optimization.
Use the upstream coal textures from the fire mod, since that's
already a dependency, and we can make sure our textures are
consistent with the upstream ones.  Make the burning torch tip
look embery and not just coaly.
2019-10-01 18:52:05 -04:00