diff --git a/mods/CORE/mcl_particles/init.lua b/mods/CORE/mcl_particles/init.lua index f4ebd85e54..4a89d733ec 100644 --- a/mods/CORE/mcl_particles/init.lua +++ b/mods/CORE/mcl_particles/init.lua @@ -2,12 +2,18 @@ local particle_nodes = {} mcl_particles = {} +-- Node particles can be disabled via setting +local node_particles_allowed = minetest.settings:get_bool("mcl_node_particles", true) + -- Add a particlespawner that is assigned to a given node position. -- * pos: Node positon. MUST use rounded values! -- * particlespawner_definition: definition for minetest.add_particlespawner -- NOTE: All particlespawners are automatically removed on shutdown. -- Returns particlespawner ID on succcess and nil on failure function mcl_particles.add_node_particlespawner(pos, particlespawner_definition) + if not node_particles_allowed then + return + end local poshash = minetest.hash_node_position(pos) if not poshash then return @@ -25,6 +31,9 @@ end -- pos: Node positon. MUST use rounded values! -- Returns true if particlespawner could be removed and false if none existed function mcl_particles.delete_node_particlespawner(pos) + if not node_particles_allowed then + return false + end local poshash = minetest.hash_node_position(pos) local id = particle_nodes[poshash] if id then diff --git a/settingtypes.txt b/settingtypes.txt index 0b6ffb742d..1e2129cec9 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -27,6 +27,9 @@ mcl_doTileDrops (Blocks have drops) bool true # If enabled, TNT explosions destroy blocks. mcl_tnt_griefing (TNT destroys blocks) bool true +# If enabled, some blocks will emit decorative particles like flames. +mcl_node_particles (Block particles) bool true + [Players] # If enabled, players respawn at the bed they last lay on instead of normal # spawn.