noita_entangled_worlds/quant.ew/files/system/proxy_info.lua

18 lines
491 B
Lua
Raw Normal View History

2024-08-07 17:11:55 +03:00
local ctx = dofile_once("mods/quant.ew/files/core/ctx.lua")
local net = dofile_once("mods/quant.ew/files/core/net.lua")
2024-06-21 19:06:40 +03:00
local module = {}
2024-06-21 20:18:01 +03:00
function module.on_world_update()
if GameGetFrameNum() % 30 ~= 6 then
2024-06-21 19:06:40 +03:00
return
end
for peer_id, player_data in pairs(ctx.players) do
local x, y = EntityGetTransform(player_data.entity)
2024-07-15 21:27:15 +03:00
if x ~= nil and y ~= nil then
net.proxy_send("peer_pos", peer_id.." "..x.." "..y)
end
2024-06-21 19:06:40 +03:00
end
end
return module