How to create a tech to modify chest sizes?
Posted: Sat Mar 04, 2017 10:45 pm
Hi, im stuck with idea to create a mod with tech tree which will add slots for existing storages. And i dont know how.
i dont find any modifyer for such thing, so i find advize to create sript in control to make this, but i dont know how
Here some code so tech
and code for control.lua
but it didnt work. So i need help with this idea
i dont find any modifyer for such thing, so i find advize to create sript in control to make this, but i dont know how
Here some code so tech
Code: Select all
{
type = "technology",
name = "warehouse-bonus-1",
icon = Mod_Name .. "/graphics/technology/warehouse_tech_bonus.png",
icon_size = 128,
order = "b[warehouse-bonus-1]-c",
prerequisites = {},
unit =
{
count = 20,
ingredients =
{
{"science-pack-1", 300},
},
time = 20
},
},
Code: Select all
script.on_event(defines.events.on_research_finished, function(event)
local name = research.name
if name == "warehouse-bonus-1" then warehouse_size = 80 end