Add get_values
This commit is contained in:
parent
6bb120c07d
commit
c34b7fac18
3
API.txt
3
API.txt
@ -118,5 +118,8 @@ Gets the remaining time of an effect, in seconds, or "perm".
|
||||
monoidal_effects.get_player_effects("player_name")
|
||||
Gets a set of effects applied to the given player
|
||||
|
||||
monoidal_effects.get_values(uid)
|
||||
Returns the value table associated with an effect, if it exists
|
||||
|
||||
monoidal_effects.get_monoid_value("monoid_name", "player_name")
|
||||
Gets the current combined value for a monoid and player.
|
||||
|
8
init.lua
8
init.lua
@ -556,12 +556,16 @@ monoidal_effects.get_remaining_time = function(uid)
|
||||
end
|
||||
|
||||
monoidal_effects.get_player_effects = function(p_name)
|
||||
|
||||
return effects:with_index("player", p_name)
|
||||
end
|
||||
|
||||
monoidal_effects.get_monoid_value = get_monoid_value
|
||||
monoidal_effects.get_values = function(uid)
|
||||
local eff = effects:get(uid)
|
||||
|
||||
return eff.values
|
||||
end
|
||||
|
||||
monoidal_effects.get_monoid_value = get_monoid_value
|
||||
|
||||
local function apply_effects(player)
|
||||
local p_name = player:get_player_name()
|
||||
|
Loading…
x
Reference in New Issue
Block a user