added the mod files
commit
7605e0ce3f
|
@ -0,0 +1,3 @@
|
|||
default
|
||||
mesecons
|
||||
fire
|
|
@ -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.
|
|
@ -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",
|
||||
},
|
||||
})
|
|
@ -0,0 +1,3 @@
|
|||
Graphics : Attribution 4.0 International (CC BY 4.0)
|
||||
Code: GPLv3
|
||||
|
|
@ -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.
|
Binary file not shown.
After Width: | Height: | Size: 176 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 6.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
Loading…
Reference in New Issue