Allow Lua API to toggle dynamic scan

This commit is contained in:
Gnome Ann 2021-12-12 01:55:46 -05:00
parent 5692a7dfe2
commit 00eb125ad0
2 changed files with 4 additions and 0 deletions

View File

@ -1048,6 +1048,7 @@ def lua_has_setting(setting):
"setwidepth", "setwidepth",
"setuseprompt", "setuseprompt",
"setadventure", "setadventure",
"setdynamicscan",
"frmttriminc", "frmttriminc",
"frmtrmblln", "frmtrmblln",
"frmtrmspch", "frmtrmspch",
@ -1069,6 +1070,7 @@ def lua_get_setting(setting):
if(setting == "setwidepth"): return vars.widepth if(setting == "setwidepth"): return vars.widepth
if(setting == "setuseprompt"): return vars.useprompt if(setting == "setuseprompt"): return vars.useprompt
if(setting == "setadventure"): return vars.adventure if(setting == "setadventure"): return vars.adventure
if(setting == "setdynamicscan"): return vars.dynamicscan
if(setting == "frmttriminc"): return vars.formatoptns["frmttriminc"] if(setting == "frmttriminc"): return vars.formatoptns["frmttriminc"]
if(setting == "frmtrmblln"): return vars.formatoptns["frmttriminc"] if(setting == "frmtrmblln"): return vars.formatoptns["frmttriminc"]
if(setting == "frmtrmspch"): return vars.formatoptns["frmttriminc"] if(setting == "frmtrmspch"): return vars.formatoptns["frmttriminc"]
@ -1095,6 +1097,7 @@ def lua_set_setting(setting, v):
if(setting == "setwidepth"): vars.widepth = v if(setting == "setwidepth"): vars.widepth = v
if(setting == "setuseprompt"): vars.useprompt = v if(setting == "setuseprompt"): vars.useprompt = v
if(setting == "setadventure"): vars.adventure = v if(setting == "setadventure"): vars.adventure = v
if(setting == "setdynamicscan"): vars.dynamicscan = v
if(setting == "frmttriminc"): vars.formatoptns["frmttriminc"] = v if(setting == "frmttriminc"): vars.formatoptns["frmttriminc"] = v
if(setting == "frmtrmblln"): vars.formatoptns["frmttriminc"] = v if(setting == "frmtrmblln"): vars.formatoptns["frmttriminc"] = v
if(setting == "frmtrmspch"): vars.formatoptns["frmttriminc"] = v if(setting == "frmtrmspch"): vars.formatoptns["frmttriminc"] = v

View File

@ -716,6 +716,7 @@ return function(_python, _bridged)
---@field setwidepth integer ---@field setwidepth integer
---@field setuseprompt boolean ---@field setuseprompt boolean
---@field setadventure boolean ---@field setadventure boolean
---@field setdynamicscan boolean
---@field frmttriminc boolean ---@field frmttriminc boolean
---@field frmtrmblln boolean ---@field frmtrmblln boolean
---@field frmtrmspch boolean ---@field frmtrmspch boolean