Closed serenibyss closed 3 years ago
@DStrand1: since we made other changes to support the ItemStack stuff, there's now merge conflicts in this PR. If you can rebase your commits off of the current state of the config-refactor
branch that should resolve the issue.
Merge conflict is now resolved
One thing I noticed while testing this PR. If I cleared the fuel option in the config, the cake would still display the fuel in the tooltip. This is because it was falling back to the default item. One possible improvement/change for later versions is having the cake not able to be refueled, therefore become a limited time item, which would require changing the default fuel system implemented here. This is best left to a future PR though, if there is even interest in the feature.
As a note, the config option for enabling the custom cake should have an additional line that at least one entry in the dimensions section of the custom cake config is required to generate a cake.
If I cleared the fuel option in the config, the cake would still display the fuel in the tooltip. This is because it was falling back to the default item.
The way I implemented the fuel configs cache in the CustomCake is that it would start empty, invalidate when configuration is initialized or changed, and replace the existing state only if the configs were actually parseable. This prevents someone from using half-broken configs, and struck me as the safest approach at the time.
Edit: as clarified in Discord, you were actually talking about the non-custom cakes. The behavior described is as intended currently and removing fueling entirely would be a separate endeavor.
This commit is on top of PR #19, since it depends on the fuel being handled as an ItemStack, otherwise it gets an incorrect translation key when an Item uses NBT or metadata like Oak Saplings.
The tooltip follows the same formatting as is applied via scripts in Omnifactory: