68 Commits

Author SHA1 Message Date
Aaron Suen
6054b43848 Fix rush light level check
It's the light level incident on the rush itself, not
in the space above, that we care about.  We also
don't need air above the rush, because there's air
IN the rush node.
2022-10-10 13:09:58 -04:00
Aaron Suen
cdc8f4726a Rushes require light to spread
They can still survive in the dark.
2022-10-09 12:55:42 -04:00
Aaron Suen
166cfe5f14 Mitigate excess server block sends
The problem was pointed out by Josh
(gitlab.com/krazy-j) in merge request !22.
Apparently MT is not very smart about marking
mapblocks dirty to send to clients based on
calling mt.set_node(), i.e. it will mark them
dirty presumptively even if you set the node to
the same value it had already been.

This behavior can be confirmed by registering
an ABM against a common node like grass and
setting action = minetest.set_node.  This
causes every mapblock containing that node
to be invalidated every interval, causing a big
spike in the packets received each interval
that you can clearly see on the F5 graph.

Rather than just fixing it for the most easily
observed case (fire checks), add utlity functions
to check this for ALL node change situations,
and apply it more or less universally anywhere
that we are not certain that the node is being
changed and we don't need to worry about the
extra overhead cost of the check.

Note that we don't need a
nodecore.set_loud_check call, as set_loud was
only ever being used already in cases where
we were pretty sure we were actually changing
a node.
2022-08-24 20:44:14 -04:00
Aaron Suen
834b13e6ad Fix sedges not stacking in containers
Placing a sedge into a container via right-click would
randomly transform the sedge to one of the 5 different
random stages of growth, same as placing on the
ground would, causing non-sedge_1 sedge items to
exist which don't stack with normal sedge_1 anymore.

Instead, simplify the growth feature to apply the
change to the sedge in node form after it's been
placed, instead of manipulating items.
2022-02-27 21:25:40 -05:00
Aaron Suen
7152c487ce Access to flora as weeds via peat fermentation
- Made grass from peat more common
- Flowers spontaneously grow on humus under sun
- Sedges spontaneously grow on grass
- Rushes can spawn near water and sedges
2022-01-15 12:03:28 -05:00
Aaron Suen
c20bc5b502 Make a proper air_equivalent API 2021-12-26 13:26:28 -05:00
Aaron Suen
67d210cbf4 Rename "grassable" API to be less deceptive.
The grassable group means "grass can grow here"
but the API means "grass can grow under here"; make
the name clarify the difference.
2021-12-26 09:13:09 -05:00
Aaron Suen
dd5236f38b Mostly un-nerf rush growth rate
Sedges were buffed to balance it already anyway.
2021-12-22 21:49:39 -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
65dc1fe58f Start working on some hint reform
Got through a bunch of mods, up next is optics.

- Try to use crafting recipes rather than resources as
  the criteria for completing a hint.
- It's okay to use simple item observation for specific
  cases of transient things like pliant concrete.
- It's also okay to still use simple observations for the
  eligibility checks.
- Simple observation is also okay for naturally occuring
  e.g. decay processes, like wilting flowers, as opposed
  to crafts that need to be completed.
2021-12-16 22:31:50 -05:00
Aaron Suen
fb76d23f36 Expand peat grinding to groups
- Use groups so it's easier for mods to add things
  that can be ground into peat.
