mirror of
https://github.com/Sokomine/cottages.git
synced 2024-11-13 05:50:30 +01:00
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
|
||||
version = 2022-09-29
|
||||
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_5")
|
||||
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 has_anvil_mod = not not cottages.has.anvil
|
||||
|
||||
cottages.settings = {
|
||||
anvil = {
|
||||
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
|
||||
repair_amount = tonumber(s:get("cottages.anvil.repair_amount")) or 4369,
|
||||
stamina = tonumber(s:get("cottages.anvil.stamina")) or 40,
|
||||
formspec_enabled = s:get_bool("cottages.anvil.formspec_enabled", true),
|
||||
tool_hud_enabled = s:get_bool("cottages.anvil.tool_hud_enabled", true),
|
||||
tool_entity_enabled = s:get_bool("cottages.anvil.tool_entity_enabled", false),
|
||||
formspec_enabled = s:get_bool("cottages.anvil.formspec_enabled", not has_anvil_mod),
|
||||
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", has_anvil_mod),
|
||||
tool_entity_displacement = tonumber(s:get("cottages.anvil.tool_entity_displacement")) or 2 / 16,
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user