<commit_before>local EffectGroup = {}
EffectGroup.__index = EffectGroup
EffectGroup.ClassName = "EffectGroup"

-- @author Quenty

function EffectGroup.new()
	local self = {}
	setmetatable(self, EffectGroup)

	self.Fences = {}

	return self
end

function EffectGroup:AddEffectFence(Fence)
	-- @param Fence An EffectFence to add to the EffectGroup

	self.Fences[#self.Fences+1] = Fence or error("No fence")
end

function EffectGroup:FindFirstActive(Point)
	-- @return The fence that was used to cast.

	assert(Point, "Need point to cast")

	for _, Fence in pairs(self.Fences) do
		if Fence:PointInFence(Point) then
			return Fence
		end
	end

	return nil
end

return EffectGroup<commit_msg>Add a way to remove fences, changed underlaying format<commit_after>local EffectGroup = {}
EffectGroup.__index = EffectGroup
EffectGroup.ClassName = "EffectGroup"

-- @author Quenty

function EffectGroup.new()
	local self = {}
	setmetatable(self, EffectGroup)

	self.Fences = {}

	return self
end

function EffectGroup:AddEffectFence(Fence)
	-- @param Fence An EffectFence to add to the EffectGroup
	assert(Fence, "Must send Fence")

	self.Fences[Fence] = true
end

function EffectGroup:RemoveFence(Fence)
	-- @param Fence An already existing fence to remove
	assert(Fence, "Must send Fence")
	assert(self.Fences[Fence], "Fence must already be added to the group")

	self.Fences[Fence] = nil
end

function EffectGroup:FindFirstActive(Point)
	-- @return The fence that was used to cast.

	assert(Point, "Need point to cast")

	for Fence, _ in pairs(self.Fences) do
		if Fence:PointInFence(Point) then
			return Fence
		end
	end

	return nil
end

return EffectGroup
{'fraction_non_alphanumeric': 0.09085402786190187, 'fraction_numerical': 0.0006056935190793458, 'mean_word_length': 4.657534246575342, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7543472', 'n_tokens_mistral': 556, 'n_tokens_neox': 534, 'n_words': 168}