From 21f6ac681868ead6e5008fa31f21ba598fd9d05f Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Thu, 29 Sep 2016 21:44:22 +0200 Subject: [PATCH] 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 --- minetestforfun_game/mods/default/crafting.lua | 14 +++++++++++++ minetestforfun_game/mods/default/nodes.lua | 19 ++++++++++++++++++ .../default/textures/default_cactus_side.png | Bin 309 -> 505 bytes .../default/textures/default_cactus_spiky.png | Bin 0 -> 356 bytes .../default/textures/default_cactus_top.png | Bin 267 -> 551 bytes mods/sprint/esprint.lua | 4 ++-- 6 files changed, 35 insertions(+), 2 deletions(-) mode change 100755 => 100644 minetestforfun_game/mods/default/textures/default_cactus_side.png create mode 100644 minetestforfun_game/mods/default/textures/default_cactus_spiky.png diff --git a/minetestforfun_game/mods/default/crafting.lua b/minetestforfun_game/mods/default/crafting.lua index 0a2bbd15..89779149 100755 --- a/minetestforfun_game/mods/default/crafting.lua +++ b/minetestforfun_game/mods/default/crafting.lua @@ -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 = { diff --git a/minetestforfun_game/mods/default/nodes.lua b/minetestforfun_game/mods/default/nodes.lua index 331aa1bc..5ed8ecbb 100755 --- a/minetestforfun_game/mods/default/nodes.lua +++ b/minetestforfun_game/mods/default/nodes.lua @@ -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", diff --git a/minetestforfun_game/mods/default/textures/default_cactus_side.png b/minetestforfun_game/mods/default/textures/default_cactus_side.png old mode 100755 new mode 100644 index e5c10c3399e84a0307dc2ab8dcae19d6a7cf2b10..530316a4c7940a63d256ae630fc6495da28d1799 GIT binary patch delta 490 zcmV3k`9_Sg+{72s>5sZs;kYw& z+84txc`mi*(q!xngNLmU{!Sd12_z)_A_P+bAl_YY$tvxRO`$ g67tIYnrzbj3jp18Gi!+001a04^sdD07y_wR7J!s#}Z`4pgg4z3R$H`#f}mpJkeVdI}{YL#}t?Y ruE>`LVX1$>-X5hrtk%Z*wDJ1~k|_qyc5Y(600000NkvXXu0mjf1q5oS diff --git a/minetestforfun_game/mods/default/textures/default_cactus_spiky.png b/minetestforfun_game/mods/default/textures/default_cactus_spiky.png new file mode 100644 index 0000000000000000000000000000000000000000..cdceed2f6b09db7281b334664b049a50244f4877 GIT binary patch literal 356 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!M}SX=>+wD7)N&ZKOBocB7&MC+ z)C(DuGZ>Uo8FVTb{XE)7O>#0jI1m3)g$CTqU5;dQTU} z5Q)pO=iMhU8}cwaGz4ZY;r#aQe|^@?aIu>Vg)Qf%b8AjKVN(z~#WMEcvGz*Ft=peP z`dgKpFU&A&UUd2Wqtf{+IOX?>9CO>VaYMQLw>L)Kd-Uf__vUw9A##{=fp_4O>mt#& zErO0%vA@*|`h3K>nZ?*qZHggt^z*&$+a}i(_v9)ASl*sA0oqvj1R6CtXNmkpg{#Czz z|IXfhX1sn6^#Y13Uc_;LqeAX%?bqNc@P92IHXv>WdVsLApRRjV%3xrC+|3LGFK0f1BZJ#| zaiV=5Qol{$u(kJFx1gE*NxQyY^X2E#bh?P_<2S}h<$tgR?Je>2$wZt4%p@M4OL`>@ zFzVWyE2V<_)$(MV@+Rh^TbWyt!#)-mI}p@u|UaFtBey{68pPL3w3vbVa(A(-jU~DiAid c`qtL}mJ>qBtobO$2mk;807*qoM6N<$f)W$$aR2}S delta 251 zcmV@Bz845L$%qtxd z6d0sBn8YhhySFiLWT{D-xN_fPIH4jqS*;`I834!wDX`517>xh`002ovPDHLkV1k9c BSAPHi diff --git a/mods/sprint/esprint.lua b/mods/sprint/esprint.lua index 0c2c8ce0..fc1569cd 100755 --- a/mods/sprint/esprint.lua +++ b/mods/sprint/esprint.lua @@ -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