图鉴额外

图鉴额外

用于figura的附加组件,极大地扩展了其与其他模组集成的能力

基础库

RU

此附加组件是一个便捷的中间层,用于将人物模型与流行模组结合使用。

目前支持以下模组:

  • plasmo voice
  • emote craft

已在 1.20.1 上测试可用,但应该也能在更高版本上运行。

示例:

emotecraft

emotes:getEmotes()

local listEmotes = emotes:getEmotes() -- 获取所有表情的列表
for _, emote in ipairs(listEmotes) do
  emote:getUUID() -- 获取表情的 uuid
  emote:getName() -- 获取表情的名称 
  emote:getDescription() -- 获取表情的描述
  emote:getAuthor() -- 获取表情的作者
  emote:isNsfw() -- 判断表情是否为 nsfw 内容
end

emotes:playEmote()

emotes:playEmote(stringUUID) -- 通过 uuid 播放表情

emotes:stopEmote()

emotes:stopEmote() -- 停止播放表情
plasmo voice

plasmovoice:getVoiceLevel()

plasmovoice:getVoiceLevel(stringUUID) -- 获取玩家的语音音量 
--示例
function events.tick()
  local uuid = player:getUUID()
  local voiceLevel = plasmovoice:getVoiceLevel(uuid)
  if voiceLevel > 0 then
    log(voiceLevel)
  end
end
-- 也可以通过事件检查玩家是否正在说话 
events["FIGEXTRA.PLASMOVOICE_PLAYER_SPEAK"]:register(function(uuid, distance)
    
end, "microphone")

plasmovoice:isMuted()

plasmovoice:isMuted(stringUUID) -- 检查玩家是否被静音

plasmovoice:getVersion()

plasmovoice:getVersion() -- 获取 plasmo voice 的版本

plasmovoice:renderDistanceVisualizer()

-- 我添加这个只是为了好玩,也许有人会找到有趣的用途
plasmovoice:renderDistanceVisualizer(radius, stringHex, x, y, z)

plasmovoice:renderDistanceVisualizer(radius, stringHex, vec(x, y, z))

EN

This addon is a convenient layer for combining the figura with popular mods.

Currently implemented support for such mods as:

  • plasmo voice
  • emote craft

Workability was tested on 1.20.1, but should work on versions above.

Examples:

emotecraft

emotes:getEmotes()

local listEmotes = emotes:getEmotes() -- get a list of all emotions
for _, emote in ipairs(listEmotes) do
  emote:getUUID() -- get emote's uuid
  emote:getName() -- get the name of the emotion 
  emote:getDescription() -- get the description of the emotion
  emote:getAuthor() -- get the author of the emotion
  emote:isNsfw() -- whether the emotion is a nsfw character
end

emotes:playEmote()

emotes:playEmote(stringUUID) -- playing an emotion by uuid

emotes:stopEmote()

emotes:stopEmote() -- stops playing the emotion
plasmo voice

plasmovoice:getVoiceLevel()

plasmovoice:getVoiceLevel(stringUUID) -- get the player's voice volume 
--example
function events.tick()
  local uuid = player:getUUID()
  local voiceLevel = plasmovoice:getVoiceLevel(uuid)
  if voiceLevel > 0 then
    log(voiceLevel)
  end
end
-- it is also possible to check if the player speaks through an event 
events[“FIGEXTRA.PLASMOVOICE_PLAYER_SPEAK”]:register(function(uuid, distance)
    
end, “microphone”)

plasmovoice:isMuted()

plasmovoice:isMuted(stringUUID) -- check if the player is muted.

plasmovoice:getVersion()

plasmovoice:getVersion() -- get the version of plasmo voice

plasmovoice:renderDistanceVisualizer()

-- I added this for fun, maybe someone will find an interesting use for it.
plasmovoice:renderDistanceVisualizer(radius, stringHex, x, y, z)

plasmovoice:renderDistanceVisualizer(radius, stringHex, vec(x, y, z))