mirror of
https://github.com/DonBatman/mysponge.git
synced 2025-01-01 13:50:30 +01:00
Added sponge drying out of water
This commit is contained in:
parent
d088bc520a
commit
48df284e59
38
init.lua
38
init.lua
@ -87,6 +87,7 @@ minetest.register_node("mysponge:air1",{
|
|||||||
-- description = "Air 1",
|
-- description = "Air 1",
|
||||||
tiles = {"mysponge_air.png"},
|
tiles = {"mysponge_air.png"},
|
||||||
drawtype = "allfaces",
|
drawtype = "allfaces",
|
||||||
|
walkable = false,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
groups = {dig_immediate=1, oddly_breakable_by_hand=1, not_in_creative_inventory=1}
|
groups = {dig_immediate=1, oddly_breakable_by_hand=1, not_in_creative_inventory=1}
|
||||||
})
|
})
|
||||||
@ -94,6 +95,7 @@ minetest.register_node("mysponge:air2",{
|
|||||||
-- description = "Air 2",
|
-- description = "Air 2",
|
||||||
tiles = {"mysponge_air.png"},
|
tiles = {"mysponge_air.png"},
|
||||||
drawtype = "allfaces",
|
drawtype = "allfaces",
|
||||||
|
walkable = false,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
groups = {dig_immediate=1, oddly_breakable_by_hand=1, not_in_creative_inventory=1}
|
groups = {dig_immediate=1, oddly_breakable_by_hand=1, not_in_creative_inventory=1}
|
||||||
})
|
})
|
||||||
@ -101,6 +103,7 @@ minetest.register_node("mysponge:air3",{
|
|||||||
-- description = "Air 3",
|
-- description = "Air 3",
|
||||||
tiles = {"mysponge_air.png"},
|
tiles = {"mysponge_air.png"},
|
||||||
drawtype = "allfaces",
|
drawtype = "allfaces",
|
||||||
|
walkable = false,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
groups = {dig_immediate=1, oddly_breakable_by_hand=1, not_in_creative_inventory=1}
|
groups = {dig_immediate=1, oddly_breakable_by_hand=1, not_in_creative_inventory=1}
|
||||||
})
|
})
|
||||||
@ -202,6 +205,7 @@ minetest.register_abm({
|
|||||||
})
|
})
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
nodenames = {"mysponge:sponge_moist"},
|
nodenames = {"mysponge:sponge_moist"},
|
||||||
|
neighbors = {"mysponge:air1"},
|
||||||
interval = 0.5,
|
interval = 0.5,
|
||||||
chance = 1,
|
chance = 1,
|
||||||
action = function(pos)
|
action = function(pos)
|
||||||
@ -210,12 +214,46 @@ minetest.register_abm({
|
|||||||
})
|
})
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
nodenames = {"mysponge:sponge_wet"},
|
nodenames = {"mysponge:sponge_wet"},
|
||||||
|
neighbors = {"mysponge:air1"},
|
||||||
interval = 0.5,
|
interval = 0.5,
|
||||||
chance = 1,
|
chance = 1,
|
||||||
action = function(pos)
|
action = function(pos)
|
||||||
minetest.set_node(pos, {name="mysponge:sponge_soaked"})
|
minetest.set_node(pos, {name="mysponge:sponge_soaked"})
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------------------------
|
||||||
|
--Shrink Sponge in Air
|
||||||
|
------------------------------------------------------------------------------------------------
|
||||||
|
minetest.register_abm({
|
||||||
|
nodenames = {"mysponge:sponge_soaked"},
|
||||||
|
neighbors = {"air"},
|
||||||
|
interval = 120,
|
||||||
|
chance = 1,
|
||||||
|
action = function(pos)
|
||||||
|
minetest.set_node(pos, {name="mysponge:sponge_wet"})
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
minetest.register_abm({
|
||||||
|
nodenames = {"mysponge:sponge_wet"},
|
||||||
|
neighbors = {"air"},
|
||||||
|
interval = 120,
|
||||||
|
chance = 1,
|
||||||
|
action = function(pos)
|
||||||
|
minetest.set_node(pos, {name="mysponge:sponge_moist"})
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
minetest.register_abm({
|
||||||
|
nodenames = {"mysponge:sponge_moist"},
|
||||||
|
neighbors = {"air"},
|
||||||
|
interval = 120,
|
||||||
|
chance = 1,
|
||||||
|
action = function(pos)
|
||||||
|
minetest.set_node(pos, {name="mysponge:sponge_dry"})
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------
|
||||||
--Craft
|
--Craft
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user