Skip to content

Commit 43d1f37

Browse files
committedMay 6, 2017
Use a settings object for the main settings
This unifies the settings APIs. This also unifies the sync and async registration APIs, since the async registration API did not support adding non-functions to the API table.
1 parent a024042 commit 43d1f37

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+411
-417
lines changed
 

Diff for: ‎builtin/common/misc_helpers.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ if INIT == "game" then
463463

464464
core.rotate_node = function(itemstack, placer, pointed_thing)
465465
core.rotate_and_place(itemstack, placer, pointed_thing,
466-
core.setting_getbool("creative_mode"),
466+
core.settings:get_bool("creative_mode"),
467467
{invert_wall = placer:get_player_control().sneak})
468468
return itemstack
469469
end
@@ -642,8 +642,8 @@ end
642642

643643
local ESCAPE_CHAR = string.char(0x1b)
644644

645-
-- Client-sided mods don't have access to getbool
646-
if core.setting_getbool and core.setting_getbool("disable_escape_sequences") then
645+
-- Client-side mods don't have access to settings
646+
if core.settings and core.settings:get_bool("disable_escape_sequences") then
647647

648648
function core.get_color_escape_sequence(color)
649649
return ""

Diff for: ‎builtin/fstk/tabview.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ local function switch_to_tab(self, index)
167167
self.current_tab = self.tablist[index].name
168168

169169
if (self.autosave_tab) then
170-
core.setting_set(self.name .. "_LAST",self.current_tab)
170+
core.settings:set(self.name .. "_LAST",self.current_tab)
171171
end
172172

173173
-- call for tab to enter

0 commit comments

Comments
 (0)
Please sign in to comment.