Trying to create a barrel only mod, and remove pipes. I'd rather not break the existing recipes so the best way seems to be maks them unplaceable, but I couldn't find how to do this?
why? well because its nopipe november...
https://www.reddit.com/r/factorio/comme ... _november/
Any way to make an entity unbuildable?
Re: Any way to make an entity unbuildable?
Code: Select all
data.raw["item"]["pipe"].place_result = nil
data.raw["item"]["pipe-to-ground"].place_result = nil
Code: Select all
data.raw["recipe"]["fill-heavy-oil-barrel"].category = "chemistry"
data.raw["recipe"]["empty-heavy-oil-barrel"].category = "chemistry"
data.raw["recipe"]["fill-petroleum-gas-barrel"].category = "chemistry"
data.raw["recipe"]["empty-petroleum-gas-barrel"].category = "chemistry"
Re: Any way to make an entity unbuildable?
superfast reply, tyDaveMcW wrote: ↑Tue Nov 24, 2020 2:29 amFor the refinery problem, you can move some recipes to the chemical plant in data-updates.luaCode: Select all
data.raw["item"]["pipe"].place_result = nil data.raw["item"]["pipe-to-ground"].place_result = nil
Code: Select all
data.raw["recipe"]["fill-heavy-oil-barrel"].category = "chemistry" data.raw["recipe"]["empty-heavy-oil-barrel"].category = "chemistry" data.raw["recipe"]["fill-petroleum-gas-barrel"].category = "chemistry" data.raw["recipe"]["empty-petroleum-gas-barrel"].category = "chemistry"
it's now called "unknown key blah blah..."
https://prnt.sc/vot96a
whats causing the name?
while this isn't game breaking, it's a little unpolished
yeah im thinking i may just make a "barreling machine" or something, for now i've debuffed the pump's speed to discourage it over barrels, so if you wanted to go long distance it's probably not worth it anymore
Re: Any way to make an entity unbuildable?
data-updates.lua
Code: Select all
-- Remove pipes and pumps
data.raw["item"]["pipe"].place_result = nil
data.raw["item"]["pipe"].localised_name = {"entity-name.pipe"}
data.raw["item"]["pipe-to-ground"].place_result = nil
data.raw["item"]["pipe-to-ground"].localised_name = {"entity-name.pipe-to-ground"}
data.raw["item"]["storage-tank"].place_result = nil
data.raw["item"]["storage-tank"].localised_name = {"entity-name.storage-tank"}
data.raw["item"]["pump"].place_result = nil
data.raw["item"]["pump"].localised_name = {"entity-name.pump"}
-- Create chemical plant version of "fill heavy oil barrel"
local recipe = table.deepcopy(data.raw["recipe"]["fill-heavy-oil-barrel"])
recipe.name = recipe.name .. "-chemistry"
recipe.category = "chemistry"
table.insert(data.raw["technology"]["fluid-handling"].effects, {type = "unlock-recipe", recipe = recipe.name})
data:extend{recipe}
-- Create chemical plant version of "fill petroleum gas barrel"
recipe = table.deepcopy(data.raw["recipe"]["fill-petroleum-gas-barrel"])
recipe.name = recipe.name .. "-chemistry"
recipe.category = "chemistry"
table.insert(data.raw["technology"]["fluid-handling"].effects, {type = "unlock-recipe", recipe = recipe.name})
data:extend{recipe}