Merge pull request #15 from mamoniot/1.1.6

1.1.6
This commit is contained in:
Monica Moniot
2022-12-16 18:06:21 -06:00
committed by GitHub
4 changed files with 8 additions and 3 deletions

View File

@@ -1,4 +1,9 @@
--------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------
Version: 1.1.6
Date: 2022-12-16
Changes:
- Fixed a crash relating to per-item request thresholds
---------------------------------------------------------------------------------------------------
Version: 1.1.5 Version: 1.1.5
Date: 2022-12-16 Date: 2022-12-16
Changes: Changes:

View File

@@ -1,6 +1,6 @@
{ {
"name": "cybersyn", "name": "cybersyn",
"version": "1.1.5", "version": "1.1.6",
"title": "Project Cybersyn", "title": "Project Cybersyn",
"author": "Mami", "author": "Mami",
"factorio_version": "1.1", "factorio_version": "1.1",

View File

@@ -340,7 +340,7 @@ local function tick_dispatch(map_data, mod_settings)
if effective_count >= r_threshold then if effective_count >= r_threshold then
local item_threshold = p_station.item_thresholds and p_station.item_thresholds[item_name] or nil local item_threshold = p_station.item_thresholds and p_station.item_thresholds[item_name] or nil
local prior = p_station.priority local prior = p_station.priority
if item_threshold then if item_threshold and p_station.item_priority then
prior = p_station.item_priority--[[@as int]] prior = p_station.item_priority--[[@as int]]
end end
local slot_threshold = item_type == "fluid" and r_threshold or ceil(r_threshold/get_stack_size(map_data, item_name)) local slot_threshold = item_type == "fluid" and r_threshold or ceil(r_threshold/get_stack_size(map_data, item_name))

View File

@@ -19,7 +19,7 @@ end
function get_stop_dist(entity0, entity1) function get_stop_dist(entity0, entity1)
local surface0 = entity0.surface.index local surface0 = entity0.surface.index
local surface1 = entity1.surface.index local surface1 = entity1.surface.index
return (surface0 == surface1 and get_distance(entity0.position, entity1.position) or DIFFERENT_SURFACE_DISTANCE) return (surface0 == surface1 and get_distance(entity0.position, entity1.position) or DIFFERENT_SURFACE_DISTANCE)--[[@as number]]
end end