Skip to content

Commit

Permalink
update for 0.16
Browse files Browse the repository at this point in the history
  • Loading branch information
skandragon committed Dec 15, 2017
1 parent 895cc06 commit 4c60159
Show file tree
Hide file tree
Showing 36 changed files with 145 additions and 8 deletions.
118 changes: 118 additions & 0 deletions data.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,121 @@

-- TODO: This is copied from base, and should be something we can just require.
function get_circuit_connector_sprites(mainOffset, shadowOffset, connectorNumber)
local logisticAnimationOffsets =
{
{-0.171875, -0.109375}, -- 0
{0, 0}, -- 1 (missing)
{0.015625, 0.015625},
{0.140625, -0.015625},
{0.203125, -0.109375},
{0.140625, -0.203125}, --5
{0.015625, -0.234375},
{-0.109375, -0.203125},
{-0.234375, -0.015625},
{-0.171875, 0.109375},
{0.015625, 0.140625}, -- 10
{0.203125, 0.078125},
{0.265625, -0.046875},
{0.203125, -0.171875},
{0.015625, -0.234375},
{-0.203125, -0.203125}, --15
{-0.265625, 0.046875},
{-0.171875, 0.171875},
{0.015625, 0.234375},
{0.171875, 0.171875},
{0.265625, 0.046875}, -- 20
{0.171875, -0.109375},
{-0.015625, -0.171875},
{-0.203125, -0.078125},
{-0.203125, 0.140625},
{-0.140625, 0.234375}, --25
{0.015625, 0.265625},
{0.140625, 0.234375},
{0.203125, 0.140625},
{0.109375, -0.140625},
{-0.015625, -0.203125}, --30
{-0.140625, -0.078125},
};
local result =
{
connector_main =
{
filename = "__skan-advanced-solar__/graphics/entity/circuit-connector/circuit-connector-main.png",
priority = "low",
width = 28,
height = 27,
x = 28*(connectorNumber%8),
y = 27*(math.floor(connectorNumber/8)),
shift = {0 + mainOffset[1], 0.015625 + mainOffset[2]},
},
led_red =
{
filename = "__skan-advanced-solar__/graphics/entity/circuit-connector/circuit-connector-led-red.png",
priority = "low",
width = 20,
height = 16,
x = 20*(connectorNumber%8),
y = 16*(math.floor(connectorNumber/8)),
shift = {0 + mainOffset[1], -0.03125 + mainOffset[2]},
},
led_green =
{
filename = "__skan-advanced-solar__/graphics/entity/circuit-connector/circuit-connector-led-green.png",
priority = "low",
width = 20,
height = 16,
x = 20*(connectorNumber%8),
y = 16*(math.floor(connectorNumber/8)),
shift = {0 + mainOffset[1], -0.03125 + mainOffset[2]},
},
led_blue =
{
filename = "__skan-advanced-solar__/graphics/entity/circuit-connector/circuit-connector-led-blue.png",
priority = "low",
width = 21,
height = 22,
x = 21*(connectorNumber%8),
y = 22*(math.floor(connectorNumber/8)),
shift = {-0.015625 + mainOffset[1], 0 + mainOffset[2]},
},

logistic_animation =
{
filename = "__skan-advanced-solar__/graphics/entity/circuit-connector/circuit-connector-logistic-animation.png",
priority = "low",
blend_mode = "additive",
line_length = 4,
width = 43,
height = 43,
frame_count = 15,
shift = {0.015625 + logisticAnimationOffsets[connectorNumber+1][1] + mainOffset[1], -0.234375 + logisticAnimationOffsets[connectorNumber+1][2] + mainOffset[2]},
},

led_light =
{
intensity = 0.8,
size = 0.9,
},

blue_led_light_offset = {0 + mainOffset[1], -0.03125 + mainOffset[2]},
red_green_led_light_offset = {0 + mainOffset[1], -0.15625 + mainOffset[2]},
};

