- Jul 16, 2017
-
-
SmallJoker authored
-
- Jul 02, 2017
-
-
DS-Minetest authored
-
- May 01, 2017
-
-
Fernando Carmona Varo authored
The previous behaviour is kept as fallback for compatibility, for when the on_ignite is not defined in the node.
-
- Apr 12, 2017
-
-
paramat authored
Bush saplings grow in half the time of tree saplings. Bushes do not need 'from sapling' schematic variants because only the stem node is force-placed in the mapgen schematic, so only the sapling is force-replaced. Bush leaves drop saplings with a rarity that ensures at least 1 sapling per bush on average.
-
paramat authored
Also delete nyancat API documentation from game_api.txt.
-
- Feb 25, 2017
-
-
MarkuBu authored
This implements a node-timer based leafdecay mechanism, and exposes an API to use it in mods. The API is documented in game_api.txt. `default.register_leafdecay(leafdecaydef)` `leafdecaydef` is a table, with following members: { trunks = { "default:tree"}, -- nodes considered trunks leaves = { "default:leaves", "default:apple"}, -- nodes considered leaves radius = 3, -- activates leafdecay this far from the trunk } The algorithm will drop `leaves` items in the area if no `trunks` are found in the `trunk_radius` sized area around the position of the leaf. If a node listed in `leaves` has a group `leafdecay_drop > 0`, then the item is dropped, otherwise the item is removed but not dropped. The algorithm also implements a value `default.leafdecay_speed` (default 15) which can be modified to increase or decrease of the leaf decay. The algorithm will vary the actual speed a bit to introduce randomness. Leaf decay is randomized by 0.1 seconds to reduce the chance that decay happens many times on the same second interval. This requires nodetimer_interval to be set to values lower than 1.0 to have an effect. The leaves will decay between 2 and 10 seconds after digging the trunk, and happen at non-integer second intervals. -- The API was added by sofar.
-
- Feb 11, 2017
-
-
rubenwardy authored
-
- Jan 26, 2017
-
-
rubenwardy authored
-
- Dec 05, 2016
-
-
rubenwardy authored
Also sets creative:all as default inventory page Fixes #1423
-
- Nov 27, 2016
-
-
rubenwardy authored
-
- Nov 25, 2016
-
-
Auke Kok authored
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.
-
- Nov 21, 2016
-
-
Auke Kok authored
This is all the working code from SmallJoker's boost_cart, poored into a more suitable form for minetest_game. - Mesecons and moreores stuff was removed entirely. - Textures were all renamed and moved out of default/ - Updated license, readme.txt, attribution - Changed code license to MIT, left artwork at CC0 - removed default:rail and made aliases for it - :carts:rail is now carts:rail. - localized entity def - removed copper rail entirely - startstop rail was removed, as well as detector rail - remodeled to b3d using stujones11 excellent blend model, but sizes of cart adjusted to make pixel sizes consistent (0.625) everywhere. - slightly more complex texture map for the cart (front/side visibly different) - rail parameters are passed as a separate def table, and stored in a private list. This avoids having to call `get_meta` on every node. In return, we need the node name, though. - adds metal sounds (based on default metal sound function) and cart moving sound. - reduced cart speeds to max 7, 5 by pushing. - Added on_step() rail event handler, gets called when a cart is on a rail. - Added various rebased updates from upstream (thanks Krock) - Included a fix that removes the 'reverse jiggle' when stopping. - Included reworked textures by sofar. The mod namespace is still public, but I'm NOT declaring it an API. I'd rather see it localized instead, for now. Any public interface in this code is *experimental* at best, and should be considered non-stable and unsupported for now.
-
- Nov 07, 2016
-
-
Fernando Carmona Varo authored
Add on_ignite functions to tnt, gunpowder, coalblock.
-
- Nov 02, 2016
-
-
Fernando Carmona Varo authored
The purpose of this is to allow mods to be able to interact (e.g. fill up) an empty bucket when it is used to punch a node that's not a liquid source or when punching a custom entity (e.g. milking a cow).
-
- Oct 25, 2016
-
-
LNJ authored
-
- Oct 12, 2016
-
-
paramat authored
River water needs to be 'liquid_renewable = false' to avoid a mess caused by spreading of sources, however picking it up with a bucket then creates a hole in the river. Allow a 'force-renew' of the source node if it has a source neighbour.
-
bas080 authored
Handy for when modders want to use these definitions to extend or add to the mod
-
- Oct 10, 2016
-
-
tenplus1 authored
Pass nodename to tnt.burn function where possible to reduce use of 'get_node'. Change 'ipairs' to 'pairs'. Use 'nodeupdate_single(pos)' instead of 'nodeupdate(pos)' to avoid every node triggering recursion, the loop itself takes the place of recursion and works upwards through horizontal planes as required.
-
- Sep 10, 2016
-
-
Auke Kok authored
I've rewritten this to use connected nodeboxes, but with a caveat. In order to make flat nodes look better, I'm keeping one non-connected pane that is flat around to convert flat sections to the flat nodes instead of connected, as these look better and are easier to work with. Once more sides are needed we convert the panes on the fly to connected nodes and recalculate the shape. We don't paint any of the half-panes that the previous generation of xpanes did. There's no need and it's harder to work with. Updating the nodes also seems more natural and placement and removal works straight forward. The conversion of old panes relies on an LBM, and does a reasonable conversion job, but it's not exact, since the panes behave slightly different now. The game API documentation was wrong to begin with. We discard param nr. 2 of the API entirely, and correct the tile usage text.
-
- Aug 05, 2016
-
-
Tim authored
Other screwdriver mods, or mods that cause rotation, might operate without the screwdriver mod loaded and have `screwdriver.disallow` unavailable. This allows nodes to default to full-disallow rather than full-rotation in such a situation.
-
- Jul 18, 2016
-
-
rubenwardy authored
Nyancats are independent in the default mod. Nothing else uses them or their code. Separating it into a separate mod makes it easier for subgames to remove them. It also makes it easier for a mod to depend on nyancats, as lots of subgames don't have them. Default/mapgen.lua: Register biomes, ores and decorations in singlenode mapgen. These were never disabled anyway because singlenode was removed from the world creation menu.
-
- Jul 16, 2016
-
- Jul 05, 2016
- Jun 27, 2016
-
-
tenplus1 authored
-
- Jun 22, 2016
-
- Jun 15, 2016
-
-
Auke Kok authored
Allow water to turn cobble slab and stairs to turn into mossy versions. There is no crafting recipe for mossy stairs and mossy slabs, the stair/slab API has been modified to allow for a recipeitem that is `nil`, which will omit adding a crafting recipe for these two items. The API documentation is updated. The slabs and stairs will turn mossy when water is adjacent, just like cobblestone. You can either farm mossy versions by placing them in water for a while, then collecting them, or run water over your craft.
-
- May 01, 2016
-
-
rubenwardy authored
-
- Apr 30, 2016
-
-
Auke Kok authored
Introduces an `on_blast(luaobj, damage)` callback that mods can attach to an entity def. The function will get called with the damage that TNT would make. The function should return three values: bool do_damage, bool do_knockback, table drops do_damage allows the mod to tell the TNT code to perform damage on the entity for the mod. The mod code should not do anything with the entity HP. The entity should not be immortal. If false, then the entity will not be damaged by the TNT mod. do_knockback allows the mod to tell the TNT mod to perform an entity knockback effect. If false, no knockback effect is applied to the entity. the drops table is a list of items to drop. It may be nil. E.g. { "wool:red" }. I've documented both on_blast() API methods in game_api.txt. It is a better place than lua_api.txt.
-
- Apr 26, 2016
-
-
Auke Kok authored
Adds a minor helper function that allows efficient retrieval of several inventories from a node inventory. We use this helper to quickly retrieve the items in chests, vessel shelves, book shelves and furnaces, and return these with the nodes itself to the TNT caller. The TNT caller then performs the entity physics, and we don't need to do anything else. We disable TNT doing anything with bones. We expose a bug in the code that drops the items - metadata was lost entirely. This patch corrects that by properly copying the metadata and creating the drops list inclusive metadata.
-
- Apr 16, 2016
- Mar 21, 2016
-
-
Rui914 authored
-
- Mar 13, 2016
-
-
Auke Kok authored
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.
-
- Mar 11, 2016
-
-
red-001 authored
-
- Mar 06, 2016
-
-
red-001 authored
-
- Feb 18, 2016
-
-
Auke Kok authored
This allows mod makers to register their own recipies, including none, to register doors.
-
- Feb 13, 2016
-
-
Auke Kok authored
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.
-
- Feb 03, 2016
-
-
Auke Kok authored
This converts the call to minetest.register() for the default fence node, so it can be called by other mods to quickly setup other fences. Since this creates an API, insert it into the game_api.txt. The api looks like minetest.register(name, {def}), and has two uncommon fields: "texture" and "material". Any normal nodedef property can be passed through, except "drawtype". The "fence" group will always be added. The default fence recipe is modified to be as follows: wood, stick, wood wood, stick, wood This recipe yields 4 fence nodes. This allows us to create according recipes for acacia, pine, aspen, and junglewood fences without adding new stick types: pine wood, stick, pine wood pine wood, stick, pine wood This is a from-scratch implementation, written by heart but inspired by (#665 - Add many wooden fences). Stick and fences nodes are named in a consistent way.
-