Skip to content

Commit

Permalink
Merge pull request #2 from Lazerbeak12345/add_ediblestuff_api
Browse files Browse the repository at this point in the history
Add ediblestuff_api as an optional dependancy.
  • Loading branch information
dacmot authored Feb 3, 2022
2 parents ad58ea9 + bace2c1 commit 1d4821c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ moarmour = {
dofile(moarmour_path.."/nodes.lua")
dofile(moarmour_path.."/crafts.lua")
dofile(moarmour_path.."/armour.lua")
-- Optional mod-specific stuff --
if minetest.get_modpath("ediblestuff_api") then
dofile(moarmour_path.."/make_edible.lua")
end
11 changes: 11 additions & 0 deletions make_edible.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
if minetest.get_modpath("waffles") then
-- A waffle block is 9 waffles, 8 stamina each. This is huge.
-- Let's just do 20 for all waffle armor peices.
ediblestuff.make_armor_edible_while_wearing("moarmour","waffle",20,true)
end
if minetest.get_modpath("farming") and farming.mod == "redo" then
ediblestuff.make_armor_edible_while_wearing("moarmour","chocolate",2.5)
end
if minetest.get_modpath("candycane") then
ediblestuff.make_armor_edible_while_wearing("moarmour","cane",3.5)
end
2 changes: 1 addition & 1 deletion mod.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = moarmour
description = Additional armors to build and wear
depends = default,3d_armor
optional_depends = nyancats_plus,waffles,farming,nanotech,even_mosword,candycane,moreores,bones,bonemeal,xpanes,tac_nayn,sky_tools,emeralds,gems,terumet
optional_depends = nyancats_plus,waffles,farming,nanotech,even_mosword,candycane,moreores,bones,bonemeal,xpanes,tac_nayn,sky_tools,emeralds,gems,terumet,ediblestuff_api

0 comments on commit 1d4821c

Please sign in to comment.