diff options
author | Wuzzy <almikes@aol.com> | 2016-08-11 18:23:30 +0200 |
---|---|---|
committer | Wuzzy <almikes@aol.com> | 2016-08-11 18:23:30 +0200 |
commit | e1a72e82064b6ec25250407c1f878b2036b54b03 (patch) | |
tree | 1cf327ed329882a58a33f97b90ab9c45a0d9e02e /init.lua | |
parent | fb04c57da90e41bf6d87f4d2153f6c1153bb5ad8 (diff) |
Add playereffects.has_effect_type
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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() |