From 74d4986d1d491aa9da7117c4e0e27ae6f05ee13c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20=C3=85str=C3=B6m?= Date: Sat, 1 May 2021 15:37:14 +0200 Subject: [PATCH 01/14] Fix rays not being cast in a specific direction A bug was introduced in 679e2b1b which caused explosions to not cast rays for environment destruction in the (+X, +Y, +Z) direction. This commit fixes that. --- mods/CORE/mcl_explosions/init.lua | 76 +++++++++++++++---------------- 1 file changed, 37 insertions(+), 39 deletions(-) diff --git a/mods/CORE/mcl_explosions/init.lua b/mods/CORE/mcl_explosions/init.lua index 79221d0e..754a9e46 100644 --- a/mods/CORE/mcl_explosions/init.lua +++ b/mods/CORE/mcl_explosions/init.lua @@ -57,46 +57,44 @@ local function compute_sphere_rays(radius) local rays = {} local sphere = {} - for i=1, 2 do + local function add_ray(pos) + sphere[minetest.hash_node_position(pos)] = pos + end + + for y = -radius, radius do + for z = -radius, radius do + for x = -radius, 0 do + local d = x * x + y * y + z * z + if d <= radius * radius then + add_ray(vector.new(x, y, z)) + add_ray(vector.new(-x, y, z)) + break + end + end + end + end + + for x = -radius, radius do + for z = -radius, radius do + for y = -radius, 0 do + local d = x * x + y * y + z * z + if d <= radius * radius then + add_ray(vector.new(x, y, z)) + add_ray(vector.new(x, -y, z)) + break + end + end + end + end + + for x = -radius, radius do for y = -radius, radius do - for z = -radius, radius do - for x = -radius, 0, 1 do - local d = x * x + y * y + z * z - if d <= radius * radius then - local pos = { x = x, y = y, z = z } - sphere[minetest.hash_node_position(pos)] = pos - break - end - end - end - end - end - - for i=1,2 do - for x = -radius, radius do - for z = -radius, radius do - for y = -radius, 0, 1 do - local d = x * x + y * y + z * z - if d <= radius * radius then - local pos = { x = x, y = y, z = z } - sphere[minetest.hash_node_position(pos)] = pos - break - end - end - end - end - end - - for i=1,2 do - for x = -radius, radius do - for y = -radius, radius do - for z = -radius, 0, 1 do - local d = x * x + y * y + z * z - if d <= radius * radius then - local pos = { x = x, y = y, z = z } - sphere[minetest.hash_node_position(pos)] = pos - break - end + for z = -radius, 0 do + local d = x * x + y * y + z * z + if d <= radius * radius then + add_ray(vector.new(x, y, z)) + add_ray(vector.new(x, y, -z)) + break end end end From d9bbf4879c000245ca001c26cba8a98824444f2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20=C3=85str=C3=B6m?= Date: Sat, 8 May 2021 19:59:48 +0200 Subject: [PATCH 02/14] Adjust explosion entity damage hitbox In mcl_explosions the hitbox used for calculating the damage of an entity is its collisionbox multiplied by two. This commit removes the multiplication by two because that makes explosion damage behave weirdly in some circumstances. It was most likely implemented that way because of a misinterpretation of the Minecraft wiki. --- mods/CORE/mcl_explosions/init.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mods/CORE/mcl_explosions/init.lua b/mods/CORE/mcl_explosions/init.lua index 79221d0e..82a3c07c 100644 --- a/mods/CORE/mcl_explosions/init.lua +++ b/mods/CORE/mcl_explosions/init.lua @@ -253,12 +253,12 @@ local function trace_explode(pos, strength, raydirs, radius, info, puncher) if collisionbox then -- Create rays from random points in the collision box - local x1 = collisionbox[1] * 2 - local y1 = collisionbox[2] * 2 - local z1 = collisionbox[3] * 2 - local x2 = collisionbox[4] * 2 - local y2 = collisionbox[5] * 2 - local z2 = collisionbox[6] * 2 + local x1 = collisionbox[1] + local y1 = collisionbox[2] + local z1 = collisionbox[3] + local x2 = collisionbox[4] + local y2 = collisionbox[5] + local z2 = collisionbox[6] local x_len = math.abs(x2 - x1) local y_len = math.abs(y2 - y1) local z_len = math.abs(z2 - z1) From 95af8196a2b61db3fd3d071b4f537408ebde5e1f Mon Sep 17 00:00:00 2001 From: E Date: Mon, 3 May 2021 08:11:24 -0400 Subject: [PATCH 03/14] project: add issue & PR templates --- .gitea/issue_template/bug-report.md | 45 ++++++++++++++++++++++++ .gitea/issue_template/feature-request.md | 42 ++++++++++++++++++++++ .gitea/pull_request_template.md | 27 ++++++++++++++ 3 files changed, 114 insertions(+) create mode 100644 .gitea/issue_template/bug-report.md create mode 100644 .gitea/issue_template/feature-request.md create mode 100644 .gitea/pull_request_template.md diff --git a/.gitea/issue_template/bug-report.md b/.gitea/issue_template/bug-report.md new file mode 100644 index 00000000..83cd4248 --- /dev/null +++ b/.gitea/issue_template/bug-report.md @@ -0,0 +1,45 @@ +--- + +name: "Bug Report" +about: "Use this for when something's broken." +title: "[unknown]: " +labels: + - bug + - unconfirmed + +--- + + + +## What happened? + + + +## What did I expect? + + + +## How to get it to happen + + +1. +2. +3. + +## Environment + +**Minetest** +``` +Paste the output of `minetest -v` here. +``` + +**Mineclonia**: diff --git a/.gitea/issue_template/feature-request.md b/.gitea/issue_template/feature-request.md new file mode 100644 index 00000000..2702411d --- /dev/null +++ b/.gitea/issue_template/feature-request.md @@ -0,0 +1,42 @@ +--- + +name: "Feature Request" +about: "Mineclonia doesn't do something you need it to" +title: "[unknown]: " +labels: + - "missing feature" + - unconfirmed + +--- + + + +## What needs to change? + + + +## Example workflow + + +1. +2. +3. + +## Environment + +**Minetest** +``` +Paste the output of `minetest -v` here. +``` + +**Mineclonia**: diff --git a/.gitea/pull_request_template.md b/.gitea/pull_request_template.md new file mode 100644 index 00000000..c7a3d7af --- /dev/null +++ b/.gitea/pull_request_template.md @@ -0,0 +1,27 @@ +## Problem +TRACKING ISSUE: # + + + +## Solution + + + +## Details + + + +## Testing Steps + + +1. +2. +3. From 9875183a6fa5c084a83c50f19b60fa3d46764a5d Mon Sep 17 00:00:00 2001 From: E Date: Mon, 3 May 2021 12:09:24 -0400 Subject: [PATCH 04/14] project: add optional To do list to PR template https://git.minetest.land/Mineclonia/Mineclonia/pulls/56#issuecomment-22465 --- .gitea/pull_request_template.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.gitea/pull_request_template.md b/.gitea/pull_request_template.md index c7a3d7af..877c7163 100644 --- a/.gitea/pull_request_template.md +++ b/.gitea/pull_request_template.md @@ -25,3 +25,19 @@ don't need them all, delete the empty numbers. 1. 2. 3. + + + + From 438e91d212189a77c992523b712c7d49f010aca8 Mon Sep 17 00:00:00 2001 From: E Date: Tue, 4 May 2021 14:31:43 -0400 Subject: [PATCH 05/14] project: remove [unknown] tag from issue templates Reporters aren't expected to know the layout of the mods, and having the tag in the title may be confusing. https://git.minetest.land/Mineclonia/Mineclonia/pulls/56#issuecomment-22640 --- .gitea/issue_template/bug-report.md | 8 -------- .gitea/issue_template/feature-request.md | 9 --------- 2 files changed, 17 deletions(-) diff --git a/.gitea/issue_template/bug-report.md b/.gitea/issue_template/bug-report.md index 83cd4248..db03e703 100644 --- a/.gitea/issue_template/bug-report.md +++ b/.gitea/issue_template/bug-report.md @@ -2,20 +2,12 @@ name: "Bug Report" about: "Use this for when something's broken." -title: "[unknown]: " labels: - bug - unconfirmed --- - - ## What happened? diff --git a/.gitea/issue_template/feature-request.md b/.gitea/issue_template/feature-request.md index 2702411d..5c2294cf 100644 --- a/.gitea/issue_template/feature-request.md +++ b/.gitea/issue_template/feature-request.md @@ -2,21 +2,12 @@ name: "Feature Request" about: "Mineclonia doesn't do something you need it to" -title: "[unknown]: " labels: - "missing feature" - unconfirmed --- - - ## What needs to change? From 1738d57a2caf6a04d88a21aba209ab7e3c138d25 Mon Sep 17 00:00:00 2001 From: E Date: Tue, 4 May 2021 14:38:20 -0400 Subject: [PATCH 06/14] project: add title instructions to PR template --- .gitea/pull_request_template.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitea/pull_request_template.md b/.gitea/pull_request_template.md index 877c7163..ef0d3193 100644 --- a/.gitea/pull_request_template.md +++ b/.gitea/pull_request_template.md @@ -1,3 +1,11 @@ + ## Problem TRACKING ISSUE: # From 7f9ad443acbd8cf4fd6391afcf3c1779573d274d Mon Sep 17 00:00:00 2001 From: E Date: Wed, 5 May 2021 08:52:12 -0400 Subject: [PATCH 07/14] project: simplify Environment section for issue templates --- .gitea/issue_template/bug-report.md | 15 ++++++++++----- .gitea/issue_template/feature-request.md | 15 ++++++++++----- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/.gitea/issue_template/bug-report.md b/.gitea/issue_template/bug-report.md index db03e703..191c92ed 100644 --- a/.gitea/issue_template/bug-report.md +++ b/.gitea/issue_template/bug-report.md @@ -29,9 +29,14 @@ don't need them all, delete the empty numbers. ## Environment -**Minetest** -``` -Paste the output of `minetest -v` here. -``` +**Mineclonia Version**: -**Mineclonia**: + +**Minetest Version**: +**Operating System**: +**CPU Type**: +**RAM**: +**Graphics Card**: diff --git a/.gitea/issue_template/feature-request.md b/.gitea/issue_template/feature-request.md index 5c2294cf..f484099d 100644 --- a/.gitea/issue_template/feature-request.md +++ b/.gitea/issue_template/feature-request.md @@ -25,9 +25,14 @@ don't need them all, delete the empty numbers. ## Environment -**Minetest** -``` -Paste the output of `minetest -v` here. -``` +**Mineclonia Version**: -**Mineclonia**: + +**Minetest Version**: +**Operating System**: +**CPU Type**: +**RAM**: +**Graphics Card**: From 838bf0034fecc2ec2bf23969327846910fbf76f8 Mon Sep 17 00:00:00 2001 From: E Date: Wed, 5 May 2021 09:09:06 -0400 Subject: [PATCH 08/14] project: simplify Feature Request template https://git.minetest.land/Mineclonia/Mineclonia/pulls/56#issuecomment-22682 --- .gitea/issue_template/feature-request.md | 28 +++--------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/.gitea/issue_template/feature-request.md b/.gitea/issue_template/feature-request.md index f484099d..2b04baf4 100644 --- a/.gitea/issue_template/feature-request.md +++ b/.gitea/issue_template/feature-request.md @@ -3,8 +3,7 @@ name: "Feature Request" about: "Mineclonia doesn't do something you need it to" labels: - - "missing feature" - - unconfirmed + - "feature request" --- @@ -12,27 +11,6 @@ labels: -## Example workflow +## Solution - -1. -2. -3. - -## Environment - -**Mineclonia Version**: - - -**Minetest Version**: -**Operating System**: -**CPU Type**: -**RAM**: -**Graphics Card**: + From c9c568847c9aac3f437a8d5b9678d9293cc96484 Mon Sep 17 00:00:00 2001 From: E Date: Thu, 6 May 2021 08:12:26 -0400 Subject: [PATCH 09/14] project: change wording of problem section in feature request template https://git.minetest.land/Mineclonia/Mineclonia/pulls/56#issuecomment-22813 --- .gitea/issue_template/feature-request.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/issue_template/feature-request.md b/.gitea/issue_template/feature-request.md index 2b04baf4..83428f9e 100644 --- a/.gitea/issue_template/feature-request.md +++ b/.gitea/issue_template/feature-request.md @@ -7,7 +7,7 @@ labels: --- -## What needs to change? +## Problem From 32c7fe4741a74d2dd5e2105762715b3aa6ebb64b Mon Sep 17 00:00:00 2001 From: E Date: Sun, 9 May 2021 21:33:39 -0400 Subject: [PATCH 10/14] project: change headings to level 5 https://git.minetest.land/Mineclonia/Mineclonia/pulls/56#issuecomment-22917 --- .gitea/issue_template/bug-report.md | 8 ++++---- .gitea/issue_template/feature-request.md | 4 ++-- .gitea/pull_request_template.md | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.gitea/issue_template/bug-report.md b/.gitea/issue_template/bug-report.md index 191c92ed..68f9ceea 100644 --- a/.gitea/issue_template/bug-report.md +++ b/.gitea/issue_template/bug-report.md @@ -8,15 +8,15 @@ labels: --- -## What happened? +###### What happened? -## What did I expect? +###### What did I expect? -## How to get it to happen +###### How to get it to happen diff --git a/.gitea/issue_template/feature-request.md b/.gitea/issue_template/feature-request.md index 83428f9e..fea4498a 100644 --- a/.gitea/issue_template/feature-request.md +++ b/.gitea/issue_template/feature-request.md @@ -7,10 +7,10 @@ labels: --- -## Problem +###### Problem -## Solution +###### Solution diff --git a/.gitea/pull_request_template.md b/.gitea/pull_request_template.md index ef0d3193..86f81df7 100644 --- a/.gitea/pull_request_template.md +++ b/.gitea/pull_request_template.md @@ -6,7 +6,7 @@ type of banner to mcl_banners, the title should look like: items/mcl_banners: add new banner type --> -## Problem +###### Problem TRACKING ISSUE: # -## Solution +###### Solution -## Details +###### Details -## Testing Steps +###### Testing Steps + ###### Solution From dd8bcaec5078863432331cd27eeff34f9de45209 Mon Sep 17 00:00:00 2001 From: E Date: Sun, 16 May 2021 14:58:10 -0400 Subject: [PATCH 12/14] project: un-bold bug-report environment fields https://git.minetest.land/Mineclonia/Mineclonia/pulls/56#issuecomment-23257 --- .gitea/issue_template/bug-report.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitea/issue_template/bug-report.md b/.gitea/issue_template/bug-report.md index 68f9ceea..5a447087 100644 --- a/.gitea/issue_template/bug-report.md +++ b/.gitea/issue_template/bug-report.md @@ -29,14 +29,14 @@ don't need them all, delete the empty numbers. ###### Environment -**Mineclonia Version**: +Mineclonia Version: -**Minetest Version**: -**Operating System**: -**CPU Type**: -**RAM**: -**Graphics Card**: +Minetest Version: +Operating System: +CPU Type: +RAM: +Graphics Card: From 42205639f68cfc962e2051676fc50b288fbc0dce Mon Sep 17 00:00:00 2001 From: E Date: Sun, 16 May 2021 15:02:56 -0400 Subject: [PATCH 13/14] project: make the headers *actually* level 5 https://git.minetest.land/Mineclonia/Mineclonia/pulls/56#issuecomment-23257 --- .gitea/issue_template/bug-report.md | 8 ++++---- .gitea/issue_template/feature-request.md | 4 ++-- .gitea/pull_request_template.md | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.gitea/issue_template/bug-report.md b/.gitea/issue_template/bug-report.md index 5a447087..b9e50f07 100644 --- a/.gitea/issue_template/bug-report.md +++ b/.gitea/issue_template/bug-report.md @@ -8,15 +8,15 @@ labels: --- -###### What happened? +##### What happened? -###### What did I expect? +##### What did I expect? -###### How to get it to happen +##### How to get it to happen diff --git a/.gitea/issue_template/feature-request.md b/.gitea/issue_template/feature-request.md index 9c780c59..788458c8 100644 --- a/.gitea/issue_template/feature-request.md +++ b/.gitea/issue_template/feature-request.md @@ -7,7 +7,7 @@ labels: --- -###### Problem +##### Problem -###### Solution +##### Solution diff --git a/.gitea/pull_request_template.md b/.gitea/pull_request_template.md index 86f81df7..a5cd91e9 100644 --- a/.gitea/pull_request_template.md +++ b/.gitea/pull_request_template.md @@ -6,7 +6,7 @@ type of banner to mcl_banners, the title should look like: items/mcl_banners: add new banner type --> -###### Problem +##### Problem TRACKING ISSUE: # -###### Solution +##### Solution -###### Details +##### Details -###### Testing Steps +##### Testing Steps Minetest Version: -Operating System: -CPU Type: -RAM: -Graphics Card: