mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
add option to disable other players' cursors
This commit is contained in:
parent
f40b13a628
commit
9737e47eb0
5 changed files with 31 additions and 11 deletions
|
@ -108,7 +108,13 @@ function module.on_world_update()
|
|||
local children = EntityGetAllChildren(ent) or {}
|
||||
if ctx.my_id ~= peer_id then
|
||||
for _, child in ipairs(children) do
|
||||
if EntityGetName(child) == "cursor" or EntityGetName(child) == "notcursor" then
|
||||
if EntityGetName(child) == "cursor" and ctx.proxy_opt.hide_cursors == true then
|
||||
EntitySetComponentIsEnabled(child, EntityGetFirstComponent(child, "SpriteComponent"), false)
|
||||
else
|
||||
EntitySetComponentIsEnabled(child,
|
||||
EntityGetFirstComponentIncludingDisabled(child, "SpriteComponent"), true)
|
||||
end
|
||||
if EntityGetName(child) == "notcursor" then
|
||||
EntitySetComponentIsEnabled(child, EntityGetFirstComponentIncludingDisabled(child, "SpriteComponent"), true)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue