oweals/minetest_game.git
8 years agoTNT: Spacing / codestyle fixes
Auke Kok [Sun, 13 Mar 2016 06:48:52 +0000 (22:48 -0800)]
TNT: Spacing / codestyle fixes

- Fix spacing errors around = and ..
- Indentation fixes
- Break up long lines

8 years agoMake TNT faster by using `VoxelManip()` for removing nodes.
red-001 [Sun, 31 Jan 2016 19:42:07 +0000 (19:42 +0000)]
Make TNT faster by using `VoxelManip()` for removing nodes.

8 years agoFix TNT mod calculate blast intensity.
red-001 [Wed, 27 Jan 2016 16:33:32 +0000 (16:33 +0000)]
Fix TNT mod calculate blast intensity.

Currently the TNT mod uses a dummy vaule of 1 for this.

8 years agoAdd TNT API.
red-001 [Fri, 1 Jan 2016 22:49:32 +0000 (22:49 +0000)]
Add TNT API.

8 years agoTNT: add some depth to the explosion effect
Auke Kok [Mon, 25 Jan 2016 07:48:38 +0000 (23:48 -0800)]
TNT: add some depth to the explosion effect

We add a dirt-like particle (drawn from scratch, uses some
colors from default_dirt's palette) to spawn many particles
that have collision enabled around the center of the blast.

This has the effect of obscuring the center of the blast, as
that is a painfully visible empty area when the explosion happens,
as there's only a little spark.

The dirt particles bounce around the walls and floor a bit,
and disappear rapidly, well before the smoke particles disappear.

This is a nice visual distraction that obscures the sudden
appearance of the gaping hole, and makes it a whole lot more
believable.

8 years agoMake TNT a bit more fun.
Auke Kok [Mon, 25 Jan 2016 07:27:50 +0000 (23:27 -0800)]
Make TNT a bit more fun.

But not too much.

TNT is a bit underwhelming at the moment. We can make it a bit
more interesting by ejecting not just one or two itemstacks,
but a bunch of them. This code splits up the drops into
separate itemstacks that are 2-5 items together, which
results in generally roughly 10 itemstacks being ejected.

Since now we have multiple ejecta, it makes sense to tune
the ejecta velocities a bit better to get the appearance of
an actual explosion better. The items will not all start
with the same vertical velocity, since that would look
like fireworks. Instead we give them all a different vertical
speed.

8 years agoAllow the on_blast API to pass an itemstack.
Auke Kok [Tue, 26 Jan 2016 06:27:15 +0000 (22:27 -0800)]
Allow the on_blast API to pass an itemstack.

If the node is special and has an on_blast() handler, we need
to call it instead of getting node drops manually. However, we
do want to know if drops should be added for the special nodes,
so we modify the on_blast() handler code to allow the nodedef
handlers to pass back itemstacks. This could be used by e.g.
the doors mod to drop door items after a blast.

Since this API is documented in lua_api.txt, a separate PR will
be incoming to update the on_blast() documentation.

8 years agoRemove composed shelf side.
Auke Kok [Wed, 13 Apr 2016 00:28:30 +0000 (17:28 -0700)]
Remove composed shelf side.

Don't compose the shelf side texture. The texture isn't transparent,
and unlikely to be in any case.

8 years agoBooks: Split text per page relatively to number of lines
kilbith [Sun, 10 Apr 2016 19:29:02 +0000 (21:29 +0200)]
Books: Split text per page relatively to number of lines

8 years agoFlowers: Fix itemstack when waterlily is placed
kilbith [Fri, 8 Apr 2016 12:29:48 +0000 (14:29 +0200)]
Flowers: Fix itemstack when waterlily is placed

8 years agodefault: Strengthen obsidian glass Remove group 'oddly_breakable_by_hand'
tenplus1 [Wed, 17 Jun 2015 17:07:55 +0000 (18:07 +0100)]
default: Strengthen obsidian glass Remove group 'oddly_breakable_by_hand'

8 years agoFlowers: Cleaning of waterlily's placement 1028/head
kilbith [Thu, 7 Apr 2016 11:10:18 +0000 (13:10 +0200)]
Flowers: Cleaning of waterlily's placement

8 years agoFarming: Override dirt_with_dry_grass to enable cultivation
paramat [Wed, 6 Apr 2016 21:52:53 +0000 (22:52 +0100)]
Farming: Override dirt_with_dry_grass to enable cultivation

8 years agoDefault/mapgen: Denser rainforest, fewer logs
paramat [Tue, 5 Apr 2016 16:01:15 +0000 (17:01 +0100)]
Default/mapgen: Denser rainforest, fewer logs

8 years agoCreative: Add myself in credits
kilbith [Sat, 2 Apr 2016 23:39:28 +0000 (01:39 +0200)]
Creative: Add myself in credits

Some people borrowed the creative code for their sub-games with an exclusive attribution to celeron55.

This is frustrating since I've largely rewritten, redesigned and carefully maintained this mod for the last months.

I expect to be credited.

8 years agoFlood snow with either lava or water.
Auke Kok [Sat, 2 Apr 2016 19:14:18 +0000 (12:14 -0700)]
Flood snow with either lava or water.

Fixes #1005

This doesn't flood snow or ice blocks.

8 years agoFix doors disappearing while underwater
tenplus1 [Fri, 1 Apr 2016 10:34:28 +0000 (11:34 +0100)]
Fix doors disappearing while underwater

Currently any doors viewed from underwater will disappear but removing the line 'use_texture_alpha = true,' seems to fix this.  Thanks to Thomas-S for finding this glitch.

8 years agoBeds: Check for buildable_to for bottom half
Auke Kok [Thu, 31 Mar 2016 14:21:40 +0000 (07:21 -0700)]
Beds: Check for buildable_to for bottom half

We properly checked top half already, just not the top half
target location.

Assure both checked positions are not unknown nodes.

Fixes #991

8 years agoBoats: Optimize, re-UV unwrap.
Auke Kok [Wed, 30 Mar 2016 04:46:46 +0000 (21:46 -0700)]
Boats: Optimize, re-UV unwrap.

The boat model had over 1700 tris (!) before this redo. I've reduced
the amount of tris to ~150, which is very reasonable given that there
are almost 45 faces to this model.

I've also spent a good hour re-UV unwrapping the entire model which
has a huuuge impact on the boats' appearance. As much as possible,
the boat now looks like it's made out of actual blocks of wood,
and I've even attempted to make the grains connect around edges,
appear in the same pattern and spacing, and generally make it look
like it's just a nice crafted thing out of several pieces of wood.

I've had to tweak the rudder part to make the texture actually have
square texture pixels. I did that by varying the vertical position of
the botton of the rudder handle and the top of the rudder bottom, which
worked well. I also had to 'slice' the rear face of the boat to prevent
a strange texture tear, probably due to non-flat surface somewhere,
but I couldn't spot the issue there anymore after adding 2 extra edges.

This looks totally like a new boat now.

 - http://i.imgur.com/stiVzsa.jpg

8 years agoFire: Use get_item_group instead of get_node_group
Rui [Wed, 30 Mar 2016 03:32:53 +0000 (12:32 +0900)]
Fire: Use get_item_group instead of get_node_group

8 years agoStart timer as well when moving items around.
Auke Kok [Sun, 27 Mar 2016 23:50:55 +0000 (16:50 -0700)]
Start timer as well when moving items around.

It's possible to hit this when using an e.g. charcoal mod
where a tree is both a fuel and a source.

8 years agoAdd recipe to craft clay block back into lumps
tenplus1 [Fri, 25 Mar 2016 20:18:24 +0000 (20:18 +0000)]
Add recipe to craft clay block back into lumps

Added a recipe to craft a clay block back into 4 clay lumps.

8 years agoShelves: Fix listring functionality + code cleaning
Jean-Patrick Guerrero [Wed, 23 Mar 2016 18:48:22 +0000 (19:48 +0100)]
Shelves: Fix listring functionality + code cleaning

8 years agoDefault: Reduce sand footstep and dug sound gains
paramat [Thu, 24 Mar 2016 03:00:43 +0000 (03:00 +0000)]
Default: Reduce sand footstep and dug sound gains

8 years agoBooks: Ensure backward compatibility for older written books
Jean-Patrick Guerrero [Wed, 23 Mar 2016 18:31:25 +0000 (19:31 +0100)]
Books: Ensure backward compatibility for older written books

8 years agoFire: Allow placing only above flammable blocks
Jean-Patrick Guerrero [Mon, 21 Mar 2016 15:16:29 +0000 (16:16 +0100)]
Fire: Allow placing only above flammable blocks

8 years agoRename Glass Door (the obisian one) to Obsidian Glass Door
Rui [Tue, 22 Mar 2016 07:26:36 +0000 (16:26 +0900)]
Rename Glass Door (the obisian one) to Obsidian Glass Door

8 years agoBooks: Move page buttons at the bottom
Jean-Patrick Guerrero [Mon, 21 Mar 2016 19:37:35 +0000 (20:37 +0100)]
Books: Move page buttons at the bottom

8 years agoWooden Sign: Add group oddly_breakable_by_hand
Jean-Patrick Guerrero [Mon, 21 Mar 2016 10:25:25 +0000 (11:25 +0100)]
Wooden Sign: Add group oddly_breakable_by_hand

8 years agoDefault: Make some plant nodes non-flammable
paramat [Mon, 21 Mar 2016 09:23:12 +0000 (09:23 +0000)]
Default: Make some plant nodes non-flammable

8 years agoDefault: Fix rotation errors for mapgen aspen and sapling jungletree
paramat [Mon, 21 Mar 2016 08:03:52 +0000 (08:03 +0000)]
Default: Fix rotation errors for mapgen aspen and sapling jungletree

8 years agoDoors: Allow schematic placement of wooden doors.
Auke Kok [Mon, 21 Mar 2016 06:48:16 +0000 (23:48 -0700)]
Doors: Allow schematic placement of wooden doors.

If LVM or some other nonmetadata method is used to place a door,
then metadata is missing that tells us whether the door is left
or right-hinged.

However, we can detect that nodemeta is missing and see if the node
name is _a or _b. In the case of _a, nothing needs to be done and we
can just open the door. In the case of _b we assume the door is right
hinged, and tune the state nodemeta value so that the door opens the
right way. This all of course assumes that the schematic method places
the doors *closed* by default, which is reasonable.

8 years agoCreative: Code cleaning + Fix items moving in virtual inventory
Jean-Patrick Guerrero [Wed, 16 Mar 2016 23:11:44 +0000 (00:11 +0100)]
Creative: Code cleaning + Fix items moving in virtual inventory

8 years agoChanges to Screwdriver to add new drivers.
tenplus1 [Thu, 3 Mar 2016 10:18:41 +0000 (10:18 +0000)]
Changes to Screwdriver to add new drivers.

A few screwdriver changes so that mod makers can add new screwdrivers with different wear levels.  Tried and tested with new diamond screwdriver :)

