198 Commits

Author SHA1 Message Date
Aaron Suen
db8f5c79b7 "Tickling" recipes for tree growth 2022-01-15 13:40:02 -05:00
Aaron Suen
acd4156ed8 Soaking "tickle" API, standardize particles 2022-01-15 13:29:50 -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
fde1d0ade7 Fix leaf decay check destoying loose leaves 2021-12-25 23:57:26 -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
2537bb7c27 Finish basic hint reform 2021-12-16 22:49:07 -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
0e96a579b1 Fix leaching hints 2021-12-12 00:33:17 -05:00
Aaron Suen
f5e966480b Fix delayed witness mis-ordering
Witness checks include data about the node in
place at the time that the witness even occurred,
so players are not awarded credit if the node they
see there was changed again afterwards.  A lot of
old witness code inserted the witness right
before the node was changed, since the node
change was done as a tail call, but this does not
work with delayed witnessing because the
delayed witness data would be tied to the old
node, not the replacement one.

Moving witness to after node setting should fix
a number of broken hints that should have been
delayed-witnessable, e.g. brick bonding.
2021-12-12 00:04:37 -05:00
Aaron Suen
c34bc39530 Soil leaching now requires raked soils
This is a design compromise to knock out the
worst offender in ABM cost, by requiring a node
that must be created by player action instead
of ubiquitous naturally-occuring nodes that all
need to be checked.

Leaching is really meant to be more of a minor
gameplay element anyway, for either skyblock
purposes, or for people who are bored enough
that they want to take on a challenge like a
neutral eco footprint; most normal players just
gather the materials from mapgen and hardly
bother with leaching recipes anyway.
2021-12-11 11:25:18 -05:00
Aaron Suen
7db1beee70 Add raked dirt and humus
These also function as "farmland", as raking enhances
the nutrient bioavailiability.
2021-12-08 22:30:50 -05:00
Aaron Suen
57ded7744d Humus is not interchangeable with dirt
This probably breaks using humus as a substitute for
dirt in making adobe, which is probably fine.
2021-12-08 22:06:24 -05: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
b2269d4424 Fix opaque leaves appearance
Draw faint (and code-configurable) outlines
of leaves when opaque, and don't let
texture_clean_transparent completely fill
in the gaps with green.
2021-08-19 00:48:14 -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
d7dbde8765 New stackapply recipe type
For "applying" an item to a stack using right-click.
So far, replaces the old eggcorn planting recipe; to
be done include tool stone-tipping and adze
graveling.

Using the new recipe allows more inversion of control
/ dependency injection, so we don't have to override
on_place or on_rightclick in definitions anymore, and
stop having to recreate some of the base logic from
the crafting system, e.g. discovery, placement sounds.
2021-08-14 08:01:50 -04:00
Aaron Suen
135701f4f8 Remove soaking neighbor checks
These cause some issues, like the ability to soak
dirt under water for a short time to initialize the
soaking metadata, then remove the water flow,
then add it in and have leaching complete instantly
because the neighbor check prevented the soaking
ABM from firing to detect that the water was
removed.

In the course of investigating why ABMs are so slow
to begin with, it was discovered that having neighbor
checks can slow an ABM down by a factor of something
like 7x, so clearly the assumption that the neigbor check
being done in C++ as "efficient" was false.  This means
that we may be better off just always firing the ABM and
letting Lua check only a couple of relevant nodes (e.g.
for water flows in the space above) instead for
performance.

The main performance concern was dirt leaching, since
dirt generates naturally in the world in bulk, but if the
single check for water above may be faster than checking
all 26 neighbors in C++ anyway, we might as well let the
soaking API run for it so that it can detect the water having
been removed and reset the counters.
2021-07-10 11:23:09 -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
e6463eb259 Rush spreading and refinements 2021-06-28 21:05:31 -04:00
Aaron Suen
3dd945085e Remove the txp_* overlay image feature
- For inventory and wield images, this is already
  possible via override.txt since 5.3.
- For special tiles, this will be possible in 5.4.
- This complicates things, and introduces warning
  messages into mods built without awareness of
  this feaure.
- As far as I know, no texture packs have actually
  ever used this feature.
2021-04-11 10:42:27 -04:00
Aaron Suen
95f0fb0ee9 Heaviest image compression option 2021-03-09 08:33:58 -05:00
Aaron Suen
410ebd5d8d Recompression using ECT
https://github.com/fhanau/Efficient-Compression-Tool
2021-03-09 08:16:23 -05:00
Aaron Suen
6b5f7e9ace Higher-quality soil gives eggcorns a boost
Just as surrounding sprouts with higher quality
soil causes them to mature faster, planting them
direcly in higher-quality soil gives them a oneshot
boost (since the soil quality is consumed
immediately).
2021-03-02 20:09:19 -05:00
Aaron Suen
c10e80ef87 Set name in mod.conf as demanded by 5.5+ 2021-03-01 20:10:27 -05:00
Aaron Suen
7a21096731 Accelerate leaf decay
When leaves decay, they accelerate checks for
decay of nearby leaves, so overall tree leaves
decay much faster, but without increasing load
at steady-state i.e. for stable trees.
2021-02-28 16:45:02 -05:00
Aaron Suen
3548dc9c12 Fix loose humus repose bug 2020-12-31 09:51:29 -05:00
Aaron Suen
aebc0c6124 Expand stickwork selection hulls 2020-09-16 20:18:15 -04:00
Aaron Suen
95d0368f46 Tree and writing hints 2020-09-05 21:51:10 -04:00
Aaron Suen
18b01c1ae7 Redistribute hints into each mod
Hints themselves have not been tided up
much, but this makes the project of fixing the
hints for each mod a little more manageable
and breaks up the hard-to-navigate single
monolithic hints file in the old guide mod.

