dofile("data/scripts/lib/mod_settings.lua")

local mod_id = "lewd_noita"

function mod_setting_change_callback( mod_id, gui, in_main_menu, setting, old_value, new_value )
	if setting.id == "extreme_content_enabled" and new_value == false then
		ModSettingSetNextValue(mod_id .. ".extreme_text_enabled", false, false)
	end
end

mod_settings_version = 2
mod_settings =
{
	{
		id = "clothes_enabled",
		ui_name = "Clothes Toggle",
		ui_description = "Toggle whether player dress is equipped.",
		value_default = true,
		scope = MOD_SETTING_SCOPE_RUNTIME,
	},
	{
		id = "cum_amount_multiplier",
		ui_name = "Cum Amount",
		ui_description = "Adjusts cum output relative to normal amounts.",
		value_default = 100,
		value_min = 50,
		value_max = 200,
		value_display_multiplier = 1,
		value_display_formatting = "$0% Normal",
		value_increment = 25,
		scope = MOD_SETTING_SCOPE_RUNTIME,
	},
	{
		category_id = "extreme_content",
		ui_name = "EXTREME CONTENT",
		ui_description = "Parasites, wolf bonding, and optional graphic narration.",
		foldable = true,
		settings = {
			{
				id = "extreme_content_enabled",
				ui_name = "Extreme Content",
				ui_description = "Toggle whether parasites and wolf bonding are enabled.",
				value_default = true,
				scope = MOD_SETTING_SCOPE_RUNTIME,
			},
			{
				id = "extreme_text_enabled",
				ui_name = "Extreme Text",
				ui_description = "Use graphic body-horror narration for parasite events. Requires Extreme Content.",
				value_default = false,
				scope = MOD_SETTING_SCOPE_RUNTIME,
				show_fn = function()
					return ModSettingGetNextValue(mod_id .. ".extreme_content_enabled")
				end,
			},
		},
	},
}

function ModSettingsUpdate( init_scope )
	local old_version = mod_settings_get_version( mod_id )
	mod_settings_update( mod_id, mod_settings, init_scope )
end
function ModSettingsGuiCount()
	return mod_settings_gui_count( mod_id, mod_settings )
end
function ModSettingsGui( gui, in_main_menu )
	mod_settings_gui( mod_id, mod_settings, gui, in_main_menu )
end