if (not (shadowOffset == nil)) then
result.connector_shadow =
{
filename = "__skan-advanced-solar__/graphics/entity/circuit-connector/circuit-connector-shadow.png",
priority = "low",
width = 34,
height = 26,
x = 34*(connectorNumber%8),
y = 26*(math.floor(connectorNumber/8)),
shift = {0.125 + shadowOffset[1], 0.09375 + shadowOffset[2]},
};
end
return result;
end

-- advanced accumulator
require("prototypes.entity.advanced-accumulator")
require("prototypes.item.advanced-accumulator")
Expand Down
Binary file added graphics/.DS_Store
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions info.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "skan-advanced-solar",
"version": "1.0.0",
"version": "1.1.0",
"title": "Skandragon's Advanced Solar",
"author": "Skandragon",
"homepage": "https://github.com/skandragon/skan-advanced-solar",
"description": "Additional solar panels and accumulators to save space.",
"factorio_version": "0.15"
"factorio_version": "0.16"
}
Binary file added prototypes/.DS_Store
Binary file not shown.
4 changes: 3 additions & 1 deletion prototypes/entity/advanced-accumulator.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@

data:extend(
{
{
type = "accumulator",
name = "advanced-accumulator",
icon = "__skan-advanced-solar__/graphics/advanced-accumulator/advanced-accumulator.png",
icon = "__skan-advanced-solar__/graphics/advanced-accumulator/advanced-accumulator-icon.png",
icon_size = 32,
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "advanced-accumulator"},
max_health = 250,
Expand Down
3 changes: 2 additions & 1 deletion prototypes/entity/advanced-solar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ data:extend(
{
type = "solar-panel",
name = "advanced-solar",
icon = "__skan-advanced-solar__/graphics/advanced-solar/advanced-solar.png",
icon = "__skan-advanced-solar__/graphics/advanced-solar/advanced-solar-icon.png",
icon_size = 32,
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "advanced-solar"},
max_health = 150,
Expand Down
3 changes: 2 additions & 1 deletion prototypes/entity/elite-accumulator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ data:extend(
{
type = "accumulator",
name = "elite-accumulator",
icon = "__skan-advanced-solar__/graphics/elite-accumulator/elite-accumulator.png",
icon = "__skan-advanced-solar__/graphics/elite-accumulator/elite-accumulator-icon.png",
icon_size = 32,
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "elite-accumulator"},
max_health = 250,
Expand Down
3 changes: 2 additions & 1 deletion prototypes/entity/elite-solar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ data:extend(
{
type = "solar-panel",
name = "elite-solar",
icon = "__skan-advanced-solar__/graphics/elite-solar/elite-solar.png",
icon = "__skan-advanced-solar__/graphics/elite-solar/elite-solar-icon.png",
icon_size = 32,
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "elite-solar"},
max_health = 250,
Expand Down
3 changes: 2 additions & 1 deletion prototypes/entity/ultimate-accumulator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ data:extend(
{
type = "accumulator",
name = "ultimate-accumulator",
icon = "__skan-advanced-solar__/graphics/ultimate-accumulator/ultimate-accumulator.png",
icon = "__skan-advanced-solar__/graphics/ultimate-accumulator/ultimate-accumulator-icon.png",
icon_size = 32,
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "ultimate-accumulator"},
max_health = 500,
Expand Down
3 changes: 2 additions & 1 deletion prototypes/entity/ultimate-solar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ data:extend(
{
type = "solar-panel",
name = "ultimate-solar",
icon = "__skan-advanced-solar__/graphics/ultimate-solar/ultimate-solar.png",
icon = "__skan-advanced-solar__/graphics/ultimate-solar/ultimate-solar-icon.png",
icon_size = 32,
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "ultimate-solar"},
max_health = 500,
Expand Down
1 change: 1 addition & 0 deletions prototypes/item/advanced-accumulator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ data:extend(
type = "item",
name = "advanced-accumulator",
icon = "__skan-advanced-solar__/graphics/advanced-accumulator/advanced-accumulator-icon.png",
icon_size = 32,
flags = {"goes-to-quickbar"},
subgroup = "energy",
order = "e-b",
Expand Down
1 change: 1 addition & 0 deletions prototypes/item/advanced-solar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ data:extend(
type = "item",
name = "advanced-solar",
icon = "__skan-advanced-solar__/graphics/advanced-solar/advanced-solar-icon.png",
icon_size = 32,
flags = {"goes-to-quickbar"},
subgroup = "energy",
order = "d[solar-panel]-a[solar-panel]",
Expand Down
1 change: 1 addition & 0 deletions prototypes/item/elite-accumulator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ data:extend(
type = "item",
name = "elite-accumulator",
icon = "__skan-advanced-solar__/graphics/elite-accumulator/elite-accumulator-icon.png",
icon_size = 32,
flags = {"goes-to-quickbar"},
subgroup = "energy",
order = "e-b",
Expand Down
1 change: 1 addition & 0 deletions prototypes/item/elite-solar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ data:extend(
type = "item",
name = "elite-solar",
icon = "__skan-advanced-solar__/graphics/elite-solar/elite-solar-icon.png",
icon_size = 32,
flags = {"goes-to-quickbar"},
subgroup = "energy",
order = "d[solar-panel]-a[solar-panel]",
Expand Down
1 change: 1 addition & 0 deletions prototypes/item/ultimate-accumulator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ data:extend(
type = "item",
name = "ultimate-accumulator",
icon = "__skan-advanced-solar__/graphics/ultimate-accumulator/ultimate-accumulator-icon.png",
icon_size = 32,
flags = {"goes-to-quickbar"},
subgroup = "energy",
order = "e-b",
Expand Down
1 change: 1 addition & 0 deletions prototypes/item/ultimate-solar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ data:extend(
type = "item",
name = "ultimate-solar",
icon = "__skan-advanced-solar__/graphics/ultimate-solar/ultimate-solar-icon.png",
icon_size = 32,
flags = {"goes-to-quickbar"},
subgroup = "energy",
order = "d[solar-panel]-a[solar-panel]",
Expand Down
1 change: 1 addition & 0 deletions prototypes/technology/advanced-accumulator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ data:extend(
type = "technology",
name = "advanced-accumulators",
icon = "__base__/graphics/technology/electric-energy-acumulators.png",
icon_size = 128,
effects =
{
{
Expand Down
1 change: 1 addition & 0 deletions prototypes/technology/advanced-solar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ data:extend(
type = "technology",
name = "advanced-solar",
icon = "__base__/graphics/technology/solar-energy.png",
icon_size = 128,
effects =
{
{
Expand Down
1 change: 1 addition & 0 deletions prototypes/technology/elite-accumulator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ data:extend(
type = "technology",
name = "elite-accumulators",
icon = "__base__/graphics/technology/electric-energy-acumulators.png",
icon_size = 128,
effects =
{
{
Expand Down
1 change: 1 addition & 0 deletions prototypes/technology/elite-solar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ data:extend(
type = "technology",
name = "elite-solar",
icon = "__base__/graphics/technology/solar-energy.png",
icon_size = 128,
effects =
{
{
Expand Down
1 change: 1 addition & 0 deletions prototypes/technology/ultimate-accumulator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ data:extend(
type = "technology",
name = "ultimate-accumulators",
icon = "__base__/graphics/technology/electric-energy-acumulators.png",
icon_size = 128,
effects =
{
{
Expand Down
1 change: 1 addition & 0 deletions prototypes/technology/ultimate-solar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ data:extend(
type = "technology",
name = "ultimate-solar",
icon = "__base__/graphics/technology/solar-energy.png",
icon_size = 128,
effects =
{
{
Expand Down

0 comments on commit 4c60159

Please sign in to comment.