Initial commit

This commit is contained in:
MrIbby 2015-11-02 19:03:49 -08:00
commit 931b5c11f3
7 changed files with 98 additions and 0 deletions

40
README.txt Normal file
View File

@ -0,0 +1,40 @@
Minetest 0.4 mod: cake
======================
License of source code:
-----------------------
The MIT License (MIT)
Copyright (c) 2015 MrIbby <siribby@outlook.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
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.
License of textures:
--------------------
Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
http://creativecommons.org/licenses/by-sa/4.0/
Authors of textures:
--------------------
Derived from textures by rubenwardy (CC BY-SA):
cake_bottom.png
cake_inner.png
cake_side.png
cake_top.png

2
depends.txt Normal file
View File

@ -0,0 +1,2 @@
bucket
farming

56
init.lua Normal file
View File

@ -0,0 +1,56 @@
local sizes = {-0.4375, -0.3125, -0.1875, -0.0625, 0.0625, 0.1875, 0.3125}
for i, size in ipairs(sizes) do
local slice = i - 1
local name
local description
local drop
local tiles
local not_in_creative_inventory
if slice == 0 then
name = "cake:cake"
description = "Cake"
drop = nil
tiles = {"cake_top.png", "cake_bottom.png", "cake_side.png"}
not_in_creative_inventory = 0
else
name = "cake:cake_"..slice
description = "Cake (Slice "..slice..")"
drop = ''
tiles = {"cake_top.png", "cake_bottom.png", "cake_side.png", "cake_inner.png", "cake_side.png", "cake_side.png"}
not_in_creative_inventory = 1
end
minetest.register_node(name, {
description = description,
drop = drop,
drawtype = "nodebox",
tiles = tiles,
paramtype = "light",
is_ground_content = false,
groups = {crumbly=3,not_in_creative_inventory=not_in_creative_inventory},
--sounds = sounds,
node_box = {
type = "fixed",
fixed = {
{size, -0.5, -0.4375, 0.4375, 0, 0.4375},
}
},
on_rightclick = function(pos, node, clicker)
clicker:set_hp(clicker:get_hp() + 1)
if i < #sizes then
minetest.swap_node(pos, {name="cake:cake_"..i})
else
minetest.remove_node(pos)
end
end,
})
end
minetest.register_craft({
type = "shapeless",
output = "cake:cake",
recipe = {"farming:flour", "farming:flour", "group:water_bucket"}
})

BIN
textures/cake_bottom.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 B

BIN
textures/cake_inner.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

BIN
textures/cake_side.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

BIN
textures/cake_top.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 B