From 01a60d9a550c25266f3fa699e24b921f2a0d6900 Mon Sep 17 00:00:00 2001
From: tenplus1 <kinsellaja@yahoo.com>
Date: Wed, 9 Apr 2025 15:11:47 +0100
Subject: [PATCH] add particles to replace defaults

---
 api.lua                                       |  26 +++++++++---------
 license.txt                                   |   3 ++
 textures/mobs_bubble_particle.png             | Bin 0 -> 331 bytes
 textures/mobs_fire_particle.png               | Bin 0 -> 343 bytes
 .../{tnt_smoke.png => mobs_tnt_smoke.png}     | Bin
 5 files changed, 16 insertions(+), 13 deletions(-)
 create mode 100644 textures/mobs_bubble_particle.png
 create mode 100644 textures/mobs_fire_particle.png
 rename textures/{tnt_smoke.png => mobs_tnt_smoke.png} (100%)

diff --git a/api.lua b/api.lua
index 515985e..823b1c3 100644
--- a/api.lua
+++ b/api.lua
@@ -18,7 +18,7 @@ end
 -- global table
 
 mobs = {
-	mod = "redo", version = "20250408",
+	mod = "redo", version = "20250409",
 	spawning_mobs = {}, translate = S,
 	node_snow = has(minetest.registered_aliases["mapgen_snow"])
 			or has("mcl_core:snow") or has("default:snow") or "air",
@@ -801,7 +801,7 @@ function mob_class:check_for_death(cmi_cause)
 
 		remove_mob(self, true)
 
-		effect(pos, 20, "tnt_smoke.png")
+		effect(pos, 20, "mobs_tnt_smoke.png")
 	end
 
 	return true
@@ -919,7 +919,7 @@ function mob_class:do_env_damage()
 
 		self.health = self.health - self.water_damage
 
-		effect(py, 5, "bubble.png", nil, nil, 1, nil)
+		effect(py, 5, "mobs_bubble_particle.png", nil, nil, 1, nil)
 
 		if self:check_for_death({type = "environment",
 				pos = pos, node = self.standing_in}) then return true end
@@ -930,7 +930,7 @@ function mob_class:do_env_damage()
 
 		self.health = self.health - self.lava_damage
 
-		effect(py, 15, "fire_basic_flame.png", 1, 5, 1, 0.2, 15, true)
+		effect(py, 15, "mobs_fire_particle.png", 1, 5, 1, 0.2, 15, true)
 
 		if self:check_for_death({type = "environment", pos = pos,
 				node = self.standing_in, hot = true}) then return true end
@@ -941,7 +941,7 @@ function mob_class:do_env_damage()
 
 		self.health = self.health - self.fire_damage
 
-		effect(py, 15, "fire_basic_flame.png", 1, 5, 1, 0.2, 15, true)
+		effect(py, 15, "mobs_fire_particle.png", 1, 5, 1, 0.2, 15, true)
 
 		if self:check_for_death({type = "environment", pos = pos,
 				node = self.standing_in, hot = true}) then return true end
@@ -963,7 +963,7 @@ function mob_class:do_env_damage()
 
 		self.health = self.health - damage
 
-		if damage > 0 then effect(py, 5, "tnt_smoke.png") end
+		if damage > 0 then effect(py, 5, "mobs_tnt_smoke.png") end
 
 		if self:check_for_death({type = "environment",
 				pos = pos, node = self.standing_in}) then return true end
@@ -974,7 +974,7 @@ function mob_class:do_env_damage()
 
 		self.health = self.health - self.air_damage
 
-		effect(py, 3, "bubble.png", 1, 1, 1, 0.2)
+		effect(py, 3, "mobs_bubble_particle.png", 1, 1, 1, 0.2)
 
 		if self:check_for_death({type = "environment",
 				pos = pos, node = self.standing_in}) then return true end
@@ -997,7 +997,7 @@ function mob_class:do_env_damage()
 
 			self.health = self.health - self.light_damage
 
-			effect(py, 5, "tnt_smoke.png")
+			effect(py, 5, "mobs_tnt_smoke.png")
 
 			if self:check_for_death({type = "light"}) then return true end
 		end
@@ -2456,7 +2456,7 @@ function mob_class:falling(pos)
 
 				self.health = self.health - floor(damage)
 
-				effect(pos, 5, "tnt_smoke.png", 1, 2, 2, nil)
+				effect(pos, 5, "mobs_tnt_smoke.png", 1, 2, 2, nil)
 
 				if self:check_for_death({type = "fall"}) then return true end
 			end
@@ -3006,7 +3006,7 @@ function mob_class:mob_expire(pos, dtime)
 
 --			minetest.log("action", "lifetimer expired, removed " .. self.name)
 
-			effect(pos, 15, "tnt_smoke.png", 2, 4, 2, 0)
+			effect(pos, 15, "mobs_tnt_smoke.png", 2, 4, 2, 0)
 
 			remove_mob(self, true) ; return true
 		end
@@ -3474,7 +3474,7 @@ function mobs:add_mob(pos, def)
 --print("[mobs] entity not found " .. def.name)
 		return false
 	else
-		effect(pos, 15, "tnt_smoke.png", 1, 2, 2, 15, 5)
+		effect(pos, 15, "mobs_tnt_smoke.png", 1, 2, 2, 15, 5)
 	end
 
 	-- use new texture if found
@@ -3938,7 +3938,7 @@ end
 
 function mobs:boom(self, pos, node_damage_radius, entity_radius, texture)
 
-	texture = texture or "tnt_smoke.png"
+	texture = texture or "mobs_tnt_smoke.png"
 
 	if mobs_griefing and minetest.get_modpath("tnt") and tnt and tnt.boom
 	and not minetest.is_protected(pos, "") then
@@ -4441,7 +4441,7 @@ end
 -- admin command to remove untamed mobs around players
 
 minetest.register_chatcommand("clear_mobs", {
-	params = "<text>",
+	params = "",
 	description = "Remove untamed mobs from around players.",
 	privs = {server = true},
 
diff --git a/license.txt b/license.txt
index 37f6785..86fbdea 100644
--- a/license.txt
+++ b/license.txt
@@ -20,6 +20,9 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.
 
+Textures borrowed from minetest_game (CC BY-SA 3.0):
+  mobs_tnt_smoke.png
+  mobs_bubble_particle.png
 
 Textures under CC0 license by TenPlus1
 
diff --git a/textures/mobs_bubble_particle.png b/textures/mobs_bubble_particle.png
new file mode 100644
index 0000000000000000000000000000000000000000..30170d29984c549b3a6ebc20126711ae394aa6da
GIT binary patch
literal 331
zcmV-R0kr;!P)<h;3K|Lk000e1NJLTq000aC000aK0{{R3VXLgw0001lP)t-s0002u
z@c-TO^Pa7-mZPv%cBt|7_@1KwsH^|F((tpj{kgsUc%I40)cNZ5_;ZxV;_&zB^7*gS
z>$lkM$>j3Q=kuS+=#04El)dPht-YhO!KTjasnP4M&+M+!?XcDGu-NOk-1ETU^u^xq
z#?R8o<n++$_SWn4;PU$9?C$RN`~Uy{Ms{=d0000NbW%=J01_8MPFQe%hl!Dwth&3-
z;o<f7_xJqTRV`Qm003V}L_t&t9R<OK0m4841hAloyF11E`|n2r0ATjMY_?NiQV)BB
zan*r&U6+#NKEh*IN|LNEIQ2@BWPQVNkR-|Kjq^B3QeHpwuSrtMw+qePX0fb34WND4
dAD%4$fIk>e2ESWad?o+@002ovPDHLkV1mMywdMc-

literal 0
HcmV?d00001

diff --git a/textures/mobs_fire_particle.png b/textures/mobs_fire_particle.png
new file mode 100644
index 0000000000000000000000000000000000000000..b12546aa9ff59ba51b2485c1fd6d7ab2ff1a29cc
GIT binary patch
literal 343
zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6XVU3I`u#fOS+@4BLl<6
ze(pbstU$g(vPY0F14ES>14Ba#1H&(%P{RubhEf9thF1v;3|2E37{m+a><Y92N_YqO
zgt#^`FqBDgAF&j<V9kCafN^^a!{cD}yV1PwqGf;NDZFfu|52;+q*wL)e6GKfZ2r$u
z|FzKU$tJB2`}O|rar}GA>ED@z|F?YpfA#+VHFe3A*G52N8B2ovf*Bm1-ADs+3O!vM
zLnJPj_6PDER^V|C&ggDD6f|k$z5h#Ahioz2^6dQiNwUI!_h(+X$H%bYSk2SS!)xa5
zKQ=k?0dtd8g+fps;~7<tl2*B=s~Xf!+J(=JUmL;{de1fcbb(KZi<#vvHQ&uw{N(3|
k{red@|F%W`uA6_^ZZt6eSdl3B4`?}qr>mdKI;Vst0EA+Le*gdg

literal 0
HcmV?d00001

diff --git a/textures/tnt_smoke.png b/textures/mobs_tnt_smoke.png
similarity index 100%
rename from textures/tnt_smoke.png
rename to textures/mobs_tnt_smoke.png