Hello,
i have implemented an optional dependency for bobplates. If you want you can implement the changes.
In info.json:
- added dependency: "? bobplates >= 0.17.0"
And becourse Bob changes the barrels and gas bottles after the data.lua of this mod is run i've moved all the changes into data-final-fixes.lua. Here the code i've got there:
local SIZE_STACK = settings.startup["barrel-size-stack"].value
local TIME_EMP = settings.startup["barrel-size-empty-time"].value
local TIME_FIL = settings.startup["barrel-size-fill-time"].value
local CAP = settings.startup["barrel-size-capacity"].value
--CHANGE TIME AND AMOUNT
for _,_recipe in pairs(data.raw.recipe) do
if _recipe.subgroup=="fill-barrel" or
_recipe.subgroup=="bob-gas-bottle" then
_recipe.energy_required = TIME_FIL
_recipe.ingredients[1].amount = CAP
elseif _recipe.subgroup=="empty-barrel" or
_recipe.subgroup=="bob-empty-gas-bottle" then
_recipe.energy_required = TIME_EMP
_recipe.results[1].amount = CAP
end
end
--CHANGE STACK SIZE
data.raw.item["empty-barrel"].stack_size = SIZE_STACK
for _, _item in pairs(data.raw.item) do
if _item.subgroup=="bob-gas-bottle" or
_item.subgroup=="bob-barrel"or
_item.subgroup=="fill-barrel"
then
_item.stack_size = SIZE_STACK
end
end
I don't know, if there is a way to do these changes in data.lua without getting them overridden.