added the mod files

master
MisterE123 2020-02-16 16:55:47 -05:00 committed by GitHub
commit 7605e0ce3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 160 additions and 0 deletions

3
depends.txt Normal file
View File

@ -0,0 +1,3 @@
default
mesecons
fire

1
description.txt Normal file
View File

@ -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.

151
init.lua Normal file
View File

@ -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",
},
})

3
license.txt Normal file
View File

@ -0,0 +1,3 @@
Graphics : Attribution 4.0 International (CC BY 4.0)
Code: GPLv3

1
mod.conf Normal file
View File

@ -0,0 +1 @@
name = spleef

1
readme.txt Normal file
View File

@ -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.

BIN
screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

BIN
textures/spleef_fire.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

BIN
textures/spleef_normal.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB