I like what the upgraded electric mod does as far as condensing solar fields goes, but the graphics are too garish for me. So I made new ones based on the WaiTex accumulator textures. WaiTex handles the charge/discharge animation differently from vanilla by overlaying the animation onto the accumulator sprite using a script in an overwrite. Which is great and works like a charm for overriding default values, but I can't figure out how to make it work in the prototype file for the upgraded accumulators.
Here is the accumulator code:
Code: Select all
data:extend(
{
{
type = "accumulator",
name = "elite-accumulator",
icon = "__UpgradedElectric__/graphics/elite-accumulator/elite-accumulator-icon.png",
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "elite-accumulator"},
max_health = 250,
corpse = "medium-remnants",
collision_box = {{-0.9, -0.9}, {0.9, 0.9}},
selection_box = {{-1, -1}, {1, 1}},
energy_source =
{
type = "electric",
buffer_capacity = "500MJ",
usage_priority = "terciary",
input_flow_limit = "30MW",
output_flow_limit = "30MW"
},
picture =
{
filename = "__UpgradedElectric__/graphics/elite-accumulator/elite-accumulator.png",
priority = "extra-high",
width = 248,
height = 206,
scale = 0.5, shift = {0.7, -0.2}
},
charge_animation =
{
filename = "__UpgradedElectric__/graphics/elite-accumulator/elite-accumulator-charge-animation.png",
width = 276,
height = 270,
line_length = 6,
scale = 0.5, frame_count = 24,
shift = {0.482, -0.638},
animation_speed = 0.5
},
charge_cooldown = 30,
charge_light = {intensity = 0.3, size = 7},
discharge_animation =
{
filename = "__UpgradedElectric__/graphics/elite-accumulator/elite-accumulator-discharge-animation.png",
width = 294,
height = 256,
line_length = 6,
scale = 0.5, frame_count = 24,
shift = {0.395, -0.525},
animation_speed = 0.5
},
discharge_cooldown = 60,
discharge_light = {intensity = 0.7, size = 7},
working_sound =
{
sound =
{
filename = "__base__/sound/accumulator-working.ogg",
volume = 1
},
idle_sound = {
filename = "__base__/sound/accumulator-idle.ogg",
volume = 0.4
},
max_sounds_per_type = 5
},
}
}
)
Code: Select all
--[[basic-accumulator]]--
["__base__/graphics/entity/basic-accumulator/basic-accumulator.png"] = function(t) OverrideSprite(t[#t]) end,
["__base__/graphics/entity/basic-accumulator/basic-accumulator-charge-animation.png"] = function(t)
t[#t].layers =
{
{
width = 124 * 2,
height = 103 * 2,
frame_count = 24,
shift = {0.7, -0.2},
animation_speed = 0.5,
scale = 0.5,
stripes = (function()
result = {}
stripe =
{
filename = "__WaiTex__/graphics/entity/basic-accumulator/basic-accumulator.png",
width_in_frames = 1,
height_in_frames = 1
}
for i = 1,24 do
result[i] = stripe
end
return result
end)()
},
{
filename = "__WaiTex__/graphics/entity/basic-accumulator/basic-accumulator-charge-sparks.png",
width = 138 * 2,
height = 135 *2,
line_length = 6,
frame_count = 24,
scale = 0.5,
shift = {0.482, -0.638},
animation_speed = 0.5
}
}
end,
["__base__/graphics/entity/basic-accumulator/basic-accumulator-discharge-animation.png"] = function(t)
t[#t].layers =
{
{
width = 124 * 2,
height = 103 * 2,
frame_count = 24,
shift = {0.7, -0.2},
animation_speed = 0.5,
scale = 0.5,
stripes = (function()
result = {}
stripe =
{
filename = "__WaiTex__/graphics/entity/basic-accumulator/basic-accumulator.png",
width_in_frames = 1,
height_in_frames = 1
}
for i = 1,24 do
result[i] = stripe
end
return result
end)()
},
{
filename = "__WaiTex__/graphics/entity/basic-accumulator/basic-accumulator-discharge-sparks.png",
width = 147 * 2,
height = 128 * 2,
line_length = 6,
frame_count = 24,
scale = 0.5,
shift = {0.395, -0.525},
animation_speed = 0.5
}
}
end,