Compare commits
5 Commits
f5365bc7ea
...
58867d4ac3
Author | SHA1 | Date |
---|---|---|
poikilos | 58867d4ac3 | |
TenPlus1 | 03e65cadf5 | |
TenPlus1 | 58b1d70975 | |
TenPlus1 | 5fb1a5fdf1 | |
TenPlus1 | 1eb8567d74 |
|
@ -0,0 +1 @@
|
|||
Add a selection of tasty Pie/Cakes to eat.
|
22
init.lua
22
init.lua
|
@ -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",
|
||||
|
|
20
license.txt
20
license.txt
|
@ -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
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 88 KiB |
Loading…
Reference in New Issue