Compare commits

...

5 Commits

Author SHA1 Message Date
poikilos 58867d4ac3 new pie_inv texture with known license and author 2019-05-13 16:00:21 -04:00
TenPlus1 03e65cadf5 update license.txt 2019-04-08 09:34:56 +01:00
TenPlus1 58b1d70975 full pie can be picked up using ethereal's crystal shovel 2018-09-30 19:05:15 +01:00
TenPlus1 5fb1a5fdf1 add some missing files 2018-07-30 13:48:39 +01:00
TenPlus1 1eb8567d74 remove pie groups and add {} drops 2018-07-27 18:52:30 +01:00
6 changed files with 43 additions and 1 deletions

1
description.txt Normal file
View File

@ -0,0 +1 @@
Add a selection of tasty Pie/Cakes to eat.

View File

@ -16,6 +16,24 @@ local replace_pie = function(node, puncher, pos)
local pie = node.name:split("_")[1]
local num = tonumber(node.name:split("_")[2])
-- are we using crystal shovel to pick up full pie using soft touch?
local tool = puncher:get_wielded_item():get_name()
if num == 0 and tool == "ethereal:shovel_crystal" then
local inv = puncher:get_inventory()
minetest.remove_node(pos)
if inv:room_for_item("main", {name = pie .. "_0"}) then
inv:add_item("main", pie .. "_0")
else
pos.y = pos.y + 0.5
minetest.add_item(pos, {name = pie .. "_0"})
end
return
end
-- eat slice or remove whole pie
if num == 3 then
node.name = "air"
@ -86,7 +104,6 @@ local register_pie = function(pie, desc)
},
inventory_image = pie .. "_inv.png",
wield_image = pie .. "_inv.png",
groups = {crumbly = 1, level = 2},
drawtype = "nodebox",
node_box = {
type = "fixed",
@ -108,6 +125,7 @@ local register_pie = function(pie, desc)
pie .. "_side.png", pie .. "_side.png", pie .. "_inside.png"
},
groups = {not_in_creative_inventory = 1},
drop = {},
drawtype = "nodebox",
node_box = {
type = "fixed",
@ -129,6 +147,7 @@ local register_pie = function(pie, desc)
pie .. "_side.png", pie .. "_side.png", pie .. "_inside.png"
},
groups = {not_in_creative_inventory = 1},
drop = {},
drawtype = "nodebox",
node_box = {
type = "fixed",
@ -150,6 +169,7 @@ local register_pie = function(pie, desc)
pie .. "_side.png", pie .. "_side.png", pie .. "_inside.png"
},
groups = {not_in_creative_inventory = 1},
drop = {},
drawtype = "nodebox",
node_box = {
type = "fixed",

View File

@ -19,3 +19,23 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Textures licensed under CC-BY-SA 3.0
http://creativecommons.org/licenses/by-sa/3.0/
lux_pp, Poikilos
pie_inv.png
TenPlus1:
pie_*.png (if not mentioned above)
choc_*.png
bana_*.png
coff_*.png
meat_*.png
rvel_*.png
scsk_*.png
CalebDavis:
brpd_*.png
orange_*.png

1
mod.conf Normal file
View File

@ -0,0 +1 @@
name = pie

BIN
pie.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 B

After

Width:  |  Height:  |  Size: 88 KiB