8 years agoFire: Speed up fire spread and burn out
paramat [Sat, 19 Mar 2016 20:49:29 +0000 (20:49 +0000)]
Fire: Speed up fire spread and burn out

8 years agoBeds: priv/griefing fixes.
Auke Kok [Sat, 19 Mar 2016 01:55:56 +0000 (18:55 -0700)]
Beds: priv/griefing fixes.

- disallow placing beds in protected areas
- fix rotation of beds(broken after 41c2b2ae)
- allow using others' beds, but don't change spawn location

Fixes #953. #943 isn't something I think was ever implemented, and
this does a fair job of addressing the main concern (spawning in
others' houses)

8 years agoBooks: Add support for multiple pages
Jean-Patrick Guerrero [Wed, 16 Mar 2016 21:01:14 +0000 (22:01 +0100)]
Books: Add support for multiple pages

8 years agoAllow for shift+clicking inventory from bones
Rui [Wed, 16 Mar 2016 11:10:25 +0000 (20:10 +0900)]
Allow for shift+clicking inventory from bones

8 years agoDoors: Allow falling nodes to fall onto doors.
Auke Kok [Tue, 15 Mar 2016 04:27:32 +0000 (21:27 -0700)]
Doors: Allow falling nodes to fall onto doors.

We were cleverly attempting to use an airlike node as the
top half of the doors, but as airlike nodes are not walkable,
falling nodes would not stop falling and thus remain an entity
stuck on top of a door.

After inspecting the builtin/game/falling.lua code, I considered
the remaining options: (a) revert doors such that the top part is
actually the door, (b) play with nodedef fields and see if other
flags may work, or (c) modify the hidden door part to another
drawtype that properly prevents this issue.

(a) seemed way over the top for now, although it would solve the
issue, it would cause a rewrite of most of the code including the
old-door-conversion.

(b) turned up nothing.

(c) turned out to be relatively simple.

So, here's the implementation where I turn the hidden door top
into a tiny, non-targetable but walkable nodebox that is entirely
inside the door hinge. It's entirely transparent, so you still
can't see it, can't hit it, nor can you place anything in it or
make liquids flow through it. The top part is placed in the right
position on placement and not touched further.

Falling nodes will properly stop on top of these doors. I've
adjusted the door conversion code to properly account for the
issue as well, so the only thing remaining is people who have
been running a git branch - those can upgrade by re-placing the
door.

8 years agoCreate API for registration of fence gate.
Rui914 [Fri, 18 Mar 2016 07:33:14 +0000 (16:33 +0900)]
Create API for registration of fence gate.

8 years agoRename argument to priv check
James Stevenson [Wed, 16 Mar 2016 18:34:07 +0000 (14:34 -0400)]
Rename argument to priv check

Fixes crash when punching bones not owned by you, and may resolve https://github.com/minetest/minetest_game/issues/940

8 years agoWalls: Don't connect to group:cracky
Auke Kok [Wed, 16 Mar 2016 14:22:34 +0000 (07:22 -0700)]
Walls: Don't connect to group:cracky

the ```group:cracky``` group contains all sorts of odds and ends
nodes that we shouldn't connect to. There are a few nodes that
walls now no longer connect to, that probably should get
```group:stone``` added, or something similar, though.

8 years agoAllow digging of protected doors with "protection_bypass"
Auke Kok [Wed, 16 Mar 2016 05:49:20 +0000 (22:49 -0700)]
Allow digging of protected doors with "protection_bypass"

This was probably lost in either the API rewrite or a merge/rebase.

Fixes #929

8 years agoRe-export character.b3d without texture linkage.
Auke Kok [Wed, 16 Mar 2016 05:18:49 +0000 (22:18 -0700)]
Re-export character.b3d without texture linkage.

I've created a modified B3Dexport.py version that automatically strips
the embedded texture link to external texture files. These links were
causing the engine to spew "can't find character.png" messages on the
console, but were harmless due to texture loading being done by the
client side and not through irrlicht.

I previously moved character.png to /textures/, which is wrong. I now
understand that character.png was in the same folder as character.blend
simply to make blender load the texture from the embedded linkage
automatically. Nothing more, nothing less.

Subsequently the character.png file should just sit in convenience
in the /models/ folder with the blend file, and not in the textures
file. This patch moves it back. And yes, minetest does load the
character.png from this path.

8 years agoAllow both sides of the bed to be digged up.
Auke Kok [Sat, 12 Mar 2016 07:21:56 +0000 (23:21 -0800)]
Allow both sides of the bed to be digged up.

Tested with nodebreaker, fire.

If called from lua, minetest.remove_node() calls on_destruct() callbacks
before the map is actually updated. This means that we can't look at the
map data to determine if we're done cleaning up adjacent nodes, and we
have to stop recursing some other way.

There's no data we can pass around through functions that would survive
scope to a secondary on_destruct() callback, so we have to maintain
local state somewhere in the mod namespace.

In this case, we keep a bitflag. The bitflag is set to "true" by
default. On the first half removal, the flag is flipped and afterwards
we remove the other half node. When the on_destruct for the other half
is running, it's value is false and we flip it back to true without
removing the other half node.

This thus prevents recursing.

To facilitate easier finding of the bed partner, we tell our on_destruct
whether we're a top or bottom half node through a passed flag.

Now that the top is diggable, we just need to assure that it drops a
bottom bed part.

8 years agoAdd steel door/trapdoor sounds.
Auke Kok [Sun, 6 Mar 2016 07:08:02 +0000 (23:08 -0800)]
Add steel door/trapdoor sounds.

I've found a favorable steel door sound from a parking garage
door that isn't abrupt or scary, just sounds like a nice solid
metal door. The sample had both opening and closing sounds, and
so they match nicely. Amplified and mixed several samples together
to reduce ambient noise, and get the right level compared to
wood doors. Attribution was added as well. CC-BY-3.0 sounds.

8 years agoDefault: Colourise desert cobble to be consistent with desert stone
paramat [Mon, 14 Mar 2016 13:26:38 +0000 (13:26 +0000)]
Default: Colourise desert cobble to be consistent with desert stone

Hue and saturation match desert stone and desert stone brick
Preserve original mortar colour

8 years agoDoors: Update glass door item textures to new design
paramat [Mon, 14 Mar 2016 13:12:39 +0000 (13:12 +0000)]
Doors: Update glass door item textures to new design

8 years agoFencegate: prevent y-fighting at top.
Auke Kok [Sun, 13 Mar 2016 20:42:24 +0000 (13:42 -0700)]
Fencegate: prevent y-fighting at top.

We raise the height of the fencegate node by 0.0001 to make the
fencegate post stop fighting with node blocks. This makes the
gate pole appear to be cut through the node, and doesn't leave
a gap when stacking fencegates, which would look odd.

8 years agoFire: Optimize spreading ABM.
Auke Kok [Sun, 13 Mar 2016 01:50:09 +0000 (17:50 -0800)]
Fire: Optimize spreading ABM.

No need to find_node_near twice with the same params.

8 years agoAdd flint and flint-and-steel
Jean-Patrick Guerrero [Fri, 11 Mar 2016 17:27:22 +0000 (18:27 +0100)]
Add flint and flint-and-steel

8 years agoClean up door tops if fire destroys bottom.
Auke Kok [Sat, 12 Mar 2016 06:11:39 +0000 (22:11 -0800)]
Clean up door tops if fire destroys bottom.

Fixes #909. Door tops are never flammable.

This doesn't guard yet against a voxelmanip removing the top node,
but that is less of an issue since if a voxelmanip removes the top,
then the bottom part remains functional and visibly intact. If the
voxelmanip removes the bottom part, but not the top, then this patch
makes it clean up the top just fine.

8 years agoFix bug rotating unknown node
tenplus1 [Fri, 11 Mar 2016 21:45:09 +0000 (21:45 +0000)]
Fix bug rotating unknown node

This fixes a bug what crashes game when rotating an unknown node.

8 years agoDye: Add global table of dye names and descriptions
paramat [Tue, 8 Mar 2016 02:40:45 +0000 (02:40 +0000)]
Dye: Add global table of dye names and descriptions

8 years agoDye: Make pink dye mixable
paramat [Tue, 8 Mar 2016 00:41:22 +0000 (00:41 +0000)]
Dye: Make pink dye mixable

Correct 2 inconsistent mixes
Clean up code style and vertically align mix table
Remove dyelocal and simplify table names

8 years agoAdd "protection_bypass" priv.
Auke Kok [Wed, 20 Jan 2016 14:29:48 +0000 (14:29 +0000)]
Add "protection_bypass" priv.

The access privilege allows players that have it to bypass protection
on locked doors/trapdoors, chests and bones.

The priv also allows bypassing any minetest.is_protected() check,
including digging nodes and placing them. It is meant for world
moderators to clean up and fix map issues.

Original patch by red-001. Split up and rebased/rewritten by sofar.

This patch requires https://github.com/minetest/minetest/pull/3800

8 years agoBasic stone walls, using NDT_CONNECTED.
Auke Kok [Tue, 12 Jan 2016 05:53:38 +0000 (21:53 -0800)]
Basic stone walls, using NDT_CONNECTED.

These basic connected wall nodes automatically connect
to neigboring stone blocks, other wall blocks and anything
that's "cracky". The do not connect to wood (fences will do
that).

The walls are generated using a new walls.register() API.
Documentation on the API is included in game_api.txt.

This change requires minetest/minetest#3503.

Walls are added for all cobble stone materials. They generally
look best and are the natural use cases for these materials.

8 years agoAdd a simple, but stylish fence gate.
Auke Kok [Fri, 26 Feb 2016 15:30:38 +0000 (07:30 -0800)]
Add a simple, but stylish fence gate.

This fence gate builds on NDT_CONNECTED by assuming fence nodes will
automatically connect to it's sides properly. The fence gate will
open and close just like doors, with sounds, but it only opens one
way. The gate sticks out quite a bit and can be bumped into, so the
fence may be used as some sort of path switch.

The fence gate offers no form of protection and can be opened and
closed by anyone. This is done on purpose - the fencegate isn't
meant to provide protection from players, as fences can be
trivially jumped over. Instead, these fences should be used for
protecting crops from hungry sheep, or keeping rabbits in their
pen, or just decoration. Mods can also modify the mod to add
protection, of course.

A recipe is added to make these. It's 4 sticks and 2 wood (any)
as follows:

  stick  wood  stick
  stick  wood  stick

The collision box of the open gate is such that if two gates are
connected but mirrored (making an M shape) then you can walk a large
entity that's larger than 1.0 wide through the opening. The gate of
an opened fence can also be stood upon or bumped into.

I've mixed together some sounds to provide a somewhat light sound
experience, one that one would expect from a small gate latching open
and close.

This change requires #873, otherwise it doesn't connect to fences.

8 years agoConvert fences to NDT_CONNECTED.
Auke Kok [Tue, 15 Dec 2015 05:49:20 +0000 (21:49 -0800)]
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.

8 years agoChange steel ladder sounds + fix/add missing recipes
Jean-Patrick Guerrero [Wed, 9 Mar 2016 10:08:41 +0000 (11:08 +0100)]
Change steel ladder sounds + fix/add missing recipes

8 years agoAdd an on_burn callback.
red-001 [Wed, 20 Jan 2016 22:18:03 +0000 (22:18 +0000)]
Add an on_burn callback.

8 years agoBeds: Fix code style issues
paramat [Tue, 8 Mar 2016 03:14:29 +0000 (03:14 +0000)]
Beds: Fix code style issues

8 years agoAdd steel sign + Update wooden sign texture
Jean-Patrick Guerrero [Sun, 6 Mar 2016 11:16:33 +0000 (12:16 +0100)]
Add steel sign + Update wooden sign texture

8 years agoDefault: New jungletree_top texture
paramat [Sun, 28 Feb 2016 18:28:53 +0000 (18:28 +0000)]
Default: New jungletree_top texture

