Skip to content

Commit

Permalink
Update to 1.1
Browse files Browse the repository at this point in the history
Signed-off-by: Jelmergu <github@jelmerwijnja.nl>
  • Loading branch information
Jelmergu committed Jan 12, 2021
1 parent c602701 commit c102902
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
7 changes: 7 additions & 0 deletions changelog.txt
@@ -0,0 +1,7 @@
---------------------------------------------------------------------------------------------------
Version: 1.1.0
Date: 12. 01. 2021
General:
- Update for 1.1
Bug fix:
- Fix not being able to copy to the combinator because the source had 2 more signal slots
7 changes: 3 additions & 4 deletions control.lua
Expand Up @@ -5,7 +5,7 @@ local function sync_all()
if params ~= nil then
for k1, surface in pairs(game.surfaces) do
for k2, entity in pairs(surface.find_entities_filtered{name="global-constant-combinator"}) do
entity.get_control_behavior().parameters = {parameters = params}
entity.get_control_behavior().parameters = params
end
end
end
Expand All @@ -26,7 +26,7 @@ script.on_event(
local control_behavior = entity.get_control_behavior()
local params = global["global-constant-combinator-params"]
if params ~= nil then
control_behavior.parameters = {parameters = params}
control_behavior.parameters = params
end
end
end
Expand All @@ -37,8 +37,7 @@ script.on_event(
function (event)
local entity = game.players[event.player_index].entity_copy_source
if entity ~= nil and entity.name == "constant-combinator" then
local params = entity.get_control_behavior().parameters["parameters"]
global["global-constant-combinator-params"] = params
global["global-constant-combinator-params"] = entity.get_control_behavior().parameters
sync_all()
end
end
Expand Down
2 changes: 1 addition & 1 deletion data.lua
Expand Up @@ -5,7 +5,7 @@ data:extend{
type="custom-input",
name="paste-from-constant-combinator",
key_sequence="CONTROL + SHIFT + mouse-button-1",
consuming="script-only"
consuming="game-only"
}
}
require("prototypes.item")
Expand Down
4 changes: 2 additions & 2 deletions info.json
@@ -1,11 +1,11 @@
{
"name": "GlobalConstantCombinator",
"version": "0.18.0",
"version": "1.1.0",
"title": "Global Constant Combinator",
"author": "aaaaaaaaaaaaaaaaaa8, Jelmergu",
"contact": "",
"homepage": "https://github.com/Jelmergu/GlobalConstantCombinator",
"factorio_version": "0.18",
"factorio_version": "1.1",
"dependencies": ["base >= 0.17"],
"description": "Output the same constant circuit network signal for all Global constant combinator entity. To set the signal, copy a constant combinator entity and press CONTROL + SHIFT + left mouse button."
}
2 changes: 1 addition & 1 deletion prototypes/entity.lua
Expand Up @@ -4,7 +4,7 @@ local constant_combinator = data.raw["constant-combinator"]
local entity = table.deepcopy(constant_combinator["constant-combinator"])
entity.name = "global-constant-combinator"
entity.minable.result = "global-constant-combinator"
entity.item_slot_count = 18
entity.item_slot_count = 20
local tint = {r=100/255, g=200/255, b=1, a=1}

local sides = {"north", "east", "south", "west"}
Expand Down

0 comments on commit c102902

Please sign in to comment.