1
0
mirror of https://github.com/minetest/minetest_game.git synced 2024-11-16 06:50:18 +01:00
Commit Graph

84 Commits

Author SHA1 Message Date
Auke Kok
7d93272caa Change how dirt turns to dirt_with_(something)
This changes how dirt blocks turn to dirt_with -grass, -dry_grass
or -snow.

Previously, dirt that was sunlit would turn to dirt_with_grass no
matter what, but this happened without any context, so you could
get green patches of dirt_with_grass in the middle of a savannah or
even desert.

Dirt no longer turns to covered dirt unless it's within 1 node from
another dirt_with_grass or dirt_with_dry_grass or dirt_with_snow.
This makes dirt_with_grass "growback" a lot slower, since it now only
happens on the edges, but it retains the context nicely now.

If there is any dirt with a grass or dry grass plant, or snow on top,
and enough light, we'll convert it sporadically to dirt_with_grass
or dirt_with_dry_grass or dirt_with_snow.

This allows us to plant grass of our choice in a large dirt patch,
or in a region where otherwise that type of grass is not present.

This used to be done by 2 abms, but I've combined them in to a single
ABM that is ordered to run with maximum efficiency, solving for the
most common outcome first before attempting more complex checks.
2016-04-16 19:27:34 +01:00
Auke Kok
64fe69f382 Remove "grass under snow" from default:dirt_with_snow in darkness.
This is technically "dirt with grass" that's just under a snow
cover, so in darkness the grass on these nodes will also die,
turning it into dirt.

This doesn't convert dirt_with_snow under snow.
2016-04-16 19:27:34 +01:00
paramat
14334a1d89 Default: Reduce sand footstep and dug sound gains 2016-03-25 13:15:22 +00:00
Auke Kok
d979293f14 Convert fences to NDT_CONNECTED.
This changes the drawtype of fences to NDT_CONNECTED nodebox drawtype.

These nodes are drawn by the client with the needed connections on
the fly as the scene is drawn. There is no logic needed by mods to
modify the nodes.

These fences connect to (1) other fences, (2) planks and (3) tree
trunks, but nothing else. They do not connect to stone, dirt, wool,
etc. This is done by the "connects_to" parameter, which takes groups
and node names.

Due to the way textures are wrapped, we can make these nodes look a
lot better by giving them a special tile.

This change requires minetest/minetest#3503.
2016-03-13 04:10:51 +00:00
MT-Modder
3a55e19055 Control leaf decay with sneak.
As requested by @paramat.
Leaves are preserved by default and only decay when using place + sneak.
2016-02-23 20:35:08 +00:00
paramat
7d2dfe4101 Consolidate ABMs
Spread ABM intervals evenly across 1 to 16 seconds
16s ensures no nodes are missed when player walks past
Adjust chance values to compensate, for identical action rates
Combine lavacooling ABMs into one, return to chance = 1
Grass growth: add 'neighbors = "air"' to avoid
processing the thousands of underground dirt nodes
Grass death: Reduce action rate to that of grass growth
Fire: Use chance = 1 for flame extinguishing
and flame removal when mod is disabled
2016-02-14 05:22:20 +00:00
Auke Kok
2f39cad09b Create API for fence.register, and use it.
This converts the call to minetest.register() for the default
fence node, so it can be called by other mods to quickly
setup other fences.

Since this creates an API, insert it into the game_api.txt.

The api looks like minetest.register(name, {def}), and has two
uncommon fields: "texture" and "material". Any normal nodedef
property can be passed through, except "drawtype". The "fence"
group will always be added.

The default fence recipe is modified to be as follows:
  wood, stick, wood
  wood, stick, wood

This recipe yields 4 fence nodes.

This allows us to create according recipes for acacia, pine,
aspen, and junglewood fences without adding new stick types:

  pine wood, stick, pine wood
  pine wood, stick, pine wood

This is a from-scratch implementation, written by heart but inspired
by (#665 - Add many wooden fences).

Stick and fences nodes are named in a consistent way.
2016-02-03 19:33:19 +00:00
paramat
e41a411f1c Default, fire: Disable catch-up in some ABMs
To avoid processing spikes where catch-up is non-essential
Disable in: Lavacooling, grass growing, grass removal
and all fire mod ABMs
2015-11-14 04:49:03 +00:00
paramat
2729777b94 Default/functions: ABM for mossycobble replacing cobble next to water 2015-10-25 23:11:29 +00:00
paramat
f4a412d9c1 Papyrus: Grow on dirt and grass only, remove from desert ocean 2015-10-05 01:47:37 +01:00
paramat
4d9b595a69 Default: Allow papyrus growing on default:sand
Mgv5/mgv7 papyrus schematic now has sand nodes as a base
Add sand beach to mgv5/mgv7 deserts
2015-08-31 22:58:33 +01:00
paramat
547a7b3304 Default/functions: Reduce lavacooling ABM/sound overload 2015-08-04 01:01:25 +01:00
paramat
6843ddb814 Default: Add savanna nodes, textures, crafting and fuels 2015-07-12 22:41:59 +01:00
paramat
f92d49feff Default/functions: Fix cactus growing by rotation again. Cleanup code 2015-06-08 00:32:40 +01:00
paramat
016fa0da40 Default/functions: Fix cacti not growing when rotation is 1-3 2015-06-07 04:39:25 +01:00
HybridDog
fe3c5a7090 allow overriding papyrus and cactus grow functions
dont grow cactus on a lying one

use minetest.get_node 2 times less

do a bit what ShadowNinja wrote

add comment

return true if the plant is set
2015-04-27 01:09:32 +01:00
Craig Davison
a9137e8c21 Fix typo in survival formspec & create legacy file 2015-02-12 22:18:22 +01:00
PilzAdam
2edfb55c29 Restructure default/nodes.lua 2015-01-10 15:47:30 +01:00
PilzAdam
2c0f716a13 Remove useless, empty callbacks 2015-01-10 15:47:29 +01:00
PilzAdam
9ec33f34f1 Set param2 to 1 if player places leaves 2014-12-06 20:36:20 +01:00
PilzAdam
2c2edfad04 Move leafdecay doc to game_api.txt 2014-12-06 20:36:20 +01:00
Craig Davison
128f0adb24 Fix some undeclared global variables 2014-11-30 18:02:33 +01:00
ShadowNinja
9670c27161 Clean up treegen code 2014-09-16 18:38:11 +02:00
Calinou
49a8ddc822 Make sand and some leaves sounds quieter 2014-08-22 11:52:51 +02:00
Casimir
9559f695ec Dig upwards for papyrus and cactus 2014-07-05 15:56:07 +02:00
PilzAdam
5d0795a1a7 Fix indentation, use log() instead of print() and use get_item_group() in tree growing ABM 2013-11-17 11:46:41 +01:00
4Evergreen4
3653859961 Add 6d facedir to logs. 2013-11-07 20:16:54 -05:00
BlockMen
9fdbc1f407 Fix tree growing and jungle sapling growth rate 2013-11-07 00:13:51 +01:00
HybridDog
6fed6867cb Add lavacooling sounds 2013-07-11 02:28:36 +02:00
PilzAdam
179f4c3f91 Use louder footstep sound as dug_node 2013-06-13 14:36:11 +00:00
Mitori Itoshiki
c3c5f8a228 New sounds 2013-06-12 22:38:40 +00:00
PilzAdam
31a74ede18 Replace minetest.env: with minetest. 2013-05-25 00:40:03 +02:00
PilzAdam
0dd813b5f8 Let apples fall when the tree is decaying 2013-05-21 18:50:39 +02:00
PilzAdam
ea6d504b01 Split init.lua into several files 2013-05-19 18:43:04 +02:00