8 years agoAdd steel ladder
Jean-Patrick Guerrero [Thu, 3 Mar 2016 09:52:45 +0000 (10:52 +0100)]
Add steel ladder

8 years agoFix markdown formating in `game_api.txt`.
red-001 [Thu, 3 Mar 2016 17:40:24 +0000 (17:40 +0000)]
Fix markdown formating in `game_api.txt`.

8 years agoDefault/craftitems: Fix whitespace and code style issues
paramat [Thu, 3 Mar 2016 03:41:50 +0000 (03:41 +0000)]
Default/craftitems: Fix whitespace and code style issues

8 years agoFix book formspec to word-wrap lines
tenplus1 [Wed, 2 Mar 2016 21:26:16 +0000 (21:26 +0000)]
Fix book formspec to word-wrap lines

Books still don't wrap long lines of text properly so until this has been sorted out I suggest reverting back to a previous working formspec which lets players read books properly until a fix is found (and maybe scrollbars added to texarea's).  Also adding a recipe to blank written books.

8 years agoAllow non-players to dig steel doors.
MT-Modder [Thu, 25 Feb 2016 23:16:39 +0000 (18:16 -0500)]
Allow non-players to dig steel doors.

8 years agoAllow non-players to dig locked chests.
MT-Modder [Thu, 25 Feb 2016 23:12:49 +0000 (18:12 -0500)]
Allow non-players to dig locked chests.

