Skip to content

Commit

Permalink
Merge branch 'master' into search-engine
Browse files Browse the repository at this point in the history
  • Loading branch information
Zomis committed Feb 22, 2021
2 parents 4f90730 + e28aab7 commit 17cc264
Show file tree
Hide file tree
Showing 117 changed files with 234 additions and 73 deletions.
2 changes: 1 addition & 1 deletion .luacheckrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
globals = { "global", "game", "data", "settings", "remote" }
globals = { "global", "game", "data", "settings", "remote", "table_size" }
read_globals = { "defines", "script" }
color = false
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 1.1.0
Date: 2020-11-28
Features:
- Update for Factorio 1.1
---------------------------------------------------------------------------------------------------
Version: 0.18.2
Date: 2020-08-14
Bugfixes:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "advanced-combinator",
"version": "0.18.2",
"version": "1.1.0",
"title": "Advanced Combinator",
"author": "Zomis",
"contact": "zomis2k@hotmail.com",
"homepage": "https://github.com/Zomis/FactorioMods",
"factorio_version": "0.18",
"dependencies": ["base >= 0.18"],
"factorio_version": "1.1",
"dependencies": ["base >= 1.1"],
"description":
"Make combinators great again! One combinator to rule them all."
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ local function parse(advanced_combinator, entity)
-- If entity is invalid then there's not much to do
return
end
local control = entity.get_control_behavior()
local control = entity.get_or_create_control_behavior()
local result = {}
for _, command in ipairs(commands) do
logic.resolve(command, ent, result)
end
control.parameters = { parameters = result }
control.parameters = result
end
return { commands = commands, func = perform_function }
end
Expand Down
6 changes: 0 additions & 6 deletions copy-paste-recipe-signals_0.18.0/changelog.txt

This file was deleted.

38 changes: 0 additions & 38 deletions copy-paste-recipe-signals_0.18.0/control.lua

This file was deleted.

File renamed without changes.
23 changes: 23 additions & 0 deletions copy-paste-recipe-signals_1.1.0/changelog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---------------------------------------------------------------------------------------------------
Version: 1.1.0
Date: 2020-11-28
Features:
- Update for Factorio 1.1
---------------------------------------------------------------------------------------------------
Version: 1.0.0
Date: 2020-10-08
Features:
- Player-specific setting to change ingredient multiplier (0 to turn off), defaults to -1
- Player-specific setting to change product multiplier (0 to turn off), defaults to 1
- Player-specific setting to include recipe time in ticks, defaults to true
- Player-specific setting to include recipe time in seconds, defaults to true
- Previous signals on the combinator are now cleared
Changes:
- Set required Factorio version to 1.0

---------------------------------------------------------------------------------------------------
Version: 0.18.0
Date: 2020-07-30
Features:
- Initial Release
- Copying settings from an assembling machine to a constant combinator will set signals for the recipe on the combinator
67 changes: 67 additions & 0 deletions copy-paste-recipe-signals_1.1.0/control.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
local function expected_amount(product)
local expected = product.amount
if not expected then
expected = (product.amount_min + product.amount_max) / 2.0
end
local probability = product.probability or 1

return expected * probability
end

