forked from minetest-mods/jumping
Compare commits
8 Commits
nalc-1.2.0
...
41170cabc4
Author | SHA1 | Date | |
---|---|---|---|
41170cabc4 | |||
9519784885 | |||
93ad0f555f | |||
fb4ba8ff96 | |||
b5205e4e7d | |||
4deba41966 | |||
811847b0e7 | |||
f375986e33 |
@ -1 +0,0 @@
|
||||
default
|
@ -1 +0,0 @@
|
||||
adds trampolines, cushions, ...
|
16
init.lua
16
init.lua
@ -35,6 +35,7 @@ local power_decrease = function(pos, node)
|
||||
end
|
||||
end
|
||||
|
||||
local use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or nil
|
||||
for i = 1, 6 do
|
||||
minetest.register_node("jumping:trampoline"..i, {
|
||||
description = "Trampoline",
|
||||
@ -48,6 +49,7 @@ for i = 1, 6 do
|
||||
on_punch = trampoline_punch,
|
||||
on_rightclick = power_decrease,
|
||||
drop = "jumping:trampoline1",
|
||||
use_texture_alpha = use_texture_alpha,
|
||||
tiles = {
|
||||
"jumping_trampoline_top.png",
|
||||
"jumping_trampoline_bottom.png",
|
||||
@ -68,6 +70,7 @@ minetest.register_node("jumping:cushion", {
|
||||
node_box = cushionbox,
|
||||
selection_box = cushionbox,
|
||||
paramtype = "light",
|
||||
use_texture_alpha = use_texture_alpha,
|
||||
tiles = {
|
||||
"jumping_cushion_tb.png",
|
||||
"jumping_cushion_tb.png",
|
||||
@ -76,21 +79,26 @@ minetest.register_node("jumping:cushion", {
|
||||
groups = {dig_immediate=2, disable_jump=1, fall_damage_add_percent=-100},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
-- register recipes if the corresponding mods are present
|
||||
if minetest.get_modpath("default") then
|
||||
minetest.register_craft({
|
||||
output = "jumping:trampoline1",
|
||||
recipe = {
|
||||
{"jumping:cushion", "jumping:cushion", "jumping:cushion"},
|
||||
{"default:steel_ingot", "", "default:steel_ingot"}
|
||||
}
|
||||
})
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
if minetest.get_modpath("farming") and minetest.get_modpath("wool") then
|
||||
minetest.register_craft({
|
||||
output = "jumping:cushion",
|
||||
recipe = {
|
||||
{"farming:cotton", "group:wool", "farming:cotton"},
|
||||
{"farming:cotton", "group:wool", "farming:cotton"},
|
||||
{"farming:cotton", "farming:cotton", "farming:cotton"}
|
||||
}
|
||||
})
|
||||
})
|
||||
end
|
||||
|
||||
minetest.log("action", "[jumping] loaded.")
|
||||
|
Reference in New Issue
Block a user