From 0986cb1938391602cd3715181e159620e65b2602 Mon Sep 17 00:00:00 2001 From: bgkillas Date: Sun, 3 Nov 2024 22:50:37 -0500 Subject: [PATCH] dont have an instance of kick for each instance of noita for shiny orb --- quant.ew/files/system/shiny_orb/append.lua | 4 ++-- quant.ew/files/system/shiny_orb/append_greed.lua | 4 ++-- quant.ew/files/system/shiny_orb/shiny_orb.lua | 5 ++++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/quant.ew/files/system/shiny_orb/append.lua b/quant.ew/files/system/shiny_orb/append.lua index 1a8d63ee..bb8bd91e 100644 --- a/quant.ew/files/system/shiny_orb/append.lua +++ b/quant.ew/files/system/shiny_orb/append.lua @@ -1,3 +1,3 @@ -function kick() - CrossCall("ew_kicked_orb", GetUpdatedEntityID(), false) +function kick(entity_who_kicked) + CrossCall("ew_kicked_orb", GetUpdatedEntityID(), entity_who_kicked, false) end \ No newline at end of file diff --git a/quant.ew/files/system/shiny_orb/append_greed.lua b/quant.ew/files/system/shiny_orb/append_greed.lua index 3208cb3b..72cb0bf8 100644 --- a/quant.ew/files/system/shiny_orb/append_greed.lua +++ b/quant.ew/files/system/shiny_orb/append_greed.lua @@ -1,3 +1,3 @@ -function kick() - CrossCall("ew_kicked_orb", GetUpdatedEntityID(), true) +function kick(entity_who_kicked) + CrossCall("ew_kicked_orb", GetUpdatedEntityID(), entity_who_kicked, true) end \ No newline at end of file diff --git a/quant.ew/files/system/shiny_orb/shiny_orb.lua b/quant.ew/files/system/shiny_orb/shiny_orb.lua index 52c004b1..3b448172 100644 --- a/quant.ew/files/system/shiny_orb/shiny_orb.lua +++ b/quant.ew/files/system/shiny_orb/shiny_orb.lua @@ -29,7 +29,10 @@ function rpc.kicked_orb(gid, rx, ry, greed) drop() end -np.CrossCallAdd("ew_kicked_orb", function(entity, greed) +np.CrossCallAdd("ew_kicked_orb", function(entity, entity_who_kicked, greed) + if entity_who_kicked ~= ctx.my_player.entity then + return + end local x, y = EntityGetTransform( entity ) rpc.kicked_orb(item_sync.get_global_item_id(entity), x + entity, y - GameGetFrameNum(), greed) end)