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

13 Commits

Author SHA1 Message Date
paramat
58038a7941 Snappy group: Remove beds and cactus from group 2016-12-05 01:41:41 +00:00
paramat
09a229b412 Update 'nodeupdate()' to 'check_for_falling()' API 2016-11-22 05:55:36 +00:00
Tim
30b0a155fb Stop shadowing upvalues and definitions. 2016-07-15 21:58:49 +01:00
Tim
71c7e21669 Always return the leftover ItemStack for on_place and on_rightclick 2016-07-09 16:32:41 +01:00
Auke Kok
874b1ae326 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
2016-04-04 05:39:06 +01:00
Auke Kok
da0cc7f6f6 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)
2016-03-21 06:17:45 +00:00
Auke Kok
41c2b2aeea 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.
2016-03-18 02:35:07 +00:00
paramat
45bc0b245f Beds: Fix code style issues 2016-03-09 02:44:32 +00:00
paramat
4ef6810298 Beds: Re-add commas at list ends 2015-11-14 05:18:11 +00:00
Rui
1d8def5c06 Beds: Make non pointable by pointable definition 2015-11-14 04:49:22 +00:00
paramat
e15fde1624 Fix is_ground_content settings for nodes
Remove line if set to the default of 'true'
2015-06-18 02:25:02 +01:00
Novatux
2824562dc9 Add screwdriver callbacks, and code them for doors and beds 2015-05-14 10:24:56 +02:00
BlockMen
edb02e9d33 Add beds 2015-02-24 20:59:04 +01:00