Page 1 of 1

[0.14.2] Tech Icon Glitch with deepcopy

Posted: Fri Sep 02, 2016 11:25 am
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

Re: [0.14.2] Tech Icon Glitch with deepcopy

Posted: Fri Sep 02, 2016 11:32 am
by kovarex
YOu need to add icon_size = 128