i try to modify the Cargo-Wagons inventory Size by researching a technology.
But i can't figure out the nothing type effect_description usage.
1 - How do i get the Locales to work?
technology.lua:
Code: Select all
data:extend(
{
{
type = "technology",
name = "cargo-wagon-inventory-1",
-- and so on
effects =
{
{
type = "nothing",
effect_description = "cargo-wagon-decription",
},
},
-- unit, time, etc
})
2 - How do i check if the currently researched Tech is the right one?
3 - How can i change the Cargo Wagons inventory_size for every alredy placed Cargowagons and also for the ones in my Inventory or a Chest.
Do i also have to change the entity itself so a new one built will get changhed too?
As far as i know i have to do this in control.lua:
Code: Select all
script.on_event(
{
defines.events.on_research_finished
},
function()
wagon = game.get_entity_by_tag("cargo-wagon")
wagon.inventory_size = 50
end
)