- Pretty much all flora can be ground into peat as well.
2021-12-16 20:47:13 -05:00
Aaron Suen
6da9332d2b Random sedge placement size
This makes it possible to place sedges of any size on any surface,
including ones where sedges cannot grow, given enough patience
and materials.
2021-12-15 07:22:05 -05:00
Aaron Suen
6cb8aecbf1 Thatch flammability buff
- Should be more flammable than wicker
- Optional alternative "first fire" tinder
2021-12-13 23:34:37 -05:00
Aaron Suen
a7127c0f0e Buff sedge drop rates
Sedge farming for thatch (the only major application
right now) is far too brutal, especially after the 8:1
conversion rate.
2021-12-13 23:28:26 -05:00
Aaron Suen
86707af8ae Nerf rush growth rate
Seems like it's too easy to farm wicker in
comparison to farming thatch
2021-12-10 00:10:43 -05:00
Aaron Suen
c6de6a5a52 Thatch and wicker shouldn't be so hard to dig 2021-12-09 21:58:49 -05:00
Aaron Suen
d0132e4127 Flowers will survive but NOT spread on grass 2021-12-04 21:33:40 -05:00
Aaron Suen
8d38fe5421 Make mature sedges easier to spot
Use a taller, fully square selection box for them,
adding 1 extra level worth of box height (from 4/8
to 6/8 instead of 4/8 to 5/8).
2021-12-03 22:41:39 -05:00
Aaron Suen
ab79dd9949 Nerf rush farming dirt consumption
Only consume soil quality 1/4 times
2021-11-27 15:49:38 -05:00
Aaron Suen
24e16a97d8 Make thatch use grassy sounds too 2021-11-27 15:48:44 -05:00
Aaron Suen
61a494d297 Make sedges use grassy sounds 2021-11-27 15:48:27 -05:00
Aaron Suen
591aca0ced More sedge fixes 2021-11-27 13:45:42 -05:00
Aaron Suen
5392a2ab3a Fix sedge farming
Instead of trying to always drop a sedge, then sometimes drop
another (didn't seem to work), just drop 2 sedges 25% of the time,
and 1 sedge the rest of the time if the 2 didn't drop.
2021-11-27 13:36:08 -05:00
Aaron Suen
c0a105a4ee Remove debug cruft 2021-11-26 09:16:22 -05:00
Aaron Suen
033c4defc5 Add thatch and wicker
Partly based on WintersKnight94's work, but with
more vanilla-like and less wintercore-like textures
for now.
2021-11-25 21:13:36 -05:00
Aaron Suen
d2b157199e Document all groups in use by the game
Add a dump system to help detect new groups
that need to be documented.
2021-11-21 00:48:14 -05:00
Aaron Suen
eb6ea78306 Flower tweaks
- Make flowers easier to grow by allowing plain grass/dirt.
- Reduce the base rate of natural up-mutation.
2021-11-20 11:53:10 -05:00
Aaron Suen
f763778436 Fix flower breeding influence radius 2021-09-25 11:56:26 -04:00
Aaron Suen
b73d1d1290 Pre-clean-transparent filter on all textures
Some users may use filtering but not have the "clean transparent"
filter enabled in the Minetest engine config.  Bake this filter
into all images to (1) avoid the consequences of this (i.e. black
halos), and (2) possibly speed up startup time (the filter will
converge immediately).
2021-09-23 07:36:21 -04:00
Aaron Suen
b42a01a4f9 Register group for dry flora
This represents plant matter that may be
"dead" more or less and could be used for
thatch or adding plant fibers to things.
2021-09-06 10:17:39 -04:00
Aaron Suen
e535e126c1 Fix debug flower breeding rates 2021-08-28 19:36:43 -04:00
Aaron Suen
74587aca63 New flower breeding mechanics
Simpler, fixed-probability-based, mutate into
nearby phenotypes only.  Mutation rate is
greatly reduced, should make flower breeding
into a challenging idle minigame.
2021-08-28 10:51:40 -04:00
Aaron Suen
5639ec773c Simplify early-game hints
Lock more things behind prerequisite hints, even if
they're not absolutely strictly necessary to complete
in that order, if they would commonly be done in
that order.  This reduces players being overwhelmed
by available hints very early in the game, and avoids
red herrings like "find lux" which can technically be
accomplished but yields no useful results until the
player can act on them.
2021-08-14 08:29:27 -04:00
Aaron Suen
0642839aea Simplify rush hitbox 2021-07-11 16:28:21 -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
e3337de123 Add "redecorate" cheat to add new flora to maps
Admins can fly around, pick spots for new flower/grass fields,
and then run this cheat command to spawn a bunch of the new
flora in the given area.
2021-07-08 07:23:10 -04:00
Aaron Suen
fbbf26566d Make sedge growing hint hintier. 2021-07-05 11:38:07 -04:00
Aaron Suen
215c2cd36e Flora hints 2021-07-05 11:34:33 -04:00
Aaron Suen
66cf1ab84e Nerf low-tier sedge drop rates 2021-07-01 22:18:55 -04:00
Aaron Suen
238af605ab Buff red flowers a little more 2021-07-01 22:16:50 -04:00
Aaron Suen
2e4dd80dcd Buff flower spawn rate 2021-07-01 22:16:25 -04:00
Aaron Suen
848910a992 Tweak plantlife destroyability
- Wilted flowers can be planted but will
  disintegrate if plucked.
- Flowers can be washed away by water.
- Destroying flowers/sedges uses the same
  particle effects as pumice.
2021-07-01 21:32:04 -04:00
Aaron Suen
503a967f30 Flowers wilt in stacks 2021-07-01 21:16:40 -04:00
Aaron Suen
f36714d946 Code format 2021-07-01 21:12:58 -04:00
Aaron Suen
2239c46a5e Better flower mutation success rate 2021-07-01 21:12:16 -04:00
Aaron Suen
6d3933cb7a Track flower mutations, radiation sensitivity 2021-07-01 21:07:08 -04:00
Aaron Suen
192c34250d More muted color palette 2021-07-01 20:20:48 -04:00
Aaron Suen
175ea6e036 Flower biasing tweaks
- Specific soil quality matters
- Bias toward "lower" shapes/colors
- Significantly cut normal mutation rate
2021-07-01 20:10:20 -04:00
Aaron Suen
be193e1a39 Basic flower node lifecycle
- Breeding and mutations
- Survival / wilting
- Only when in node form so far
2021-07-01 19:58:47 -04:00