commit 7605e0ce3f60de842480b60264fdfd0f3d3a5f6b Author: MisterE123 <61124264+MisterE123@users.noreply.github.com> Date: Sun Feb 16 16:55:47 2020 -0500 added the mod files diff --git a/depends.txt b/depends.txt new file mode 100644 index 0000000..68c4275 --- /dev/null +++ b/depends.txt @@ -0,0 +1,3 @@ +default +mesecons +fire \ No newline at end of file diff --git a/description.txt b/description.txt new file mode 100644 index 0000000..b7eb55e --- /dev/null +++ b/description.txt @@ -0,0 +1 @@ +Adds a spleef subgame to minetest much like "Don't Break the Ice", where players try to be the last man standing on a platform of blocks that can be made to disappear by punching them. This version includes fire spleef cubes, that spawn fire on them. this mod works with mesecons to reset any gameboard. \ No newline at end of file diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..dfc9e60 --- /dev/null +++ b/init.lua @@ -0,0 +1,151 @@ +minetest.register_node("spleef:spleef_normal", { + description = "Spleef Cube", + drawtype = "glasslike_framed", + tiles = {"spleef_normal.png"}, + paramtype = "light", + is_ground_content = false, + sunlight_propagates = true, + sounds = default.node_sound_glass_defaults(), + groups = {cracky=5}, + mesecons = { + conductor = { + state = mesecon.state.off, + onstate = "spleef:spleef_gone", + rules = mesecon.rules.alldirs + } + } + + +}) + + +minetest.register_node("spleef:spleef_fire", { + description = "Spleef Fire Cube", + drawtype = "glasslike_framed", + tiles = {"spleef_fire.png"}, + paramtype = "light", + is_ground_content = false, + sunlight_propagates = true, + sounds = default.node_sound_glass_defaults(), + groups = {not_in_creative_inventory=1}, + drop = "spleef:spleef_normal", + mesecons = { + conductor = { + state = mesecon.state.off, + onstate = "spleef:spleef_gone", + rules = mesecon.rules.alldirs + } + } + + +}) + + + + +minetest.register_on_punchnode( + function(pos, node, puncher) + if node.name == "spleef:spleef_normal" or node.name == "spleef:spleef_fire" then + local r = math.random(1,20) + if r < 15 then + minetest.add_node(pos, {name = "spleef:spleef_flashing"}) + end + if r > 15 then + minetest.add_node(pos, {name = "spleef:spleef_fire"}) + end + + end + end +) + + + + +minetest.register_node("spleef:spleef_flashing", { + description = "Flashing Spleef Cube", + drawtype = "glasslike_framed", + light_source = 5, + + paramtype = "light", + tiles = {{ + name = "spleef_flashing.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = .5, + } + }}, + groups = {not_in_creative_inventory=1}, + drop = "spleef:spleef_normal", + +}) + + +minetest.register_node("spleef:spleef_gone", { + description = "Dematerialized Spleef Cube", + drawtype = "airlike", + paramtype = "light", + sunlight_propagates = true, + + walkable = false, + pointable = false, + diggable = false, + buildable_to = false, + + + air_equivalent = true, + drop = "spleef:spleef_normal", + groups = {not_in_creative_inventory=1}, + mesecons = { + conductor = { + state = mesecon.state.on, + offstate = "spleef:spleef_normal", + rules = mesecon.rules.alldirs + } + } + + +}) + + +minetest.register_abm({ + nodenames = {"spleef:spleef_flashing"}, + interval = 2, + chance = 2, + action = function(pos) + minetest.add_node(pos, {name = "spleef:spleef_gone"}) + end, +}) + + +minetest.register_abm({ + nodenames = {"spleef:spleef_gone"}, + interval = 10, + chance = 20, + action = function(pos) + minetest.add_node(pos, {name = "spleef:spleef_normal"}) + end, +}) + +minetest.register_abm({ + nodenames = {"spleef:spleef_fire"}, + interval = 2, + chance = 2, + action = function(pos) + pos.y = pos.y + 1 + minetest.add_node(pos, {name = "fire:basic_flame"}) + + end, +}) + + +minetest.register_craft({ + type = "shapeless", + output = "spleef:spleef_normal", + recipe = { + "default:obsidian_glass", + "default:mese_crystal_fragment", + "default:coal_lump", + }, +}) diff --git a/license.txt b/license.txt new file mode 100644 index 0000000..e54951d --- /dev/null +++ b/license.txt @@ -0,0 +1,3 @@ +Graphics : Attribution 4.0 International (CC BY 4.0) +Code: GPLv3 + diff --git a/mod.conf b/mod.conf new file mode 100644 index 0000000..bb98913 --- /dev/null +++ b/mod.conf @@ -0,0 +1 @@ +name = spleef diff --git a/readme.txt b/readme.txt new file mode 100644 index 0000000..972b3a6 --- /dev/null +++ b/readme.txt @@ -0,0 +1 @@ +The basic spleef block is craftable from obsidian glass and a mese shard and a coal lump. The other items are not craftable or obtainable: they are spawnned as a result of gameplay. Punching a spleef node turns it into a flashing spleef node, which quickly disappears (turns into an air-like node). Spleef fire nodes sometimes occur from punching a node. They spawn fire above them, and can be puched again to disappear. diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..b32c9ab Binary files /dev/null and b/screenshot.png differ diff --git a/textures/spleef_fire.png b/textures/spleef_fire.png new file mode 100644 index 0000000..e1161d3 Binary files /dev/null and b/textures/spleef_fire.png differ diff --git a/textures/spleef_flashing.png b/textures/spleef_flashing.png new file mode 100644 index 0000000..d16a87b Binary files /dev/null and b/textures/spleef_flashing.png differ diff --git a/textures/spleef_normal.png b/textures/spleef_normal.png new file mode 100644 index 0000000..b464548 Binary files /dev/null and b/textures/spleef_normal.png differ