override anvil mod if present
This commit is contained in:
parent
e764a6d05c
commit
e88660462f
2
mod.conf
2
mod.conf
|
@ -6,4 +6,4 @@ description = Contains nodes for building medieval houses.
|
||||||
url = https://github.com/sokomine/cottages
|
url = https://github.com/sokomine/cottages
|
||||||
version = 2022-09-29
|
version = 2022-09-29
|
||||||
depends = futil
|
depends = futil
|
||||||
optional_depends = bucket, default, doors, env_sounds, ethereal, farming, moreblocks, node_entity_queue, player_api, player_monoids, stairs, stairsplus, stamina, technic, unified_inventory, wool, workbench
|
optional_depends = anvil, bucket, default, doors, env_sounds, ethereal, farming, moreblocks, node_entity_queue, player_api, player_monoids, stairs, stairsplus, stamina, technic, unified_inventory, wool, workbench
|
||||||
|
|
|
@ -25,3 +25,11 @@ if cottages.has.technic then
|
||||||
cottages.anvil.make_unrepairable("technic:mining_drill_mk3_4")
|
cottages.anvil.make_unrepairable("technic:mining_drill_mk3_4")
|
||||||
cottages.anvil.make_unrepairable("technic:mining_drill_mk3_5")
|
cottages.anvil.make_unrepairable("technic:mining_drill_mk3_5")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if cottages.has.anvil then
|
||||||
|
minetest.clear_craft({output = "anvil:anvil"})
|
||||||
|
minetest.register_alias_force("anvil:anvil", "cottages:anvil")
|
||||||
|
|
||||||
|
minetest.clear_craft({output = "anvil:hammer"})
|
||||||
|
minetest.register_alias_force("anvil:hammer", "cottages:hammer")
|
||||||
|
end
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
local s = minetest.settings
|
local s = minetest.settings
|
||||||
|
|
||||||
|
local has_anvil_mod = not not cottages.has.anvil
|
||||||
|
|
||||||
cottages.settings = {
|
cottages.settings = {
|
||||||
anvil = {
|
anvil = {
|
||||||
enabled = s:get_bool("cottages.anvil.enabled", true),
|
enabled = s:get_bool("cottages.anvil.enabled", true),
|
||||||
|
@ -9,9 +11,9 @@ cottages.settings = {
|
||||||
hud_timeout = tonumber(s:get("cottages.anvil.hud_timeout")) or 2, -- seconds
|
hud_timeout = tonumber(s:get("cottages.anvil.hud_timeout")) or 2, -- seconds
|
||||||
repair_amount = tonumber(s:get("cottages.anvil.repair_amount")) or 4369,
|
repair_amount = tonumber(s:get("cottages.anvil.repair_amount")) or 4369,
|
||||||
stamina = tonumber(s:get("cottages.anvil.stamina")) or 40,
|
stamina = tonumber(s:get("cottages.anvil.stamina")) or 40,
|
||||||
formspec_enabled = s:get_bool("cottages.anvil.formspec_enabled", true),
|
formspec_enabled = s:get_bool("cottages.anvil.formspec_enabled", not has_anvil_mod),
|
||||||
tool_hud_enabled = s:get_bool("cottages.anvil.tool_hud_enabled", true),
|
tool_hud_enabled = s:get_bool("cottages.anvil.tool_hud_enabled", not has_anvil_mod),
|
||||||
tool_entity_enabled = s:get_bool("cottages.anvil.tool_entity_enabled", false),
|
tool_entity_enabled = s:get_bool("cottages.anvil.tool_entity_enabled", has_anvil_mod),
|
||||||
tool_entity_displacement = tonumber(s:get("cottages.anvil.tool_entity_displacement")) or 2 / 16,
|
tool_entity_displacement = tonumber(s:get("cottages.anvil.tool_entity_displacement")) or 2 / 16,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue