mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
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.
This commit is contained in:
parent
a024042bf5
commit
43d1f375d1
46 changed files with 411 additions and 417 deletions
|
@ -463,7 +463,7 @@ if INIT == "game" then
|
|||
|
||||
core.rotate_node = function(itemstack, placer, pointed_thing)
|
||||
core.rotate_and_place(itemstack, placer, pointed_thing,
|
||||
core.setting_getbool("creative_mode"),
|
||||
core.settings:get_bool("creative_mode"),
|
||||
{invert_wall = placer:get_player_control().sneak})
|
||||
return itemstack
|
||||
end
|
||||
|
@ -642,8 +642,8 @@ end
|
|||
|
||||
local ESCAPE_CHAR = string.char(0x1b)
|
||||
|
||||
-- Client-sided mods don't have access to getbool
|
||||
if core.setting_getbool and core.setting_getbool("disable_escape_sequences") then
|
||||
-- Client-side mods don't have access to settings
|
||||
if core.settings and core.settings:get_bool("disable_escape_sequences") then
|
||||
|
||||
function core.get_color_escape_sequence(color)
|
||||
return ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue