Commit Graph

41 Commits

Author SHA1 Message Date
Vanessa Ezekowitz
6fd0df8b54 correct brain-o in the API humidity values 2014-08-24 00:35:09 -04:00
Vanessa Ezekowitz
27430814a0 allow multiple nodes to be specified as a table in the
nodes_or_function_or_model field of the mapgen register call
2014-08-22 23:31:30 -04:00
Vanessa Ezekowitz
9c7e96dd62 allow random_facedir parameter during mapgen call 2014-08-21 01:06:41 -04:00
Vanessa Ezekowitz
b914e5395b use set_node(), not add_node()
don't use minetest.env:* method (deprecated), use minetest.* instead
2014-08-15 19:34:15 -04:00
Vanessa Ezekowitz
a40599dfce Update API doc to match changes in the code
DEPRECATED:  Don't use strings to pass function names to the mapgen code,
use an actual function call i.e. my_code(pos) instead.
2014-05-24 19:58:20 -04:00
Vanessa Ezekowitz
064572c0a7 fix typo 2014-04-08 14:23:16 -04:00
Vanessa Ezekowitz
de6706e137 fix an old copy&paste error 2014-04-08 14:22:17 -04:00
Vanessa Ezekowitz
5f4c48a9aa fix old function name in API.txt intro 2014-04-08 14:10:19 -04:00
Vanessa Ezekowitz
199fa00b0b Added a couple features to the API to allow for turning off checking for air,
deleting nodes surrounding the spawn target during the mapgen code, replacing
the spawn target, and checking the type of node directly below the spawn
target.
2013-02-23 12:33:46 -05:00
Vanessa Ezekowitz
6d8ac194e2 Clarified API regarding spawn_tree() hooks. 2013-02-19 22:01:46 -05:00
Vanessa Ezekowitz
6bfb454178 routed spawn_tree() through a wrapper function so that other mods can hook into
plants_lib's calls to do something extra when a tree is generated at mapgen
time or spawned via the growing code.
2013-02-19 21:50:56 -05:00
Vanessa Ezekowitz
a86c52cfa8 changed perlin settings for humidity layer to match deserts
Thanks to paramat for spotting this!
2013-02-03 03:01:44 -05:00
Vanessa Ezekowitz
1554d8fcf4 another minor rewording of the api 2013-01-30 19:09:21 -05:00
Vanessa Ezekowitz
60ceed2eb1 left out a few commas in the API's tables (I want them to be easily
copied and pasted directly into one's code).
2013-01-30 18:55:40 -05:00
Vanessa Ezekowitz
ced39d9afb minor edit to api.txt 2013-01-30 18:46:34 -05:00
Vanessa Ezekowitz
572bd59e9b Rewrote parts of the API, expanded some stuff to make the whole thing easier
to read and more clear on what stuff means.
2013-01-30 18:35:59 -05:00
Vanessa Ezekowitz
8df8e44a0c add experimental support for calling an arbitrary function
in the spawning ABM after all other biome tests and general checks (aside from
spawning at the sides/bottom/top of a node) are done.
2013-01-29 16:22:33 -05:00
Vanessa Ezekowitz
320154a3a8 another wording tweak 2013-01-29 01:58:20 -05:00
Vanessa Ezekowitz
934e83f3a9 forgot to document the max_count variable. 2013-01-29 01:56:22 -05:00
Vanessa Ezekowitz
8015cc24a5 Added experimental settings to allow for a humidity perlin layer
and to allow the spawned object to *replace* the node it would otherwise
spawn on top of.

Also, extended API to allow for a node to be directly named in the
register_generate_plant() call.
2013-01-29 00:13:03 -05:00
Vanessa Ezekowitz
68a6ce43a7 Changed plants_lib API to require a table argument when not using legacy
calling options.  This opens the door for even more features in the future.
Changed flowers, junglegrass, poisonivy to match.

Made plants lib faster in some places, especially the surface-hunting
algorithm, and especially over water.  Fixed a few other misc. bugs.

Made growth code properly execute all biome-control code before executing
any string-named function or spawn_tree().

Tuned flowers settings.  Made flowers require at least some light to spawn,
made waterlilies require shallower water.  Fixed a bug in water depth detection
and made water depth depend on whether the bottom of the water area is dirt,
dirt with grass, or sand, rather than just anything.

Made waterlilies randomly rotate on spawning to break up the patterns (now has
16 orientations with the help of nodeboxes and facedir, requires only 3 new
nodes). Smoothed edges of the regular waterlily texture.  Made all flowers and
water- lilies spawn using only 3 ABM calls instead of 8.

