Skip to content
This repository has been archived by the owner on Aug 20, 2020. It is now read-only.

Commit

Permalink
Create spiky cactus, make the original smoother
Browse files Browse the repository at this point in the history
 - 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
  • Loading branch information
Lymkwi committed Sep 29, 2016
1 parent 59c4c8e commit 21f6ac6
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 2 deletions.
14 changes: 14 additions & 0 deletions minetestforfun_game/mods/default/crafting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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({
output = 'default:clay',
recipe = {
Expand Down
19 changes: 19 additions & 0 deletions minetestforfun_game/mods/default/nodes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1449,6 +1449,25 @@ minetest.register_node("default:cactus", {
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", {
description = "Papyrus",
drawtype = "plantlike",
Expand Down
Binary file modified minetestforfun_game/mods/default/textures/default_cactus_side.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified minetestforfun_game/mods/default/textures/default_cactus_top.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions mods/sprint/esprint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ minetest.register_globalstep(function(dtime)
if gameTime > 0.4 then
local pos = player:getpos()
-- From playerplus :
-- am I near a cactus?
-- am I near a spiky cactus?
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)
end

Expand Down

0 comments on commit 21f6ac6

Please sign in to comment.