[0.14.2] Tech Icon Glitch with deepcopy

This subforum contains all the issues which we already resolved.
User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 393
Joined: Tue Jul 08, 2014 10:06 am
Contact:

[0.14.2] Tech Icon Glitch with deepcopy

Post by LuziferSenpai »

Hey,

i have created a MOD and now i have deepcopyed a technology and changed the Icon and than this happens:

Click

This the the orginal image:

Click

And this is the code:

Code: Select all

local MODNAME = "__SenpaisElectricTrains__/graphics/"

local senpais_electric_train_tech = util.table.deepcopy( data.raw["technology"]["railway"] )
senpais_electric_train_tech.name = trainname
senpais_electric_train_tech.icon = MODNAME.."tech.png"
senpais_electric_train_tech.effects = { { type = "unlock-recipe", recipe = trainname }, { type = "unlock-recipe", recipe = accuname } }
senpais_electric_train_tech.prerequisites = { "railway", "electric-engine", "battery", "electric-energy-distribution-2" }
senpais_electric_train_tech.unit = { count = 150, ingredients = { { "science-pack-1", 2 }, { "science-pack-2", 2}, { "science-pack-3", 1} }, time = 50 }
senpais_electric_train_tech.order = "s-e-t"

data:extend( { train_entity, train_item, train_recipe, accu_entity, accu_item, accu_recipe, senpais_electric_train_tech } )
I know that its all right, because the Icon is only a change to a Vanilla Icon and the code is fine because its started the game and created everything!

Greetz,

Luzifer
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai
kovarex
Factorio Staff
Factorio Staff
Posts: 8298
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.14.2] Tech Icon Glitch with deepcopy

Post by kovarex »

YOu need to add icon_size = 128
Post Reply

Return to “Resolved Problems and Bugs”