Got rid of colon prefix node def overrides on all plants, since this is a
modpack now instead of an integrated mod.  Fixed a misspelled folder name for
poisonivy.

Fixed a bug in the wall detection routine - it returned the last wall found,
not the first.

Made the top-side-check for air only apply when spawning on top of the
target rather than its sides/bottom.

Many other features and enhancements have been made.  Too many to list here.
Please see API.txt for details.
2013-01-25 23:16:54 -05:00
Vanessa Ezekowitz
e327630ea5 Fixed a minor bug, made growing abm always check for grow_nodes
under the plant to be grown and to check for air above it.
2013-01-20 14:16:05 -05:00
Vanessa Ezekowitz
34b7ad4f32 Fixed a bug in direct growing of trees 2013-01-20 13:37:58 -05:00
Vanessa Ezekowitz
5abcd9034e Added random-number-based rarity control 2013-01-20 12:01:07 -05:00
Vanessa Ezekowitz
64731d8742 another minor wording change to account for an API bugfix 2013-01-20 01:26:11 -05:00
Vanessa Ezekowitz
3c9fcf3bfc Updated API.txt to accoutn for the latest updates 2013-01-20 01:23:39 -05:00
Vanessa Ezekowitz
21e43912ff tweaks to the documentation/comments for the mapgen function 2013-01-19 03:26:45 -05:00
Vanessa Ezekowitz
7db6ed7fb9 Documented the new mapgen-based spawn function. 2013-01-19 03:19:43 -05:00
Vanessa Ezekowitz
7dd3ec2525 Added a function to let one spawn plants at mapgen time,
but it's slow as molasses in January.  Not recommended for
general use yet.
2013-01-19 00:45:46 -05:00
Vanessa Ezekowitz
4eff513bbd Extended the API yet again, this time adding a Perlin-based temperature map
(two new variables defining min and max temperature, normalized to 0.53 = 0
degrees centigrade).

The values used for this new Perlin layer come from Splizard's Snow Biomes mod,
so other mods that use plantlife to create biomes should be able to blend
nicely with that mod.
2013-01-12 00:47:50 -05:00
Vanessa Ezekowitz
94770d713b extended the API again - this time adding a function to allow a custom check
for air surrounding the plant spawn location (defaults to 1, just the target
node).  Values of 1 and 9 for the two new variables would check the 3x3 area
around the spawn location.  Don't make these numbers too large or it will
slow the abm down.
2013-01-11 11:52:34 -05:00
Vanessa Ezekowitz
b0de25407d Expanded the API to allow for additional biome controls.
See API.txt for details.
2013-01-09 21:33:37 -05:00
Vanessa Ezekowitz
e2794f71f4 Added feature to API to allow for limits on spawning altitude also. None of
the included plants use this, it's mainly for the conifers mod.
2012-12-29 17:24:47 -05:00
Vanessa Ezekowitz
7006416227 finished splitting up the three components into separate folders, by moving
texture files to their respective components' folders (<f>/textures).  Also,
began working on extending the API for the growing code to allow for checking
for the height of a node.  Poisonivy is the only component that uses it for
now; this is more intended to be used with nature pack eventually.
2012-12-09 22:02:30 -05:00
Vanessa Ezekowitz
01270a26f0 minor tweak to API text to account for the renamed plants_lib module. 2012-12-04 19:39:42 -05:00
Vanessa Ezekowitz
2942f2366f Split the flowers/junglegrass/poisonivy components into separate folders,
leaving the plants folder as the primary API code and glue between them.  Any
of the three may be deleted to disable them if so desired.
2012-12-03 17:20:50 -05:00
Vanessa Ezekowitz
eb26c9d966 Fixed waterlilies to only grow in water about 3 nodes deep or less. Decreased
guard radius around them to allow them to get a bit more dense.  Decreased the
perlin limit slightly, makes the biomes a little bigger.
2012-12-02 19:22:33 -05:00
Vanessa Ezekowitz
46ae097460 one of the previous changes screwed up spawning jungle grass while trying to
fix the waterlily bug.  Reverted it.

This should, however, finally fix jungle grass turning into dry shrubs when it
shouldn't, and the list of growing surfaces seems to work properly now.  Will
fix the waterlily bug later.
2012-12-02 17:51:17 -05:00
Vanessa Ezekowitz
e3a9d05871 Fixed a bug in the placement of seaweed, fixing it extends the API slightly.
Updated API.txt accordingly.
2012-12-02 02:09:31 -05:00
Vanessa Ezekowitz
13534d1631 Explained a few of the spawn abm's defaults 2012-12-01 23:17:13 -05:00
Vanessa Ezekowitz
0f25c621fc Added API documentation. 2012-12-01 19:26:53 -05:00