local function L(L,P)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\115\099\114\105\112\116\115\047\117\116\105\108\115\046\108\117\097");(dofile_once(L)).rewrite(Y.replace_if_valid,P)end local function P()local P="\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"local Y=dofile_once(P.."\104\097\115\104\046\108\117\097")L(P.."\100\097\116\097\047\115\099\114\105\112\116\115\047\098\105\111\109\101\095\115\099\114\105\112\116\115\046\108\117\097",Y.biome_scripts)L(P.."\100\097\116\097\047\115\099\114\105\112\116\115\047\105\116\101\109\115\047\112\111\116\105\111\110\046\108\117\097",Y.potion)end return{rewrite=P}
local function replace(path, hash)
  local utils = dofile_once("mods/noita-streak-explorer/files/scripts/utils.lua")
  dofile_once(path).rewrite(utils.replace_if_valid, hash)
end

local function rewrite()
  local rewriteDir = "mods/noita-streak-explorer/files/rewrite/"
  local hash = dofile_once(rewriteDir .. "hash.lua")

  replace(rewriteDir .. "data/scripts/biome_scripts.lua", hash.biome_scripts)
  replace(rewriteDir .. "data/scripts/items/potion.lua", hash.potion)
end

return {
  rewrite = rewrite,
}
