Skip to content

Commit

Permalink
update remove aquaz
Browse files Browse the repository at this point in the history
  • Loading branch information
squidicuzz committed May 9, 2024
1 parent 2ed2b81 commit 673caae
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
1 change: 0 additions & 1 deletion mods/aquaz
Submodule aquaz deleted from c4cb84
34 changes: 18 additions & 16 deletions mods/ctg_world/items.lua
Original file line number Diff line number Diff line change
Expand Up @@ -145,23 +145,25 @@ minetest.register_craftitem("ctg_world:corn_on_the_cob", {
end
})

for i = 1, #aquaz.coral_deco do
local def = minetest.registered_nodes[aquaz.coral_deco[i].name]
local marked_groups = def.groups
marked_groups.hunger_amount = 4
-- Let's hack the node!
minetest.override_item(aquaz.coral_deco[i].name, {
description = S(aquaz.coral_deco[i].description) .. '\n' ..
minetest.colorize(x_farming.colors.brown, S('Hunger') .. ': 4'),
groups = marked_groups,
on_use = function(itemstack, user, pointed_thing)
local hunger_amount = minetest.get_item_group(itemstack:get_name(), "hunger_amount") or 0
if hunger_amount == 0 then
return itemstack
if minetest.get_modpath("aquaz") then
for i = 1, #aquaz.coral_deco do
local def = minetest.registered_nodes[aquaz.coral_deco[i].name]
local marked_groups = def.groups
marked_groups.hunger_amount = 4
-- Let's hack the node!
minetest.override_item(aquaz.coral_deco[i].name, {
description = S(aquaz.coral_deco[i].description) .. '\n' ..
minetest.colorize(x_farming.colors.brown, S('Hunger') .. ': 4'),
groups = marked_groups,
on_use = function(itemstack, user, pointed_thing)
local hunger_amount = minetest.get_item_group(itemstack:get_name(), "hunger_amount") or 0
if hunger_amount == 0 then
return itemstack
end
return minetest.item_eat(hunger_amount)(itemstack, user, pointed_thing)
end
return minetest.item_eat(hunger_amount)(itemstack, user, pointed_thing)
end
})
})
end
end

local growler_meat_raw = minetest.registered_items["growler:growler_meat_raw"]
Expand Down

0 comments on commit 673caae

Please sign in to comment.