Commit Graph

36 Commits

Author SHA1 Message Date
SmallJoker 67c01a44c2 Beds: Do not crash when placing in an unknown node 2017-08-10 10:08:24 +02:00
paramat eec1c5a03b Settings: Use new settings object 2017-05-24 07:18:26 +01:00
zaoqi 077316b4cd Use creative.is_enabled_for for creative mode if possible (#1558) 2017-03-29 21:02:26 +02:00
Auke Kok 78c632ebd4 Allow interaction with nodes while wielding these items.
- beds
- boats
- carts
- key/skeleton key
- seeds

All these had on_place handlers that did not allow nodes with
an on_rightclick() handler to be used first (if not using
sneak). This code is taken from the torches mod and applied
everywhere.

This allows all these items to e.g. be inserted into the `frame`
mod's item frames.
2017-02-28 18:16:12 -08:00
Baptiste Pouget 57eb906047 Add support for custom bed sounds 2017-01-12 12:42:38 -08:00
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
Auke Kok 75caa9167c Fix whitespace errors to silence luacheck.
Currently all minetest_game PR's are failing travis since the
upstream luacheck now also warns about whitespace issues, and
there are a few of those in the code. This fixes all of them
so we can yet again rely on luacheck.
2016-11-19 19:39:51 -08:00
cx384 23ba2d3a0c Add and edit fuel registrations
Edited fuels: fences, wooden ladder.
New fuels:
boat, paper, book, dry shrub, stick, vessels shelf, wooden tools,
wooden door, trapdoor, fence gates, farming crops, stairs, slabs, beds.
2016-11-02 13:04:25 +00:00
paramat 6171fb43f0 Change WTFPL to MIT (part 3)
Relicense WTFPL media to CC BY-SA 3.0.
Various corrections and edits.
2016-09-07 04:44:53 +01:00
paramat e9d26e2ee3 Licenses: Change WTFPL to MIT (part 1)
Part 1: All mods except default and xpanes.
Add license.txt files.
Add missing README.txt files.
Check and update copyright years for all contributors.
Improve text format and make more consistent.
2016-09-05 05:54:33 +01:00
SmallJoker ea49eb3f3d Beds, boats: Replace deprecated get_look_yaw/set_look_yaw 2016-07-27 21:39:22 +01:00
adrido d89bb69a22 Beds: Only register respawn callbacks if respawn is enabled 2016-07-15 22:00:57 +01:00
Tim 30b0a155fb Stop shadowing upvalues and definitions. 2016-07-15 21:58:49 +01:00
Tim 4473627de0 Remove unused and clean up missused variable-value assignments.
* Unused variables
* Unused values (assigned to variables, but overwritten before use)
* Defining already defined variables instead of reassigning to them.
2016-07-15 21:58:49 +01:00
tenplus1 d7a7456007 Beds: Save respawn position when entering bed, only read bed spawns once
No longer require night to be skipped for resawn position to be saved
Remove constant beds.read_spawns() calls when a player joins as this
is only required once
2016-07-13 14:45:30 +01:00
Tim 71c7e21669 Always return the leftover ItemStack for on_place and on_rightclick 2016-07-09 16:32:41 +01:00
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