fixed
delete the code of the data.lua file and paste this code:
require("styles")
local defs = require("defs")
data:extend({
{
type = "sprite",
name = defs.button_sprite_name,
filename = "solar-calc-2/button.png",
priority = "extra-high-no-scale",
mipmap_count = 2,
flags = {"gui-icon"},
width = 64,
height = 64,
scale = 1
},
{
type = "sprite",
name = defs.pin_sprite_name,
filename = "solar-calc-2/pin.png",
width = 32,
height = 32,
scale = 1
},
{
type = "sprite",
name = defs.checked_pin_sprite_name,
filename = "solar-calc-2/pin.png",
x = 32,
width = 32,
height = 32,
scale = 1
}
})
data:extend({
{
type = "custom-input",
name = defs.inputs.switch_calc_gui_input,
key_sequence = "",
action = "lua",
localised_name = {"kaktusbot-sc.switch-window"}
},
{
type = "font",
name = defs.fonts.data_label_font,
from = "default",
size = 16
},
{
type = "font",
name = defs.fonts.data_label_bold_font,
from = "default-bold",
size = 16
},
{
type = "font",
name = defs.fonts.info_label_font,
from = "default",
size = 13
}
})
if settings.startup[defs.settings.show_shortcut_bar_button].value then
data:extend({
{
type = "shortcut",
name = defs.shortcuts.switch_calc_gui_shortcut,
action = "lua",
icon = "solar-calc-2/button.png",
small_icon = "solar-calc-2/button.png",
localised_name = { "", "Solar Calculator 2.0" },
associated_control_input = defs.inputs.switch_calc_gui_input
}
})
end