8 years agoAllow non-players to dig bones.
MT-Modder [Thu, 25 Feb 2016 23:05:23 +0000 (18:05 -0500)]
Allow non-players to dig bones.

8 years agoDocument `share_bones_time_early`
red-001 [Mon, 1 Feb 2016 19:27:17 +0000 (19:27 +0000)]
Document `share_bones_time_early`

8 years agoDoors: Prevent placement in protected areas.
Auke Kok [Mon, 29 Feb 2016 16:35:36 +0000 (08:35 -0800)]
Doors: Prevent placement in protected areas.

https://forum.minetest.net/viewtopic.php?f=42&t=1523&start=500#p208773

Currently, doors can be placed inside others' protected areas. We
need to check protection for both bottom and top halves.

8 years agoDefault: Add 'snowy pine tree from sapling' schematic
paramat [Thu, 25 Feb 2016 00:29:35 +0000 (00:29 +0000)]
Default: Add 'snowy pine tree from sapling' schematic

Add function to detect nearby snow to enable snow on sapling-grown pine trees
Correct 'place schematic' rotation parameters to "0" or "random"

8 years agoDefault/mapgen: Remove unnecessary spaces from log decorations
paramat [Wed, 24 Feb 2016 23:41:05 +0000 (23:41 +0000)]
Default/mapgen: Remove unnecessary spaces from log decorations

8 years agoDefault/mapgen: Make forest clearings larger and more common
paramat [Mon, 22 Feb 2016 20:38:00 +0000 (20:38 +0000)]
Default/mapgen: Make forest clearings larger and more common

In mgv5/v7/flat/fractal/valleys
Add missing noise parameters to pine logs for
density to vary in relation to pine tree density

8 years agoAdd item name to chest log messages
rubenwardy [Sat, 2 Jan 2016 12:04:31 +0000 (12:04 +0000)]
Add item name to chest log messages

8 years agoControl leaf decay with sneak.
MT-Modder [Mon, 22 Feb 2016 23:28:43 +0000 (18:28 -0500)]
Control leaf decay with sneak.

As requested by @paramat.
Leaves are preserved by default and only decay when using place + sneak.

8 years agoRemove dig_up() from cactus.
MT-Modder [Mon, 22 Feb 2016 17:19:41 +0000 (12:19 -0500)]
Remove dig_up() from cactus.