The old guide mod has now been completely
retired.  Hints are now a full-fledged API-layer
standard feature.
2020-09-04 19:07:45 -04:00
Aaron Suen
edea123a1e Start on new unified Hint API
- Move hint handling down to API layer
- Simplify stat data; old nc_stats counting can
  be moved out to a separate mod.  We only
  need whether the player has seen or not.
- Invert inventory tab responsibility.
- Merge witness system in from crafting.

TODO:
- Redistribute hint registration responsibility
  to individual mods.
- Test external mod compat.
- Retire old nc_stats and nc_guide systems.
- Add a way to reset hints.
2020-09-04 16:28:27 -04:00
Aaron Suen
78d321c24f Support explicit TP overrides for special_tiles
Hughes Ross has started to work on a PR for this
(https://github.com/minetest/minetest/pull/10140)
but it doesn't look like it will be ready until 5.4 at
least, and we will support pre-5.4 versions for
some time yet.  The ability for TP artists to
override special_tiles is necessary to allow things
like flowing liquid textures to be customized in
texture packs.

Add a hack for these, similar to how we did the
inventory/wield image hacks.

Note that we are also forcing overrides for special
tiles, since there may be cases where we reuse a
base image without modifiers but TP artists may
still want an independent override.
2020-07-04 19:25:37 -04:00
Aaron Suen
b2f78c0daa Indexing for craft checks
By restricting the recipes we check based
on the name of the central object being
checked, we can do many fewer craft
checks per item and avoid expensive
checks.
2020-06-27 12:20:35 -04:00
Aaron Suen
42f125c716 Make most recipes indexable
Register a "rootmatch" property for all
recipes that represents a broader, quicker
test for recipe eligibility.  False positives are
allowed but false negatives are not.

Since most recipes are eligible, we can
use this to build an index for fast lookups
of subsets of recipes to run and skip most
of the other ones.
2020-06-27 11:06:43 -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
ec822aa034 Optimize leaf decay check with caching 2020-06-17 00:54:21 -04:00
Aaron Suen
e1e92224b7 Nerf leaf decay speed to conserve ABM power 2020-06-16 21:56:23 -04:00
Aaron Suen
de22a58162 Fix eggcorn planted falling visual 2020-06-10 00:59:48 -04:00
Aaron Suen
2110bbba37 Nerf tree growth rate 2020-06-09 19:25:29 -04:00
Aaron Suen
6c640a11b1 Validate log message levels 2020-06-09 19:02:07 -04:00
Aaron Suen
a998009656 Merge branch 'master' of gitlab.com:yamanq/nodecore into dev 2020-06-09 18:57:34 -04:00
Aaron Suen
3986ee1502 Tweak eggcorn placement clent prediction
Place as an empty stack node (soon to be
replaced by the server as a non-empty one
anyway) so laggy clients can right-click with
dirt earlier.

This should mitigate Kimapr's high-latency
mass tree farming woes...?
2020-05-31 17:11:40 -04:00
Yaman Qalieh
a8147e9875 Add levels to log messages 2020-05-27 14:04:00 -04:00
Aaron Suen
94129d5067 Hack to let TP authors override inv/wield images 2020-04-05 20:35:51 -04:00
Aaron Suen
0012c2673b More scaling time definitions
Also, scaling_time completely overrides
group-based scaling time logic.
2020-03-29 08:13:41 -04:00
Aaron Suen
e7846c9348 Refac HUD api, reduce chat_send usage 2020-03-25 08:49:34 -04:00
Aaron Suen
0cb72f7f2b Updated code standards. 2020-02-27 19:11:12 -05:00
Aaron Suen
6db8d9fc26 Adjust things to work in twilight.
- Lenses no longer produce light from sun at all;
  artificial light is always needed.
- Grass and trees survive, don't do dual-time check.
- Breeze sounds work in twilight.
- Sponge drying only requires twilight, now also can
  happen under artificial light.
- Peat to grass happens under twilight.
2020-02-22 16:55:42 -05:00
Aaron Suen
c7a322941e Experimental new natural light system.
- No day/night cycle, no sun/moon.
- Get rid of clouds too.
- Skybox is now 100% texture-packable.
- Natural light diminishes with depth.

Night-time no longer disrupts gameplay topside, but
skylights are no longer useful to an infinite depth and
artificial light is necessary for all deep mining.
2020-02-22 10:38:03 -05:00
Aaron Suen
2c91f8f95d Make the log top a little less extremely square. 2020-02-20 02:21:33 -05:00
Aaron Suen
e19c9a8283 Reoptimize image. 2020-02-18 22:12:38 -05:00