1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-01-13 11:30:26 +01:00

Create spiky cactus, make the original smoother

- Remove spikes from the standard cactus' side
 - Remove spikes from all cacti's tops, and add a flower
 - Add specific texture for spiky cactus
 - Create spiky cactus and recipes to convert spiky cactus and cactus
 - Move damages from normal cactus to spiky cactus
 - For #500
This commit is contained in:
LeMagnesium 2016-09-29 21:44:22 +02:00
parent 59c4c8e919
commit 21f6ac6818
No known key found for this signature in database
GPG Key ID: A54DDB5272C51E8B
6 changed files with 35 additions and 2 deletions

View File

@ -784,6 +784,20 @@ minetest.register_craft({
} }
}) })
minetest.register_craft({
output = "default:cactus 2",
recipe = {
{"default:cactus_spiky", "default:cactus_spiky"},
},
})
minetest.register_craft({
output = "default:cactus_spiky 2",
recipe = {
{"default:cactus", "default:cactus"},
},
})
minetest.register_craft({ minetest.register_craft({
output = 'default:clay', output = 'default:clay',
recipe = { recipe = {

View File

@ -1449,6 +1449,25 @@ minetest.register_node("default:cactus", {
end, end,
}) })
minetest.register_node("default:cactus_spiky", {
description = "Spiky Cactus",
tiles = {"default_cactus_top.png", "default_cactus_top.png",
"default_cactus_spiky.png"},
paramtype2 = "facedir",
groups = {snappy = 1, choppy = 3, flammable = 2},
drop = {
items = {
{items = {"default:cactus_spiky"}},
},
},
sounds = default.node_sound_wood_defaults(),
on_place = minetest.rotate_node,
after_dig_node = function(pos, node, metadata, digger)
default.dig_up(pos, node, digger)
end,
})
minetest.register_node("default:papyrus", { minetest.register_node("default:papyrus", {
description = "Papyrus", description = "Papyrus",
drawtype = "plantlike", drawtype = "plantlike",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 309 B

After

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 267 B

After

Width:  |  Height:  |  Size: 551 B

View File

@ -104,9 +104,9 @@ minetest.register_globalstep(function(dtime)
if gameTime > 0.4 then if gameTime > 0.4 then
local pos = player:getpos() local pos = player:getpos()
-- From playerplus : -- From playerplus :
-- am I near a cactus? -- am I near a spiky cactus?
pos.y = pos.y + 0.1 pos.y = pos.y + 0.1
if minetest.find_node_near(pos, 1, "default:cactus") and player:get_hp() > 0 then if minetest.find_node_near(pos, 1, "default:cactus_spiky") and player:get_hp() > 0 then
player:set_hp(player:get_hp()-1) player:set_hp(player:get_hp()-1)
end end