v2.3
This commit is contained in:
parent
ff0d0c0d8d
commit
29614e6d26
|
@ -1,4 +1,9 @@
|
|||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.2.3
|
||||
Date: 2020.01.04
|
||||
Fixes:
|
||||
- Register on_tick event on a different callback.
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.2.2
|
||||
Date: 2020.01.03
|
||||
Fixes:
|
||||
|
|
|
@ -557,16 +557,13 @@ end
|
|||
|
||||
function load()
|
||||
refreshMetatables()
|
||||
|
||||
INTERVAL = settings.global["baf-update-interval"].value
|
||||
|
||||
onTick = spreadOverTicks(functions, INTERVAL)
|
||||
script.on_event(defines.events.on_tick, onTick)
|
||||
if INTERVAL ~= settings.global["baf-update-interval"].value then
|
||||
setup()
|
||||
end
|
||||
end
|
||||
|
||||
script.on_load(load)
|
||||
|
||||
|
||||
function init()
|
||||
-- gather all filters on every surface
|
||||
global.air_filtered_chunks_map = {}
|
||||
|
@ -587,13 +584,18 @@ script.on_configuration_changed(init)
|
|||
|
||||
function onSettingsChanged(event)
|
||||
if event.setting == "baf-update-interval" then
|
||||
INTERVAL = settings.global["baf-update-interval"].value
|
||||
|
||||
onTick = spreadOverTicks(functions, INTERVAL)
|
||||
script.on_event(defines.events.on_tick, onTick)
|
||||
setup()
|
||||
end
|
||||
end
|
||||
|
||||
script.on_event(defines.events.on_runtime_mod_setting_changed, onSettingsChanged)
|
||||
|
||||
|
||||
function setup()
|
||||
INTERVAL = settings.global["baf-update-interval"].value
|
||||
|
||||
onTick = spreadOverTicks(functions, INTERVAL)
|
||||
script.on_event(defines.events.on_tick, onTick)
|
||||
end
|
||||
|
||||
setup()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "better-air-filtering",
|
||||
"version": "0.2.2",
|
||||
"version": "0.2.3",
|
||||
"title": "Better Air Filtering",
|
||||
"author": "Joey De Pauw",
|
||||
"contact": "joeydepauw@gmail.com",
|
||||
|
|
Reference in New Issue