From b81c2aeab6a2e592aab8330489ea31b84fbbbe2a Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Wed, 12 Mar 2025 08:03:17 +0000 Subject: [PATCH] update dates, add sound_play check --- api.lua | 6 ++++-- license.txt | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/api.lua b/api.lua index ffeb643..7836555 100644 --- a/api.lua +++ b/api.lua @@ -18,7 +18,7 @@ end -- Global table mobs = { - mod = "redo", version = "20250209", + mod = "redo", version = "20250312", spawning_mobs = {}, translate = S, node_snow = has(minetest.registered_aliases["mapgen_snow"]) or has("mcl_core:snow") or has("default:snow") or "air", @@ -3726,7 +3726,7 @@ function mobs:spawn_specific(name, nodes, neighbors, min_light, max_light, inter return end - -- change position to node above + -- change position to above node pos.y = pos.y + 1 -- are we spawning within height limits? @@ -4610,6 +4610,8 @@ if settings:get_bool("mobs_can_hear") ~= false then minetest.sound_play = function(spec, param, eph) + if type(spec) == "table" then return end + local def = {} ; param = param or {} -- store sound position (ignore player and object positioning as background) diff --git a/license.txt b/license.txt index 6c3c232..37f6785 100644 --- a/license.txt +++ b/license.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016 TenPlus1 +Copyright (c) 2025 TenPlus1 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal