Yeet hax_preload and wang_sync (unused)

This commit is contained in:
IQuant 2024-09-15 13:04:14 +03:00
parent 203266cf0e
commit df162c48ca
4 changed files with 0 additions and 86 deletions

View file

@ -1,37 +0,0 @@
local function preload(x, y)
local chunkloader = util.load_ephemerial("mods/quant.ew/files/resource/entities/chunk_loader.xml", x, y)
async(function ()
wait(3)
local cx, cy = GameGetCameraPos()
GameSetCameraPos(x, y)
GameSetCameraPos(cx, cy)
EntityKill(chunkloader)
end)
end
local module = {}
local first_update = true
function module.on_world_update_host()
if first_update then
async(function ()
preload(-300, 1400)
wait(1)
preload(-300, 2900)
wait(1)
preload(-300, 5000)
wait(1)
preload(-300, 6500)
wait(1)
preload(-300, 8550)
wait(1)
preload(-300, 10600)
wait(1)
preload(2200, 13150)
end)
first_update = false
end
end
return module

View file

@ -1,42 +0,0 @@
local function notload(content)
ModTextFileSetContent("mods/quant.ew/tmp_load.lua", content)
loadfile("mods/quant.ew/tmp_load.lua")()
print("Dofiled stuff")
end
-- The root file that imported everything else.
-- TODO: maybe dofile should be patched?
EwImportRoot = "???"
print("Append for director helpers is running")
orig_do_mod_appends = do_mod_appends
do_mod_appends = function(filename, ...)
-- do_mod_appends = orig_do_mod_appends
orig_do_mod_appends(filename, ...)
EwImportRoot = filename
print("do_mod_appends "..filename)
end
function EwSpawnDispath(fn_name, ...)
print("Called "..fn_name.." from "..EwImportRoot)
return _G[fn_name](...)
end
orig_RegisterSpawnFunction = RegisterSpawnFunction
function RegisterSpawnFunction(color, fn_name)
-- if fn_name == "init" then
-- orig_RegisterSpawnFunction(color, fn_name)
-- return
-- end
detour_fn_name = "ew_detour_"..fn_name
print("Register", color, fn_name, detour_fn_name)
notload([[
function ]]..detour_fn_name..[[(...)
print("called detour ]] ..detour_fn_name.. [[")
return EwSpawnDispath("]] .. fn_name .. [[", ...)
end
orig_RegisterSpawnFunction(]]..color..[[, "]]..detour_fn_name..[[")
]])
end

View file

@ -1,5 +0,0 @@
ModLuaFileAppend("data/scripts/director_helpers.lua", "mods/quant.ew/files/system/wang_hooks/director_helpers.lua")
local module = {}
return module

View file

@ -93,8 +93,6 @@ local function load_modules()
ctx.load_system("essence_sync")
ctx.load_system("spectate")
ctx.load_system("effect_data_sync")
-- ctx.load_system("hax_preload")
-- ctx.load_system("wang_hooks")
end
local function is_suitable_target(entity)