18 Commits

Author SHA1 Message Date
FaceDeer
1f385fc84a add an API to allow other mods to test positions for the presence of caverns 2021-04-10 03:28:13 -06:00
FaceDeer
6cc2fe8fae fix a bug in how column decoration happens 2021-03-27 17:08:33 -06:00
FaceDeer
4b0ae3bce7 switch to the new mapgen_helper metrics function 2020-02-08 23:07:15 -07:00
FaceDeer
6940ae1585 remove deprecated function calls 2020-01-30 17:32:21 -07:00
FaceDeer
6662133650 free cave node array memory if a cave hasn't been generated in a minute 2020-01-28 22:57:30 -07:00
FaceDeer
bd5b1d22c8
"Overgenerate" caverns to open up border regions (#11)
Previously, only nodes strictly within the map block were being carved out as open space. This meant that multi-node decorations (such as giant mushrooms) would collide with walls and ceilings that would be carved out by adjacent block generation later, leaving them sliced off.

Now Subterrane carves out border regions too. Make note of the is_ground_content function, put all your decoration nodes into this to prevent them from being removed. Can't rely on just is_ground_function node properties for most situations, it's too simplistic.
2020-01-27 20:34:30 -07:00
FaceDeer
d10e0a6e5a
Major rewrite of the API to support more complex decoration methods. Old API still available in legacy.lua
This major rewrite grew out of a desire to be able to have stalactites placed according to a global noise function, which meant the whole decoration approach had to be changed to allow for data to be efficiently carried over between nodes. In the process I cleaned up a lot of old inefficient code, some of it written back when I was still learning LUA in general.

The legacy.lua file contains the old deprecated code so in theory any mods depending on subterrane should still function as they did before.
2018-12-29 12:56:30 -07:00
FaceDeer
4aaeaabc5f adding the option to define the old dripstone nodes 2018-05-23 23:54:23 -06:00
FaceDeer
234588dd08 reusing node definition table resulted in odd side effects 2018-05-19 17:05:43 -06:00
FaceDeer
eb1c26fcc5 plull flowstone out of library - shouldn't register nodes in here. 2018-05-19 17:05:43 -06:00
FaceDeer
36ac111eb5 add giant columns, and options for dealing with underground sea levels more cleanly 2018-05-19 17:05:43 -06:00
FaceDeer
9ee9187388 incorrect usage of 'vm:write_to_map(data)' 2017-12-10 17:25:07 -07:00
FaceDeer
84de29259e Mapgen defaults for fresh installs
A fresh install that had never had its mapgen flags tinkered with would
return nil when requesting them, which would normally mean "go with the
defaults." This mod overrides those defaults, so a fallback is needed.
2017-07-05 00:05:54 -06:00
FaceDeer
2355e2c86a disable mapgen caverns if subterrane is being used 2017-04-09 22:36:37 -06:00
FaceDeer
13fb066d0e memory optimization: buffers for noise values 2017-04-02 23:12:01 -06:00
FaceDeer
71424081eb remove more extraneous and old comments 2017-03-22 23:54:27 -06:00
FaceDeer
5b714d79d5 add simple method for decorating native tunnels 2017-03-22 00:36:25 -06:00
FaceDeer
b77e297302 Splitting out of Caverealms after extensive modification 2017-03-22 00:03:26 -06:00