Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Farming: Deprecate bronze, mese and diamond hoes. Tune steel uses #2103

Merged
merged 1 commit into from
Apr 8, 2018
Merged

Farming: Deprecate bronze, mese and diamond hoes. Tune steel uses #2103

merged 1 commit into from
Apr 8, 2018

Conversation

paramat
Copy link
Contributor

@paramat paramat commented Apr 6, 2018

Attends to #1252 and partially attends to #1681
Simpifies the long-criticised excessive number of hoe tiers.

"The following are deprecated by removing the 'material' field to prevent
crafting and removing from creative inventory, to cause them to eventually
disappear from worlds. The registrations should be removed in a future
release."

Gives steel hoes 500 uses, equal to previous diamond hoes, to compensate for the extra work needed to create a steel hoe. This attends to the issue of more valuable materials not being worth using #1252

Hoes are fairly insignificant so i doubt there will be much mod breakage (if mods rely on certain hoes in recipes). There is, amazingly, an API for registering hoes so it's easy for mods to register what they want.
If merged i will add a news thread to the forum to warn of the change.

@Sokomine
Copy link

Sokomine commented Apr 6, 2018

Can't hurt to do it this way. As a hoe is needed only once per field node, the cheapest material (usually cobble) is sufficient, while steel hoes might still be useful for decorative purposes.

@paramat
Copy link
Contributor Author

paramat commented Apr 7, 2018

Maybe the uses of steel hoe could be even higher, as it is a lot more work to create one, possibly 500 to be equal to the diamond hoe? That's still only 2 mapblocks of field.

farming.register_hoe(":farming:hoe_bronze", {
description = "Bronze Hoe",
inventory_image = "farming_tool_bronzehoe.png",
max_uses = 220,
material = "default:bronze_ingot"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing material doesn't prevent a recipe being registered. You should prevent a recipe registering in the event that material is not defined, otherwise this will be an issue if we ever add a craft guide (and already will be if people add one themselves).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Yes i wondered if the 'air' recipe would be a problem.

@Ezhh
Copy link
Contributor

Ezhh commented Apr 7, 2018

For example, if you use crafting guide with this, you get:

air

This is clearly not ideal because people will see this even though it's senseless. If you give yourself air you can also get:
air2

@paramat paramat added the WIP label Apr 7, 2018
@Ezhh
Copy link
Contributor

Ezhh commented Apr 7, 2018

Another thing: If you plan to ever remove them fully, it would be good to also remove them from creative inventory.

@SmallJoker
Copy link
Member

-- Register its recipe
if def.material == nil then
minetest.register_craft({
output = name:sub(2),
recipe = def.recipe
})
else
minetest.register_craft({
output = name:sub(2),
recipe = {
{def.material, def.material, ""},
{"", "group:stick", ""},
{"", "group:stick", ""}
}
})
end

->

if def.recipe and not def.material then
	minetest.register_craft({
		output = name:sub(2),
		recipe = def.recipe
	})
elseif def.material then
	minetest.register_craft({
		output = name:sub(2),
		recipe = {
			{def.material, def.material, ""},
			{"", "group:stick", ""},
			{"", "group:stick", ""}
		}
	})
end

Solution for the hacky air workaround.

@paramat
Copy link
Contributor Author

paramat commented Apr 7, 2018

Thanks will do all suggestions.

@paramat
Copy link
Contributor Author

paramat commented Apr 8, 2018

@SmallJoker see earlier in the code, if def.recipe is nil it is defined with "air". I don't know why. Not sure i can avoid "air" recipes in a craft guide.

@benrob0329
Copy link
Member

Air hoes 🤔

@paramat paramat removed the WIP label Apr 8, 2018
@paramat
Copy link
Contributor Author

paramat commented Apr 8, 2018

60ccb52#diff-219f47a35d69ed92c4ed83e9afa809f9
Air recipe wa defined to have a recipe here, but may not be needed now.
Will fix.

@paramat
Copy link
Contributor Author

paramat commented Apr 8, 2018

Updated, now testing.

@paramat
Copy link
Contributor Author

paramat commented Apr 8, 2018

Works, now to remove from creative inventory.

Remove unnecessary "air" fallback recipe for hoes to avoid this showing
in crafting guides.
@paramat
Copy link
Contributor Author

paramat commented Apr 8, 2018

Done.
Gives steel hoes 500 uses, equal to previous diamond hoes, to compensate for the extra work needed to create a steel hoe. This attends to the issue of more valuable materials not being worth using #1252

@Ezhh
Copy link
Contributor

Ezhh commented Apr 8, 2018

Tested, recipe and creative inv issues are fixed. :)
I'm also fine with switching steel to 500.

👍

@Fixer-007
Copy link
Contributor

Seems nice

@paramat paramat merged commit 9c459e7 into minetest:master Apr 8, 2018
@Fixer-007
Copy link
Contributor

Needs write up in the news section, probably (for modders)

@paramat
Copy link
Contributor Author

paramat commented Apr 8, 2018

I'll do that next time i sign-in to the forum, on todo list.

@paramat paramat deleted the lesshoes branch May 4, 2018 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants