21 Commits

Author SHA1 Message Date
Aaron Suen
6b03f79561 Revert sponge death ABM timing
The checks may be a bit pricey, so we shouldn't
just blindly increase the net run rate.
2022-01-17 08:11:44 -05:00
Aaron Suen
fd6f0508ea Make sponge node death less arbitrary
Sponge nodes die if exposed to air for >= 2 seconds.  They
are still more fragile in item form.  This allows reliably
swapping a node used to seal in a living sponge without
instantly killing it, which used to be possible but risky,
depending on racing with the ABM timer.
2022-01-17 08:09:17 -05:00
Aaron Suen
17c3f1700f Area load check for AISMs 2021-12-18 12:10:58 -05:00
Aaron Suen
a1b2df3941 Begin standardization of unload bounds check
- New near_unloaded API that supports custom
  distance parameter, map bounds check, and
  some optimizations.
- Add area automatic unload check support to ABM
  API and add to applicable ABMs, replacing many
  old manual checks.

Note that the explicit unload check is only strictly
necessary when something will happen due to
a node NOT being present in the area, e.g. something
igniting due to absent coolant, or soaking quantity
being reset due to missing sources.  In simple cases
where the absence of a thing causes the ABM to do
nothing, then the standard check can work because
the default action is to do nothing anyway.
2021-12-18 11:28:14 -05:00
Aaron Suen
ae24ff0655 Lower some ABM costs 2021-12-11 12:14:42 -05:00
Aaron Suen
ad8bf99800 Reduce sponge colony growth load 2021-12-05 14:30:11 -05:00
Aaron Suen
87e6e72d76 Offline-soaking sponge growth 2021-07-11 20:28:05 -04:00
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
a772e4e084 Fix ignores killing sponges. 2020-06-20 22:48:39 -04: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
d33877fbc7 Fix sponge tote crash 2020-04-16 01:07:48 -04:00
Aaron Suen
920fba34ee Separate node stand/touch/radiant damage types
Don't reuse damage_per_second for damage on punch and radiant
damage.  This allows these to be defined separately, i.e. no longer
assuming that all damage is from "heat" and can radiate.  This
allows for things like thorny plants that hurt if you touch them
or stand in them but not if you stand near them.

Thanks to WintersKnight94 for reporting this.
2020-04-09 06:56:18 -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
7bc1a4ddad Standardize node placement sounds.
Add node placement sounds to processes
missing them, like tree growth.
2020-01-16 22:02:59 -05:00
Aaron Suen
51d687e832 Tweak sponge intervals.
Sponges die more easily when in itemstack form,
for transport.  Make them a bit less likely to die
from air exposure when in node form, to reduce
the number dying from temporary air bubbles after
neighoring sponges have been harvested.
2019-12-19 20:15:12 -05:00
Aaron Suen
89ac167d06 Slow down sponge death ABMs.
This should reduce the chance that sponges are
killed by a transient, like the absence of water caused
by digging sand out from under one.  It's still a bit
risky though.
2019-12-17 22:25:44 -05:00
Aaron Suen
b507e4c6f0 Buff sponge growth rate.
Sponges grow way too slow for the new cultivation
mechanics.  Extremely slow growth is no longer
necessary to prevent colony explosion due to the
introduction in gen2 of total colony size inhibition.
2019-12-17 22:15:18 -05:00
Aaron Suen
68bfa4dc70 Simplify sponge death to never eject stacks.
Sponges just always all die together instantly.
2019-12-17 22:13:29 -05:00
Aaron Suen
63c9a3f659 Initial living sponge gen3 overhaul.
- Sponge mod now depends on optics/glass.
- Living sponges die to wet sponges rapidly in air.
- Living sponges are preserved by water, or a
  water-tight container.
- Glass tanks with a watertight lid preserve sponges.
- Glass tanks inside a packed tote preserve sponges.
- Sponges have about a 2 second half-life in air.

The net effect is that capturing living sponges is no
longer a frustrating, probabilistic exercise, but now
transporting them involves significant technological and
problem-solving work.
2019-12-17 21:55:09 -05:00
Aaron Suen
b9e2f822f8 New flexible find_nodes_around api. 2019-11-30 10:28:35 -05:00
Aaron Suen
cc30c80069 Sponge cultivation overhaul.
- Inhibit sponge colony growth beyond a maximum size.  Players
  will have to prune colonies (or, smarter yet, split them) to
  grow more sponges.

- Allow sponge colony transplantation.  Sponges near the "core"
  of a colony (i.e. surrounded by more sponges) are more viable
  and more able to survive the player's crude harvesting.
2019-09-23 21:28:48 -04:00