Commit Graph

131 Commits

Author SHA1 Message Date
Paramat da10af919e
Doors: New handle and hinges for glass door 2018-12-22 00:33:37 +00:00
Ryan Nolan bae58b3806 Doors: Allow on_rightclick to be overidden
Allow mods such as protection mods to over ride on_rightclick.
Usecase is creating shared doors without the need for keys.
2018-12-20 22:45:24 +00:00
sofar 667e130c52 Prevent crash if some mod inadvertently allowed doors to rotate 2018-12-06 23:29:43 +00:00
SmallJoker ad486bc863 New glass, glass stair/slab, and glass door textures 2018-11-02 17:22:54 +00:00
paramat d5907d5f1e Doors: Avoid crash on nil player in 'can dig door' 2018-02-03 03:54:03 +00:00
DTA7 a2d7678ffd Add nil checks for placer 2017-11-15 23:16:28 +00:00
sfan5 bf8404fcf7 Doors: Same prediction change for trapdoors
Forgot this in the last commit, thanks @Fixer-007
2017-09-12 00:28:29 +02:00
sfan5 edba1dcb02 Doors: Disable client dig prediction for protected doors 2017-09-11 21:35:28 +02:00
Ezhh 40ed77185e Improve node descriptions (#1834) 2017-07-23 10:26:10 +02:00
DS-Minetest 2e413b521a Add backface_culling to open chests and fencegates 2017-07-02 11:32:34 +01:00
Ezhh 3d1fc42f66 Make sapling, leaves and fence descriptions consistent (#1795) 2017-06-25 11:19:12 +02:00
DS-Minetest 7e9c5a3576 Doors: Avoid white particles when digging wooden trapdoor
Alter the wooden trapdoor side texture, replacing the white area with a
repetition of the wood pixels.
It is now consistent with the steel trapdoor side texture.
2017-06-08 15:52:31 +01:00
MrIbby 18956c7f69 Change "Junglewood" to "Jungle Wood" 2017-06-03 11:55:13 -04:00
Auke Kok 4ec0fd974b Doors: place sound when placing a door.
Due to door items being the thing that's placed, we need to
explicitly play a sound when placing a door.

Fixes #1363
2017-04-28 21:52:59 -07:00
upsilon 6335525757 Doors: Ignore permission check if player parameter is omitted
As written in game_api.txt.
2017-04-20 19:54:27 +01:00
Thomas--S 98216810ef nodebox -> node_box
Seems like this was a typo
2017-04-12 18:39:42 -07:00
SmallJoker b377aaa50d doors: Fix craftitem not listed in inventory (#1683)
Fixes bug caused by b847888
2017-04-02 10:01:01 +02:00
zaoqi 077316b4cd Use creative.is_enabled_for for creative mode if possible (#1558) 2017-03-29 21:02:26 +02:00
cx384 b847888cb7 doors: add groups to the door craftitem 2017-03-29 20:40:56 +02:00
upsilon 7c42c41170 doors: record protection violation if it cannot be dug 2017-03-26 03:06:44 +01:00
Thomas--S 73e4666f28 Change doors to default.can_interact_with_node() 2017-03-16 09:11:20 -07:00
SmallJoker b87ef5ccde Keys: Update default.can_interact_with_node to new item meta
Completes a forgotten update in 9d3a526
2017-03-12 12:20:31 -07:00
octacian 9d3a526324 Keys: Show owner in description
Utilizes several new features allowing the description of an item to be changed using the `description` meta key. This also moves keys from using the old single-value itemstack metadata system to the new node-like metadata system.
2017-02-27 19:00:14 -08:00
Martin Doege eb1805ea0a Textures: Strip color profiles from some textures
Removes the "iCCP: known incorrect sRGB profile" error messages on the
console when starting minetest_game by stripping offending color profiles.
2017-01-22 07:43:12 +00:00
Auke Kok 6dcf541f6e Revert "Doors: Remove ..." and "Doors: Allow the screwdriver to ..."
This reverts commit 5e4a6e8ac6, and
             commit 60cf3f85b6.

The original door API rewrite I posted had all rotation disabled using
the correct on_rotate() handler returning `false`. Two subsequent
changes attempting first to enable simple rotation and second disabling
that again changed the callback handler to a boolean `false`, which
is incorrect use in the screwdriver API, and actually allows rotation.

The proper way to disable rotation for facedir nodes it to use a full
callback handler that does `return false`.
2017-01-15 17:43:17 -08:00
rubenwardy 48ab62db88 Make doors place when shift is held instead of calling on_rightclick
Fixes #1364
2017-01-03 16:54:01 +00:00
Auke Kok e4b1c93512 Keys: Allow easy sharing of access without commands
This code adds the key concept to minetest_game, and integrates it
with lockable nodes. Currently supported lockable items are the Steel
Door, the Steel Trapdoor, and the Locked Chest.

The goal of this modification is to introduce a fine-grained multi-
player permission system that is intuitive and usable without any
console or chat commands, and doesn't require extra privileges to
be granted or setup. Keys can also physically be conveyed to other
players, adding to gameplay and adding some personality that is
preferable to console commands or editing formspecs.

A skeleton key can be crafted with 1 gold ingot. Skeleton keys can
then be matched to a lockable node by right-clicking the skeleton
key on a lockable node, which changes the skeleton key to a "key".

Gold was chosen as it's currently a not-so very useful item, and
therefore it's likely that players have some, but aren't really
using it for any purpose.

This key can subsequently used by any player to open or access that
lockable node, including retrieving items from Locked Chests, or
putting items in them.

They key is programmed to fit only the particular locked node it is
programmed to. This is achieved by storing a secret value in both
key and locked node. If this secret value doesn't match, the key
will not open the locked node. This allows many keys to be created
for one chest or door, but a key will only fit one node ever. The
secrets are stored in node, and item meta for the key.

If a locked node is removed, all keys that opened it are no longer
valid. Even if a new door/chest is placed in exactly the same spot,
the old keys will no longer fit that node.

Keys can be smelted back in gold ingots if they are no longer useful.

The method of storing a secret in nodemeta and itemstackmeta is secure
as there is no way for the client to create new items on the server
with a particular secret metadata value. Even if you could possible
create such an itemstack on the client, the server does not ever read
itemstackmeta from a client package.

The patch adds an API that allows other nodes and nodes added by
mods to use the same keys as well. The method how to implement this
is described in game_api.txt. The mod should add 2 callbacks to it's
node definition. Example code is given.

Textures are from PixelBOX, thanks to Gambit.
2016-11-25 03:01:14 +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
paramat 47efa2f558 Textures: Revert many back to RGBA to fix visual bug
With mip-mapping enabled, some GPUs cause a visual bug with indexed
textures that use alpha. This bug has been present for a while but
not noticed before. All indexed alpha textures must now be converted
to RGBA, to start this process we revert some textures converted to
indexed in the recent commit af3c918.
2016-11-19 23:45:08 +00:00
Auke Kok af3c91862c Convert many textures to indexed color
This fixes all cases where the color profile was broken, and
libpng warns about. It also makes almost all textures indexed
instead of RGB where possible (textures that don't have
semi-transparent pixels).
2016-11-18 05:37:02 +00: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
Auke Kok fbac9be51c Change many metal nodes to use default metal sounds 2016-10-25 02:37:36 +01:00
paramat 5e4a6e8ac6 Doors: Remove ability to rotate doors with screwdrivers
Rotating doors with screwdrivers causes too many issues to be worth it.
2016-09-30 02:44:24 +01:00
paramat 3e05870706 Doors: Trim open fencegate collison box again
The collision box still extended into a neighbouring empty node, causing
falling node objects to collide but not transform back into normal nodes.
Completes the fix started in a previous similar commit.
2016-09-23 18:24:47 +01:00
paramat 992f295880 Licenses: (Part 4) Remove overlooked WTFPL text. Cleanup 2016-09-08 06:17:05 +01: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 7d70d25eeb Licenses: Change WTFPL to MIT (part 2)
Add license.txt files.
Update and improve README.txt files.
Corrections to part 1.
2016-09-06 04:45:23 +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
paramat 995256744a Default, stairs, doors: Vary wood flammable and choppy group values
Make the softer woods, pine and aspen, 'flammable = 3'.
Correct inconsistent flammability of wood and stairs in relation
to all other solid wood nodes in MTGame.
Make the the softer woods, pine and aspen, 'choppy = 3'.
2016-08-29 00:24:30 +01:00
Tim 76211624ac Use minetest instead of core namespace, discourage via luacheck 2016-08-09 03:47:27 +01:00
Tim 60cf3f85b6 Doors: Allow the screwdriver to rotate doors around y-axis.
Keep other axis' disabled to prevent the hidden placeholder node to become irremovable to players.
2016-08-05 12:34:46 +02:00
paramat 265c40b558 Doors: Trim open fence gate collision box
Previously, the collision box extended into an empty node, causing
falling node objects to land on the open gate but not transform
back into normal nodes. Now fallng node objects will fall through and
either side of the end of the open gate and transform back.
2016-08-04 03:21:09 +01:00
Tim 00c2dde4ea Doors: Fix potential crashes, code improvements
Fix crash when doors are placed under unknown nodes.
Share a can_dig among doors, that does not crash on nil-player.
Only set can_dig if we actually protect the door.
2016-08-01 01:21:57 +01:00
Thomas--S 72f4c6be48 Doors: Fix orientations of trapdoor textures 2016-07-23 04:56:09 +01:00
Thomas--S f018e06d9b Doors: Fix trapdoor on_blast
Removing the node above was an error and is unnecessary
2016-07-18 23:45:48 +01:00
Thomas--S 9862bbc8e5 Doors: Same naming for trapdoors as for doors
This makes register_trapdoor act the same as the register_door.
If `name` isn't prefixed, it will be prefixed with "doors:".
2016-07-18 23:43:51 +01:00
tenplus1 0bd13d11cf Doors: Make door groups consistent with corresponding materials 2016-07-15 22:01:20 +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