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:
parent
59c4c8e919
commit
21f6ac6818
@ -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 = {
|
||||||
|
@ -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",
|
||||||
|
BIN
minetestforfun_game/mods/default/textures/default_cactus_side.png
Executable file → Normal file
BIN
minetestforfun_game/mods/default/textures/default_cactus_side.png
Executable file → Normal file
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 |
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user