Add setting to disable node particles
This commit is contained in:
parent
2a1273b7e3
commit
9f43d6a5a5
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user