From ca8c65e00b42c933b7080a0336fa734e555add57 Mon Sep 17 00:00:00 2001 From: Brevven Date: Fri, 11 Feb 2022 19:56:39 -0800 Subject: [PATCH] list setting fix --- changelog.txt | 2 ++ control.lua | 16 ++++++++++++++++ locale/en/aluminum.cfg | 2 ++ 3 files changed, 20 insertions(+) create mode 100644 control.lua diff --git a/changelog.txt b/changelog.txt index 3166d82..d5cce8f 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,8 @@ --------------------------------------------------------------------------------------------------- Version: 0.0.3 Date: 2022-02-11 + Fixes: + - List mod setting fixes Changes: - Minor SE recipe updates --------------------------------------------------------------------------------------------------- diff --git a/control.lua b/control.lua new file mode 100644 index 0000000..2afa613 --- /dev/null +++ b/control.lua @@ -0,0 +1,16 @@ +local util = require("control-util") + +function on_console_chat(event) + if event.message and string.lower(event.message) == "bzlist" then + local player = game.players[event.player_index] + if player and player.connected then + local list = util.get_list() + if list and #list>0 then + local filename = util.me.name..".txt" + game.write_file(filename, list, false, event.player_index) + player.print("Wrote recipes to script-output/"..filename) + end + end + end +end +script.on_event(defines.events.on_console_chat, on_console_chat) diff --git a/locale/en/aluminum.cfg b/locale/en/aluminum.cfg index 802db6b..cd5bcd1 100644 --- a/locale/en/aluminum.cfg +++ b/locale/en/aluminum.cfg @@ -59,10 +59,12 @@ dirty-water-filtration-aluminum=Filter dirty water, giving aluminum ore [item=al [mod-setting-name] bzaluminum-recipe-bypass=Bypass recipes +bzaluminum-list=Make a list of modified recipes bzaluminum-more-entities=Aluminum entities bzaluminum-sulfuric=Use aluminum in sulfuric acid. Default "yes". Use with care. [mod-setting-description] bzaluminum-recipe-bypass=Skip modifying these recipes (comma-separated list). +bzaluminum-list=If enabled, the text command [color=orange]BZList[/color] will dump a file to the script-output directory with a full list of recipes modified.\nRecommended to turn this off after you are done configuring your other settings. bzaluminum-more-entities=Adds aluminum entities (currently just a aluminum chest). bzaluminum-sulfuric=Adds compatibility for old saves. Do NOT change to "no" for new saves. Will be removed (and always "yes") in 2022.