summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index c97216e..d62d239 100644
--- a/init.lua
+++ b/init.lua
@@ -297,6 +297,16 @@ function playereffects.get_player_effects(playername)
end
end
+function playereffects.has_effect_type(playername, effect_type_id)
+ local pe = playereffects.get_player_effects(playername)
+ for i=1,#pe do
+ if pe[i].effect_type_id == effect_type_id then
+ return true
+ end
+ end
+ return false
+end
+
--[=[ Saving all data to file ]=]
function playereffects.save_to_file()
local save_time = os.time()