Note: Now it is avaible with the hud mod.
Download(ZIP): https://github.com/Mitroman/pie/archive/master.zip
Code: https://github.com/Mitroman/pie
License: CC-BY-SA 3.0
Depends: default, farming
I hope you enjoy my mod. Cause I am proud of it. :).
default
farmingWuzzy wrote:The mod is missing a depends.txt file.
Your mod depends on farming from minetest_game, because you use farming:flour and farming:wheat. And it also depends on default, because of the papyrus you need for sugar.
Please add a depends.txt with this contents:Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
default
farming
The descriptions for all cake sizes are identical. I would change the descriptions for the “cake parts” to something like “three-quarter cake”, “half cake” and “quarter cake”.
rubenwardy wrote:You can still call it cake, but you need to change the mod namespace (the folder it is saved in).
However a different name is better.
Mitroman wrote:Wuzzy wrote:The mod is missing a depends.txt file.
Your mod depends on farming from minetest_game, because you use farming:flour and farming:wheat. And it also depends on default, because of the papyrus you need for sugar.
Please add a depends.txt with this contents:Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
default
farming
The descriptions for all cake sizes are identical. I would change the descriptions for the “cake parts” to something like “three-quarter cake”, “half cake” and “quarter cake”.
Added / Changed.
Wuzzy wrote:Mitroman wrote:Wuzzy wrote:The mod is missing a depends.txt file.
Your mod depends on farming from minetest_game, because you use farming:flour and farming:wheat. And it also depends on default, because of the papyrus you need for sugar.
Please add a depends.txt with this contents:Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
default
farming
The descriptions for all cake sizes are identical. I would change the descriptions for the “cake parts” to something like “three-quarter cake”, “half cake” and “quarter cake”.
Added / Changed.
There is still no depends.txt file.
Mitroman wrote:But It is on the forum so... but I will add the "depends.txt" file now...
rubenwardy wrote:Mitroman wrote:But It is on the forum so... but I will add the "depends.txt" file now...
People may not read it, and the Minetest program can not access the forum.
rubenwardy wrote:I am using this a decoration on my local game I quite like it. I am just trying to help.
minetest.register_craftitem("pie:knife", {
description = "Pie knife",
inventory_image = "pie_knife.png",
stack_max = 1,
on_use = function(itemstack, user, pointed_thing)
if pointed_thing.type ~= "node" then
return
end
local node = minetest.get_node(pointed_thing.under).name
if test_pie(node) then
minetest.chat_send_player(user:get_player_name(), "Cannot eat block!")
return
end
if minetest.get_modpath("hud") then
local name = user:get_player_name()
local h = tonumber(hud.hunger[name])
h=h+4
if h>30 then
minetest.chat_send_player(user:get_player_name(), "Cannot eat, not hungry")
return
end
hud.hunger[name]=h
hud.set_hunger(user)
else
if user:get_hp() == 20 then
minetest.chat_send_player(user:get_player_name(), "Cannot eat, health full")
return
end
user:set_hp(user:get_hp() + 4)
end
local pos = pointed_thing.under
minetest.set_node(pos, {name=eat_pie(node)})
end
})Mitroman wrote:I am so proud about myself that I can make "good" mods, but at the moment not.
ExeterDad wrote:Mitroman wrote:I am so proud about myself that I can make "good" mods, but at the moment not.
Please do not be discouraged! I've had a rough time getting my children to abandon MC pocket edition. And this mod has been very helpful and enjoyed by them since I installed it.
You should hear their voices when they are using your cake :P Good times.
Thank you for your work, and please keep it up.
I believe your friends are giving you "constructive criticism", which doesn't always "sound" pleasant via text.
TenPlus1 wrote:Great mod, am using it on Xanadu server and I changed the code slightly to work with the HUD mod and hunger... Here's what I changed in the item.lua file:Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_craftitem("pie:knife", {
description = "Pie knife",
inventory_image = "pie_knife.png",
stack_max = 1,
on_use = function(itemstack, user, pointed_thing)
if pointed_thing.type ~= "node" then
return
end
local node = minetest.get_node(pointed_thing.under).name
if test_pie(node) then
minetest.chat_send_player(user:get_player_name(), "Cannot eat block!")
return
end
if minetest.get_modpath("hud") then
local name = user:get_player_name()
local h = tonumber(hud.hunger[name])
h=h+4
if h>30 then
minetest.chat_send_player(user:get_player_name(), "Cannot eat, not hungry")
return
end
hud.hunger[name]=h
hud.set_hunger(user)
else
if user:get_hp() == 20 then
minetest.chat_send_player(user:get_player_name(), "Cannot eat, health full")
return
end
user:set_hp(user:get_hp() + 4)
end
local pos = pointed_thing.under
minetest.set_node(pos, {name=eat_pie(node)})
end
})
Mitroman wrote:TenPlus1 wrote:Great mod, am using it on Xanadu server and I changed the code slightly to work with the HUD mod and hunger... Here's what I changed in the item.lua file:Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_craftitem("pie:knife", {
description = "Pie knife",
inventory_image = "pie_knife.png",
stack_max = 1,
on_use = function(itemstack, user, pointed_thing)
if pointed_thing.type ~= "node" then
return
end
local node = minetest.get_node(pointed_thing.under).name
if test_pie(node) then
minetest.chat_send_player(user:get_player_name(), "Cannot eat block!")
return
end
if minetest.get_modpath("hud") then
local name = user:get_player_name()
local h = tonumber(hud.hunger[name])
h=h+4
if h>30 then
minetest.chat_send_player(user:get_player_name(), "Cannot eat, not hungry")
return
end
hud.hunger[name]=h
hud.set_hunger(user)
else
if user:get_hp() == 20 then
minetest.chat_send_player(user:get_player_name(), "Cannot eat, health full")
return
end
user:set_hp(user:get_hp() + 4)
end
local pos = pointed_thing.under
minetest.set_node(pos, {name=eat_pie(node)})
end
})
Cool. Thanks. :) I tried to make it avaible for the hud mod but I failed. Could I copy your code (for the hud mod to make it avaible) ? And what is the IP for the server? (I wanna join your server)
TenPlus manages the well known Xanadu server. You can find the IP at minetest.net/servers, or use the in game public server list to connect.
Also, this is open source. As long as you use the correct licenses, you are free to copy code.
Inocudom wrote:Would this mod be compatible with the following farming mod by MTDad?
https://forum.minetest.net/viewtopic.php?f=9&t=10187&hilit=mtdad
Mitroman wrote:Inocudom wrote:Would this mod be compatible with the following farming mod by MTDad?
https://forum.minetest.net/viewtopic.php?f=9&t=10187&hilit=mtdad
Yeah it could be but I am now "offline" so I don't update my mods anymore. Maybe forever But you could ask another modder to fork my project.
Users browsing this forum: No registered users and 16 guests