summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--plugins/autofire/autofire_save.lua8
-rw-r--r--plugins/autofire/init.lua9
-rw-r--r--plugins/autofire/plugin.json2
3 files changed, 3 insertions, 16 deletions
diff --git a/plugins/autofire/autofire_save.lua b/plugins/autofire/autofire_save.lua
index b15947fc168..2f353417e3e 100644
--- a/plugins/autofire/autofire_save.lua
+++ b/plugins/autofire/autofire_save.lua
@@ -1,9 +1,7 @@
local lib = {}
-local plugin_path = ''
-
local function get_settings_path()
- return plugin_path .. '/cfg/'
+ return lfs.env_replace(manager:machine():options().entries.homepath:value():match('([^;]+)')) .. '/autofire/'
end
local function get_settings_filename()
@@ -47,10 +45,6 @@ local function serialize_settings(button_list)
return settings
end
-function lib:set_plugin_path(path)
- plugin_path = path
-end
-
function lib:load_settings()
local buttons = {}
local json = require('json')
diff --git a/plugins/autofire/init.lua b/plugins/autofire/init.lua
index 5b52e47d350..1eb8627b494 100644
--- a/plugins/autofire/init.lua
+++ b/plugins/autofire/init.lua
@@ -2,20 +2,13 @@
-- copyright-holders:Jack Li
local exports = {}
exports.name = 'autofire'
-exports.version = '0.0.2'
+exports.version = '0.0.3'
exports.description = 'Autofire plugin'
exports.license = 'The BSD 3-Clause License'
exports.author = { name = 'Jack Li' }
local autofire = exports
-function autofire.set_folder(path)
- local loader = require('autofire/autofire_save')
- if loader then
- loader:set_plugin_path(path)
- end
-end
-
function autofire.startplugin()
-- List of autofire buttons, each being a table with keys:
diff --git a/plugins/autofire/plugin.json b/plugins/autofire/plugin.json
index 89e1a334523..a803c8be09e 100644
--- a/plugins/autofire/plugin.json
+++ b/plugins/autofire/plugin.json
@@ -2,7 +2,7 @@
"plugin": {
"name": "autofire",
"description": "Autofire plugin",
- "version": "0.0.2",
+ "version": "0.0.3",
"author": "Jack Li",
"type": "plugin",
"start": "false"