local k=require("\112\108\046\116\097\098\108\101\120")local V=require("\105\110\118\111\107\097\116\105\111\110\046\099\111\110\115\116\046\115\111\117\110\100\095\101\118\101\110\116\115")local E={}k.update(E,V)function E.EmitGlobal(k)return EmitGlobalSound(k)end function E.EmitOnPlayer(k,V)return EmitSoundOnClient(k,V)end function E.EmitOnEntity(k,V)return EmitSoundOn(k,V)end function E.EmitOnLocationWithCaster(k,V,E)return EmitSoundOnLocationWithCaster(E,k,V)end function E.EmitOnLocationForAllies(k,V,E)return EmitSoundOnLocationForAllies(E,k,V)end function E.EmitAnnouncer(k)return EmitAnnouncerSound(k)end function E.EmitAnnouncerForPlayer(k,V)return EmitAnnouncerSoundForPlayer(k,V:GetPlayerID())end function E.EmitAnnouncerForTeam(k,V)return EmitAnnouncerSoundForTeam(k,V)end function E.EmitAnnouncerOnLocationForTeam(k,V,E)return EmitAnnouncerSoundForTeamOnLocation(k,V,E)end return E
--- Sound events helpers.
-- @module invokation.dota2.sound_events
local tablex = require("pl.tablex")

local EVENTS = require("invokation.const.sound_events")

local M = {}

tablex.update(M, EVENTS)

--- Play named sound for all players.
-- @tparam string event
function M.EmitGlobal(event)
  return EmitGlobalSound(event)
end

--- Play named sound only on the client for the passed in player.
-- @tparam string event
-- @tparam CDOTAPlayer player
function M.EmitOnPlayer(event, player)
  return EmitSoundOnClient(event, player)
end

--- Play named sound on entity.
-- @tparam string event
-- @tparam CBaseEntity entity
function M.EmitOnEntity(event, entity)
  return EmitSoundOn(event, entity)
end

--- Emit a sound on a location from a unit.
-- @tparam string event
-- @tparam CBaseEntity entity
-- @tparam Vector location
function M.EmitOnLocationWithCaster(event, entity, location)
  return EmitSoundOnLocationWithCaster(location, event, entity)
end

--- Emit a sound on a location from a unit, only for players allied with that unit.
-- @tparam string event
-- @tparam CBaseEntity entity
-- @tparam Vector location
function M.EmitOnLocationForAllies(event, entity, location)
  return EmitSoundOnLocationForAllies(location, event, entity)
end

--- Emit an announcer sound for all players.
-- @tparam string event
function M.EmitAnnouncer(event)
  return EmitAnnouncerSound(event)
end

--- Emit an announcer sound for a player.
-- @tparam string event
-- @tparam CDOTAPlayer player
function M.EmitAnnouncerForPlayer(event, player)
  return EmitAnnouncerSoundForPlayer(event, player:GetPlayerID())
end

--- Emit an announcer sound for a team.
-- @tparam string event
-- @tparam int team
function M.EmitAnnouncerForTeam(event, team)
  return EmitAnnouncerSoundForTeam(event, team)
end

--- Emit an announcer sound for a team at a specific location.
-- @tparam string event
-- @tparam int team
-- @tparam Vector location
function M.EmitAnnouncerOnLocationForTeam(event, team, location)
  return EmitAnnouncerSoundForTeamOnLocation(event, team, location)
end

return M
