Merge pull request 'master use mostly almost possible of 5.1 on 4.0 (not 0.4)' (#1) from master into stable-4.0

Reviewed-on: https://codeberg.org/minenux/minetest-game-minetest/pulls/1
This commit is contained in:
mckaygerhard 2021-11-24 05:12:59 +01:00
commit 61debd8c3b
5 changed files with 29 additions and 19 deletions

View File

@ -1,7 +1,6 @@
Minetest Game [minetest_game] # Minetest4 Game
=============================
The main game for the Minetest engine The main game for the Minetest engine
=====================================
To use this game with the Minetest engine, insert this repository as To use this game with the Minetest engine, insert this repository as
/games/minetest_game /games/minetest_game
@ -11,16 +10,15 @@ The Minetest engine can be found in:
Compatibility Compatibility
-------------- --------------
The Minetest Game github master HEAD is generally compatible with the github
master HEAD of the Minetest engine.
Additionally, when the Minetest engine is tagged to be a certain version (eg. This source code and files are only compatible with matched minetest4 engine
0.4.10), Minetest Game is tagged with the version too. from https://codeberg.org/minenux/minetest-engine/src/branch/stable-4.0
Additionally, when the Minetest4 engine is tagged to be a certain version (e.g.
4.0.18), Minetest Game is tagged with the version 4.0.18 too.
When stable releases are made, Minetest Game is packaged and made available in When stable releases are made, Minetest Game and the Minetest engine is packaged
http://minetest.net/downloads/ and made available at https://codeberg.org/minenux/minetest-engine/archive/stable-4.0.tar.gz
and in case the repository has grown too much, it may be reset. In that sense, or generally at https://codeberg.org/minenux/minetest-engine/releases/tag/4.0.18 by example.
this is not a "real" git repository. (Package maintainers please note!)
Licensing Licensing
--------- ---------

View File

@ -1,3 +1,3 @@
name = Minetest Game name = Minetest4
author = minetest author = minetest
description = Bundled by default with Minetest, and aims to be lightweight, moddable, and fairly playable without mods. description = Bundled by default with Minetest4

View File

@ -1,5 +1,5 @@
# This file contains settings of Minetest Game that can be changed in # This file contains settings of minetest4 Game that can be changed in
# minetest.conf. # minetest4.conf.
# By default, all the settings are commented and not functional. # By default, all the settings are commented and not functional.
# Uncomment settings by removing the preceding #. # Uncomment settings by removing the preceding #.

View File

@ -214,7 +214,8 @@ minetest.register_craftitem("default:skeleton_key", {
return itemstack return itemstack
end end
local on_skeleton_key_use = minetest.registered_nodes[node.name].on_skeleton_key_use local node_reg = minetest.registered_nodes[node.name]
local on_skeleton_key_use = node_reg and node_reg.on_skeleton_key_use
if not on_skeleton_key_use then if not on_skeleton_key_use then
return itemstack return itemstack
end end

View File

@ -229,12 +229,16 @@ local function add_effects(pos, radius, drops)
-- we just dropped some items. Look at the items entities and pick -- we just dropped some items. Look at the items entities and pick
-- one of them to use as texture -- one of them to use as texture
local texture = "tnt_blast.png" --fallback texture local texture = "tnt_blast.png" --fallback texture
local node
local most = 0 local most = 0
for name, stack in pairs(drops) do for name, stack in pairs(drops) do
local count = stack:get_count() local count = stack:get_count()
if count > most then if count > most then
most = count most = count
local def = minetest.registered_nodes[name] local def = minetest.registered_nodes[name]
if def then
node = { name = name }
end
if def and def.tiles and def.tiles[1] then if def and def.tiles and def.tiles[1] then
texture = def.tiles[1] texture = def.tiles[1]
end end
@ -252,9 +256,11 @@ local function add_effects(pos, radius, drops)
maxacc = {x = 0, y = -10, z = 0}, maxacc = {x = 0, y = -10, z = 0},
minexptime = 0.8, minexptime = 0.8,
maxexptime = 2.0, maxexptime = 2.0,
minsize = radius * 0.66, minsize = radius * 0.33,
maxsize = radius * 2, maxsize = radius,
texture = texture, texture = texture,
-- ^ only as fallback for clients without support for `node` parameter
node = node,
collisiondetection = true, collisiondetection = true,
}) })
end end
@ -283,10 +289,15 @@ local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast, owne
local a = VoxelArea:new({MinEdge = minp, MaxEdge = maxp}) local a = VoxelArea:new({MinEdge = minp, MaxEdge = maxp})
local data = vm1:get_data() local data = vm1:get_data()
local count = 0 local count = 0
local c_tnt = minetest.get_content_id("tnt:tnt") local c_tnt
local c_tnt_burning = minetest.get_content_id("tnt:tnt_burning") local c_tnt_burning = minetest.get_content_id("tnt:tnt_burning")
local c_tnt_boom = minetest.get_content_id("tnt:boom") local c_tnt_boom = minetest.get_content_id("tnt:boom")
local c_air = minetest.get_content_id("air") local c_air = minetest.get_content_id("air")
if enable_tnt then
c_tnt = minetest.get_content_id("tnt:tnt")
else
c_tnt = c_tnt_burning -- tnt is not registered if disabled
end
-- make sure we still have explosion even when centre node isnt tnt related -- make sure we still have explosion even when centre node isnt tnt related
if explode_center then if explode_center then
count = 1 count = 1