Commit Graph

19 Commits

Author SHA1 Message Date
tenplus1
dc7cbdd5ab Beds: Quicker saves with tidy output
Tweaked the beds.save_spawns() function to compile list then output
to file with shortened co-ordinates containing 1 decimal place
2016-04-29 23:18:05 +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
Marcin
b292975fbc Use PI variable rather than unclear constant 2015-10-20 00:26:19 +01:00
paramat
8e51f318b3 Rename to Minetest Game
Rename in game.conf and documentation
Update game_api.txt documentation for bucket API and tree functions
Fix tab, space and comment formatting in game_api.txt
Rename in mod READMEs
2015-09-30 23:33:12 +01:00
LeMagnesium
279b85fc45 Add option to disable bed's night skip - Solve second point of #512 by adding a setting, enable_bed_night_skip , with default value of true. 2015-09-29 01:25:40 +01:00
Craig Davison
b6c12010b1 Remove beds/Changelog.txt & farming/API.txt
- beds/Changelog.txt probably won't be updated because http://dev.minetest.net/Changelog is used instead
- The information in farming/API.txt is already documented in game_api.txt
2015-09-14 23:08:52 +01: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
3669ca0a83 Make beds not skip night if nobody is online 2015-05-14 14:41:26 +02:00
Novatux
2824562dc9 Add screwdriver callbacks, and code them for doors and beds 2015-05-14 10:24:56 +02:00
BlockMen
41837e6193 Fix beds respawn settings check 2015-03-06 19:29:16 +01:00
kilbith
86e0e4b2bf Remove undeclared writing variable 2015-03-06 11:49:22 +01:00
BlockMen
2a6050e552 Add option to disable bed respawn, better recipe for fancy bed 2015-03-06 10:46:05 +01:00
BlockMen
ea7b04a712 Use only red and white wool for beds 2015-02-24 21:55:14 +01:00
BlockMen
edb02e9d33 Add beds 2015-02-24 20:59:04 +01:00