Books still don't wrap long lines of text properly so until this has been sorted out I suggest reverting back to a previous working formspec which lets players read books properly until a fix is found (and maybe scrollbars added to texarea's). Also adding a recipe to blank written books.
This is an adapted version of #861 - by oleastre
Most mods had been calling `doors.register_door() with a door
name that included the "modname:" prefix, and we should continue
to allow mods to do so, without registering the nodenames created
in the "doors:" namespace.
The default case is to use the "modname:" prefix verbatim. If
mods or code calls this function without a prefix, then "doors:"
is automatically used.
Now that the namespace is corrected, the copy replacement ABM is
no longer needed.
This function maps doors.register_door to the new API as far as
reasonable. We can't map the texture, so we fall back to a default
texture. An error message is printed if mod writers did not provide the
needed new tiles field for the door. The created doors are functional
and a full replacement. Old doors are replaced with the new ones
through an ABM.
These sounds were perceived to be too loud in the
game. I've lowered them significantly but they remain
plenty audible. The dig sounds were very loud as well
so I toned them down as well.
Other mods may depend on knowing whether doors are placed
to setup additional attributes or perform node manipulations.
This is something e.g. mesecons does to connect circuits
to doors. This was tested with mesecons. Placing a door next
to a mesecon wire will make the wire automatically
connect, which was otherwise not happening.
And similarly, if we wield a door and right click any node
that has an on_rightclick() handler, call the handler
instead.
Just to be on the safe side, assure that none of this
code runs when right-clicking an entity or player, which
would likely crash the server.
Fold in PR #831 as well - prevent server crash on door
place on unknown blocks, by @tenplus1.
This code never allowed placing a door on e.g. a grass
plant. The code to handle this isn't that complex. With
this code, doors can be placed on flowers and on normal
node surfaces without issues.
Issue #811 - new gravel texture needed.
This texture was Gambits' PixelBOX gravel light texture. Gambit
posted that his texture pack is WTFPL:
- https://forum.minetest.net/viewtopic.php?f=4&t=4990&start=50#p141196
I've made significant modifications to this texture:
- slightly rotated and rolled some sections of pixels
- minor burn/dodge some pixels to keep high contrast
- removed lineair repeating effects
- etc.
Attribution is added back to Gambit. Thanks.
Both the standing and sitting animations had misplaced curve
cusps that caused the end part of the animation to wiggle the
feet slightly back and forward.
I've fixed both animations parts and re-exported. Verified in-game
with multiplayer that everything was indeed fixed.
By adding the timer to the tnt:tnt_burning node it will help mods add the block and cause an explosion after 4 seconds instead of doing nothing like in it's current state.
Spread ABM intervals evenly across 1 to 16 seconds
16s ensures no nodes are missed when player walks past
Adjust chance values to compensate, for identical action rates
Combine lavacooling ABMs into one, return to chance = 1
Grass growth: add 'neighbors = "air"' to avoid
processing the thousands of underground dirt nodes
Grass death: Reduce action rate to that of grass growth
Fire: Use chance = 1 for flame extinguishing
and flame removal when mod is disabled
Node timers are higher precision and a better guarantee
of happening at regular intervals, whereas ABM's may be
postponed, cancelled or missed if a player is too far.
The largest benefit is that once the furnace is done
cooking, no more ABM's are fired - the timer is stopped
instead and no more events are created until items
are put in the furnace.
This patch is larger due to the migration of the timer
function and indentation change as a result of the somewhat
reduced complexity. I've tested with several furnaces and
this works correctly and behavior is not affected, although
people may find that their furnaces now work more
regularly.
If you place several furnaces next to eachother, you will
still find all furnace timers firing exactly at the same
time. This is a bug in core that should not coalesce node
timers at second intervals.
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.
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.
Organizing these in groups will allow mods to do several things
easier:
- create craft recipes using them as ingredients
- manipulate map nodes based on group properties
There are quite a few slab and stair blocks already, so automatically
add these groups at registration time for all of those. Since most
mods I've seen use the registration code in this submod, they will
also benefit.
We're using a normal wooden side texture to draw the sides
of trapdoors. But the side textures have only 2 edges that
have a nice texture for the 2px wide trapdoor. We can
either repaint the textures, or just rotate the texture
properly for the two sides that need it.
Because the side texture for wooden doors was just a default:wood
texture, it clashes with the colors in the trapdoor, and so
we add a wooden trapdoor-matching tile side texture as well.
This also improves the steel trapdoor side, but without a
texture change there since that was already a specially
drawn texture for that node.
We also increase the thickness of the trapdoor to 2px. Right
now the model is 0.4 large, but this causes the side textures
to look odd as there's a mismatch in pixel size. By scaling the
trapdoor side up to exactly 2px, the sides look natural.
Thanks to @kilbith for the suggestion.
There really is no reason to prevent rotation in trapdoors, I
expect this to be an oversight.
Trapdoors work perfectly well sideways, upside down and can
work like fences, gates and more. Most commonly, people will
want to put them in the top half of the node so they remain
flush with a floor.