script.on_event(defines.events.on_entity_settings_pasted, function(event)
if event.destination.valid and event.destination.name ~= "constant-combinator" then
return
end
if event.source.valid and event.source.prototype.type == "assembling-machine" then
local player_settings = settings.get_player_settings(event.player_index)
local ingredients_multiplier = player_settings["copy-paste-recipe-signals-ingredient-multiplier"].value
local products_multiplier = player_settings["copy-paste-recipe-signals-product-multiplier"].value
local add_ticks = player_settings["copy-paste-recipe-signals-include-ticks"].value
local add_seconds = player_settings["copy-paste-recipe-signals-include-seconds"].value

local recipe = event.source.get_recipe()
if not recipe then return end
local behavior = event.destination.get_or_create_control_behavior()

local signals = {}
if ingredients_multiplier ~= 0 then
for _, ingredient in pairs(recipe.ingredients) do
table.insert(signals, {
signal = {
type = ingredient.type,
name = ingredient.name
},
count = ingredient.amount * ingredients_multiplier
})
end
end
if products_multiplier ~= 0 then
for _, product in pairs(recipe.products) do
local expected = expected_amount(product)
table.insert(signals, {
signal = {
type = product.type,
name = product.name
},
count = expected * products_multiplier
})
end
end
if add_ticks then
table.insert(signals, { signal = { type = "virtual", name = "signal-T" }, count = recipe.energy * 60 })
end
if add_seconds then
table.insert(signals, { signal = { type = "virtual", name = "signal-S" }, count = recipe.energy })
end

for index, signal in pairs(signals) do
if behavior.signals_count >= index then
behavior.set_signal(index, signal)
end
end

for index = table_size(signals) + 1, behavior.signals_count do
behavior.set_signal(index, nil)
end
end
end)
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "copy-paste-recipe-signals",
"version": "0.18.0",
"version": "1.1.0",
"title": "Copy-Paste Recipe Signals",
"author": "Zomis",
"contact": "zomis2k@hotmail.com",
"homepage": "https://github.com/Zomis/FactorioMods",
"factorio_version": "0.18",
"dependencies": ["base >= 0.18"],
"factorio_version": "1.1",
"dependencies": ["base >= 1.1"],
"description": "Copying settings from an Assembling Machine to a Constant Combinator will paste signals describing the recipe"
}
11 changes: 11 additions & 0 deletions copy-paste-recipe-signals_1.1.0/locale/en/values.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[mod-setting-name]
copy-paste-recipe-signals-ingredient-multiplier=Ingredient multiplier
copy-paste-recipe-signals-product-multiplier=Product multiplier
copy-paste-recipe-signals-include-ticks=Include ticks
copy-paste-recipe-signals-include-seconds=Include seconds

[mod-setting-description]
copy-paste-recipe-signals-ingredient-multiplier=Multiplies all ingredients with this amount (Set 0 to turn off)
copy-paste-recipe-signals-product-multiplier=Multiplies all products with this amount (Set 0 to turn off)
copy-paste-recipe-signals-include-ticks=Add the signal T for the number of ticks the recipe takes (1 second = 60 ticks)
copy-paste-recipe-signals-include-seconds=Add the signal S for the number of seconds the recipe takes
40 changes: 40 additions & 0 deletions copy-paste-recipe-signals_1.1.0/settings.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
data:extend({
{
type = "int-setting",
name = "copy-paste-recipe-signals-ingredient-multiplier",
setting_type = "runtime-per-user",
order = "a",
default_value = -1,
minimum_value = -100000,
maximum_value = 100000
}
})
data:extend({
{
type = "int-setting",
name = "copy-paste-recipe-signals-product-multiplier",
setting_type = "runtime-per-user",
order = "b",
default_value = 1,
minimum_value = -100000,
maximum_value = 100000
}
})
data:extend({
{
type = "bool-setting",
name = "copy-paste-recipe-signals-include-ticks",
setting_type = "runtime-per-user",
order = "c",
default_value = true
}
})
data:extend({
{
type = "bool-setting",
name = "copy-paste-recipe-signals-include-seconds",
setting_type = "runtime-per-user",
order = "d",
default_value = true
}
})
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "exploding-trees",
"version": "1.0.0",
"factorio_version": "1.0",
"version": "1.1.0",
"factorio_version": "1.1",
"title": "Exploding Trees",
"author": "Zomis",
"contact": "zomis2k@hotmail.com",
"homepage": "https://www.github.com/Zomis/FactorioMods",
"description":
"'You have forests all over the world. You don’t have fires like you do in California. You know, in Europe they have forest cities. You look at countries, Austria, you look at so many countries, they live in the forest. They’re considered forest cities, so many of them. And they don’t have fires like this. And they have more explosive trees.' - Donald J. Trump",
"dependencies": ["base >= 1.0"]
"dependencies": ["base >= 1.1"]
}
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
32 changes: 32 additions & 0 deletions lamp-placer_1.1.0/changelog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---------------------------------------------------------------------------------------------------
Version: 1.1.0
Date: 2020-11-28
Features:
- Update for Factorio 1.1
Changes:
- Lamp Placing is now performed in background over a period of time to avoid locking the game
---------------------------------------------------------------------------------------------------
Version: 0.18.0
Date: 2020-02-01
Features:
- Update for Factorio 0.18
---------------------------------------------------------------------------------------------------
Version: 0.17.0
Date: 2019-03-03
Features:
- Update for Factorio 0.17
---------------------------------------------------------------------------------------------------
Version: 0.16.1
Date: 2018-02-05
Features:
- Allow lamp distance to be configurable per player
---------------------------------------------------------------------------------------------------
Version: 0.16.0
Date: 2017-12-17
Features:
- Update for Factorio 0.16
---------------------------------------------------------------------------------------------------
Version: 0.15.0
Date: 2017-07-18
Features:
- First version
File renamed without changes.
File renamed without changes.
File renamed without changes
6 changes: 3 additions & 3 deletions lamp-placer_0.18.0/info.json → lamp-placer_1.1.0/info.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "lamp-placer",
"version": "0.18.0",
"version": "1.1.0",
"title": "Lamp Placer",
"author": "Zomis",
"contact": "zomis2k@hotmail.com",
"homepage": "https://github.com/Zomis/FactorioMods",
"factorio_version": "0.18",
"dependencies": ["base >= 0.18"],
"factorio_version": "1.1",
"dependencies": ["base >= 1.1"],
"description":
"Select a dark area that has electricity and let there be lamps."
}
File renamed without changes.
11 changes: 11 additions & 0 deletions lamp-placer_1.1.0/settings.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
data:extend({
{
type = "int-setting",
name = "lamp-placer-lamp-distance",
setting_type = "runtime-per-user",
order = "a",
default_value = 10,
minimum_value = 1,
maximum_value = 20
}
})
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "no-loot-at-all",
"version": "0.18.1",
"version": "1.1.0",
"title": "No Loot",
"author": "Zomis",
"contact": "zomis2k@hotmail.com",
"homepage": "https://www.github.com/Zomis/FactorioMods",
"factorio_version": "0.18",
"factorio_version": "1.1",
"dependencies": [],
"description": "You placed it? You won't get it back."
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions timeline_0.18.0/info.json → timeline_1.1.0/info.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "timeline",
"version": "0.18.0",
"version": "1.1.0",
"title": "Timeline",
"author": "Zomis",
"contact": "zomis2k@hotmail.com",
"homepage": "https://github.com/Zomis/FactorioMods",
"factorio_version": "0.18",
"dependencies": ["base >= 0.18", "? advanced-combinator"],
"factorio_version": "1.1",
"dependencies": ["base >= 1.1", "? advanced-combinator"],
"description":
"Save information about important key events in your game, to help you get more efficient next time"
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 1.1.0
Date: 2020-11-28
Features:
- Update for Factorio 1.1
---------------------------------------------------------------------------------------------------
Version: 0.18.1
Date: 21.06.2020
Changes:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "usage-detector",
"version": "0.18.1",
"version": "1.1.0",
"title": "Usage Detector",
"author": "Zomis",
"contact": "zomis2k@hotmail.com",
"homepage": "https://github.com/Zomis/FactorioMods",
"factorio_version": "0.18",
"dependencies": ["base >= 0.18"],
"factorio_version": "1.1",
"dependencies": ["base >= 1.1"],
"description":
"Find out how your resources are distributed. What is it that is consuming all those resources? Use this to find out."
}
File renamed without changes
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 1.1.0
Date: 2020-11-28
Features:
- Update for Factorio 1.1

---------------------------------------------------------------------------------------------------
Version: 0.18.2
Features:
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 17cc264

Please sign in to comment.