local L=dofile_once("\109\111\100\115\047\110\111\105\116\097-\115\116\114\101\097\107-\101\120\112\108\111\114\101\114\047\102\105\108\101\115\047\115\099\114\105\112\116\115\047\099\111\110\115\116\046\108\117\097")local P=dofile_once("\109\111\100\115\047\110\111\105\116\097-\115\116\114\101\097\107-\101\120\112\108\111\114\101\114\047\102\105\108\101\115\047\114\101\119\114\105\116\101\047\100\097\116\097\047\115\099\114\105\112\116\115\047\112\101\114\107\115\047\103\108\097\115\115\095\099\097\110\110\111\110\095\101\110\101\109\121\046\108\117\097")local Y=dofile_once("\109\111\100\115\047\110\111\105\116\097-\115\116\114\101\097\107-\101\120\112\108\111\114\101\114\047\102\105\108\101\115\047\114\101\119\114\105\116\101\047\101\118\101\110\116\115\047\104\111\108\105\100\097\121\095\101\102\102\101\099\116\115\046\108\117\097")local function B()local B=ModSettingGet(L.MOD_SETTINGS.FIX_GLASS_CANNON_ENEMY)if B==nil then B=false end if B then P.rewrite()end local s=ModSettingGet(L.MOD_SETTINGS.DISABLE_DRAGON_IN_JUNGLE)if s==nil then s=false end if s then ModLuaFileAppend("\100\097\116\097\047\115\099\114\105\112\116\115\047\098\105\111\109\101\115\047\114\097\105\110\102\111\114\101\115\116\046\108\117\097","\109\111\100\115\047\110\111\105\116\097-\115\116\114\101\097\107-\101\120\112\108\111\114\101\114\047\102\105\108\101\115\047\114\101\119\114\105\116\101\047\100\097\116\097\047\115\099\114\105\112\116\115\047\098\105\111\109\101\115\047\114\097\105\110\102\111\114\101\115\116\046\108\117\097")end local y=ModSettingGet(L.MOD_SETTINGS.DISABLE_HOLIDAY_EFFECTS)if y==nil then y=false end if y then Y.rewrite()end end return{rewrite=B}
local CONSTS = dofile_once("mods/noita-streak-explorer/files/scripts/const.lua")
local glass_cannon_enemy = dofile_once("mods/noita-streak-explorer/files/rewrite/data/scripts/perks/glass_cannon_enemy.lua")
local holiday_effects = dofile_once("mods/noita-streak-explorer/files/rewrite/events/holiday_effects.lua")

local function rewrite()
  -- NOTE: ガラスキャノンの修正
  local should_glass_cannon_fix = ModSettingGet(CONSTS.MOD_SETTINGS.FIX_GLASS_CANNON_ENEMY)
  if should_glass_cannon_fix == nil then
    should_glass_cannon_fix = false
  end
  if should_glass_cannon_fix then
    glass_cannon_enemy.rewrite()
  end

  -- NOTE: ナイトメアドラゴンのスポーン無効化修正
  local should_disable_dragon_in_jungle = ModSettingGet(CONSTS.MOD_SETTINGS.DISABLE_DRAGON_IN_JUNGLE)
  if should_disable_dragon_in_jungle == nil then
    should_disable_dragon_in_jungle = false
  end
  if should_disable_dragon_in_jungle then
    ModLuaFileAppend("data/scripts/biomes/rainforest.lua", "mods/noita-streak-explorer/files/rewrite/data/scripts/biomes/rainforest.lua")
  end

  -- NOTE: ホリデーイベント無効化
  local disable_holiday_effects = ModSettingGet(CONSTS.MOD_SETTINGS.DISABLE_HOLIDAY_EFFECTS)
  if disable_holiday_effects == nil then
    disable_holiday_effects = false
  end
  if disable_holiday_effects then
    holiday_effects.rewrite()
  end
end

return {
  rewrite = rewrite,
}
