WIP synced wang generator.

This commit is contained in:
Nikita Tomashevich 2024-09-11 12:38:20 +03:00
parent 9ecf5a25c3
commit c6524b07bb
4 changed files with 31 additions and 1 deletions

View file

@ -11,3 +11,4 @@
- `ctx.hook.on_draw_debug_window(imgui)`
- `ctx.hook.on_local_player_polymorphed(currently_polymorphed)`
- `ctx.hook.on_client_polymorphed(peer_id, player_data)`
- `ctx.hook.on_late_init()`

View file

@ -0,0 +1,5 @@
local orig_RegisterSpawnFunction = RegisterSpawnFunction
function RegisterSpawnFunction(color, fn_name)
end

View file

@ -0,0 +1,22 @@
ModLuaFileAppend("data/scripts/director_helpers.lua", "mods/quant.ew/files/system/wang_hooks/director_helpers.lua")
local module = {}
local module.files_with_spawnhooks = {}
for line in string.gmatch(ModTextFileGetContent("mods/quant.ew/files/system/wang_hooks/files_with_spawnhooks.txt"), "(.-)\n") do
-- print("Interned", line)
table.insert(module.files_with_spawnhooks, line)
end
local function patch_file(filename)
end
function module.on_late_init()
for _, filename in ipairs(module.files_with_spawnhooks) do
patch_file(filename)
end
end
return module

View file

@ -375,7 +375,9 @@ end
function OnModInit() end
function OnModPostInit() end
function OnModPostInit()
ctx.hook.on_late_init()
end
function OnPlayerDied(player_entity)
ctx.hook.on_player_died(player_entity)