Digging a cactus leaves the branches hanging. With this change it will no longer happen.

8 years agoAllow mod namespace for door registrations.
Auke Kok [Sun, 21 Feb 2016 04:03:09 +0000 (20:03 -0800)]
Allow mod namespace for door registrations.

This is an adapted version of #861 - by oleastre

Most mods had been calling `doors.register_door() with a door
name that included the "modname:" prefix, and we should continue
to allow mods to do so, without registering the nodenames created
in the "doors:" namespace.

The default case is to use the "modname:" prefix verbatim. If
mods or code calls this function without a prefix, then "doors:"
is automatically used.

Now that the namespace is corrected, the copy replacement ABM is
no longer needed.

8 years agoFallback doors.register_door() code.
Auke Kok [Sat, 20 Feb 2016 07:32:43 +0000 (23:32 -0800)]
Fallback doors.register_door() code.

This function maps doors.register_door to the new API as far as
reasonable. We can't map the texture, so we fall back to a default
texture. An error message is printed if mod writers did not provide the
needed new tiles field for the door. The created doors are functional
and a full replacement. Old doors are replaced with the new ones
through an ABM.

8 years agoFix broken door protection.
Auke Kok [Sat, 20 Feb 2016 08:41:22 +0000 (00:41 -0800)]
Fix broken door protection.

A previous fix overwrote the `def` variable during registration,
causing protected doors no longer to be placed with protection.

8 years agoCreative: Rename fields with correct naming convention to avoid possible conflicts
Jean-Patrick Guerrero [Sat, 20 Feb 2016 12:24:29 +0000 (13:24 +0100)]
Creative: Rename fields with correct naming convention to avoid possible conflicts

8 years agoLower snow footstep and dig sound level.
Auke Kok [Mon, 18 Jan 2016 21:35:21 +0000 (13:35 -0800)]
Lower snow footstep and dig sound level.

These sounds were perceived to be too loud in the
game. I've lowered them significantly but they remain
plenty audible. The dig sounds were very loud as well
so I toned them down as well.

8 years agoMove character.png to textures.
Auke Kok [Fri, 15 Jan 2016 05:22:21 +0000 (21:22 -0800)]
Move character.png to textures.

This file is obviously out of place, as the engine does not
load textures, ever, out of a models folder.

8 years agoCall on_place_node() callbacks after placing door.
Auke Kok [Sun, 14 Feb 2016 20:21:51 +0000 (12:21 -0800)]
Call on_place_node() callbacks after placing door.

Other mods may depend on knowing whether doors are placed
to setup additional attributes or perform node manipulations.

This is something e.g. mesecons does to connect circuits
to doors. This was tested with mesecons. Placing a door next
to a mesecon wire will make the wire automatically
connect, which was otherwise not happening.

8 years agoOpen doors when right-clicking a door with a door.
Auke Kok [Sun, 14 Feb 2016 04:27:03 +0000 (20:27 -0800)]
Open doors when right-clicking a door with a door.

And similarly, if we wield a door and right click any node
that has an on_rightclick() handler, call the handler
instead.

Just to be on the safe side, assure that none of this
code runs when right-clicking an entity or player, which
would likely crash the server.

Fold in PR #831 as well - prevent server crash on door
place on unknown blocks, by @tenplus1.

8 years agoAllow building doors on buildable_to nodes.
Auke Kok [Sun, 14 Feb 2016 04:00:37 +0000 (20:00 -0800)]
Allow building doors on buildable_to nodes.

This code never allowed placing a door on e.g. a grass
plant. The code to handle this isn't that complex. With
this code, doors can be placed on flowers and on normal
node surfaces without issues.

8 years agoAdd background image to book formspec
MT-Modder [Sat, 13 Feb 2016 22:19:38 +0000 (17:19 -0500)]
Add background image to book formspec

8 years agoNew gravel texture.
Auke Kok [Mon, 1 Feb 2016 03:29:01 +0000 (19:29 -0800)]
New gravel texture.

Issue #811 - new gravel texture needed.

This texture was Gambits' PixelBOX gravel light texture. Gambit
posted that his texture pack is WTFPL:
- https://forum.minetest.net/viewtopic.php?f=4&t=4990&start=50#p141196

I've made significant modifications to this texture:
- slightly rotated and rolled some sections of pixels
- minor burn/dodge some pixels to keep high contrast
- removed lineair repeating effects
- etc.

Attribution is added back to Gambit. Thanks.

8 years agoDoors: Allow arbitrary recipe to be passed, even nil
Auke Kok [Sat, 13 Feb 2016 18:03:23 +0000 (10:03 -0800)]
Doors: Allow arbitrary recipe to be passed, even nil

This allows mod makers to register their own recipies, including
none, to register doors.

8 years agoFix character.b3d animation issues.
Auke Kok [Sat, 13 Feb 2016 17:45:42 +0000 (09:45 -0800)]
Fix character.b3d animation issues.

Both the standing and sitting animations had misplaced curve
cusps that caused the end part of the animation to wiggle the
feet slightly back and forward.

I've fixed both animations parts and re-exported. Verified in-game
with multiplayer that everything was indeed fixed.

8 years agoadded timer to tnt:tnt_burning for explosions
tenplus1 [Tue, 9 Feb 2016 21:34:03 +0000 (21:34 +0000)]
added timer to tnt:tnt_burning for explosions

By adding the timer to the tnt:tnt_burning node it will help mods add the block and cause an explosion after 4 seconds instead of doing nothing like in it's current state.

8 years agoRemove log_mods from TNT
Craig Davison [Mon, 1 Feb 2016 17:16:20 +0000 (17:16 +0000)]
Remove log_mods from TNT

This option is not documented nor is it used with any other mod in Minetest Game so why should it be used in TNT?

8 years agoConsolidate ABMs
paramat [Sat, 13 Feb 2016 08:33:58 +0000 (08:33 +0000)]
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

8 years agoDoors: fix unability to register doors outside of doors mod
Jean-Patrick Guerrero [Sat, 13 Feb 2016 10:30:21 +0000 (11:30 +0100)]
Doors: fix unability to register doors outside of doors mod

8 years agoRemove minetest.inventorycube
Rui [Thu, 11 Feb 2016 04:47:26 +0000 (13:47 +0900)]
Remove minetest.inventorycube

8 years agoConvert furnace ABM to node timer
Auke Kok [Wed, 10 Feb 2016 06:03:40 +0000 (22:03 -0800)]
Convert furnace ABM to node timer

Node timers are higher precision and a better guarantee
of happening at regular intervals, whereas ABM's may be
postponed, cancelled or missed if a player is too far.

The largest benefit is that once the furnace is done
cooking, no more ABM's are fired - the timer is stopped
instead and no more events are created until items
are put in the furnace.

This patch is larger due to the migration of the timer
function and indentation change as a result of the somewhat
reduced complexity. I've tested with several furnaces and
this works correctly and behavior is not affected, although
people may find that their furnaces now work more
regularly.

If you place several furnaces next to eachother, you will
still find all furnace timers firing exactly at the same
time. This is a bug in core that should not coalesce node
timers at second intervals.

8 years agoNew mesh door models, and extensive door API
Auke Kok [Sat, 16 Jan 2016 02:50:32 +0000 (18:50 -0800)]
New mesh door models, and extensive door API

This patch replaces the default door nodes with a new mesh model
and nodes.

Two new models were added that are 2 blocks high. One for left-hinge
and one for right-hinge doors. This allows us to make a single texture
fit on both models. The alternative would have been 1 model and 2
unmapped textures, which is more work for mod developers.

Doors work exactly like the old doors, including ownership, breaking
doors, opening and closing.

Under the hood, we can prevent the top part of the door from being
obstructed by placing an invisible node. This prevents liquids from
flowing through doors or people placing sand or other blocks in the
top half. The door code automatically places and removes these as
needed.

Metadata is used to store door state, just like the old version.

A doors API is added, it allows mods to use the API to open/close or
toggle door states without worrying about sounds, permissions and
other details. This is intended for e.g. mesecons. This API allows
mods to manipulate or inspect doors for players or for themselves.

In-game old door nodes are automatically converted using an ABM and
preserve ownership and orientation and state.

TNT blows up all doors and trapdoors except for the steel ones,
who can survive a blast. We return an itemstack in on_blast(),
which requires a TNT API patch which is also pending.

We enable backface culling for most of these doors, as this gives
the identical visual appearance that the old doors had. In the case
of the glass door, there's a slight twist.

The texture files used by the new doors have new names that do
not conflict with previous texture file names to avoid texture
pack conflicts.

Thanks to red-001 <red-001@users.noreply.github.com> for some
of the conversion code, cleanups, and extra textures.

8 years agoCreative: Extend search function to descriptions
Muhammad Rifqi Priyo Susanto [Thu, 4 Feb 2016 10:24:14 +0000 (17:24 +0700)]
Creative: Extend search function to descriptions