Added settings and warnings

This commit is contained in:
Cooldude2606
2020-06-01 20:29:17 +01:00
parent f1864985ff
commit 7811ad2e11
10 changed files with 112 additions and 54 deletions

View File

@@ -12,6 +12,13 @@ require 'config.expcore.command_general_parse'
--- Stores the bonus for the player
local PlayerData = require 'expcore.player_data' --- @dep expcore.player_data
local PlayerBonus = PlayerData.Settings:combine('Bonus')
PlayerBonus:set_default(0)
PlayerBonus:set_metadata{
stringify = function(value)
if not value or value == 0 then return 'None set' end
return (value*100)..'%'
end
}
--- Apply a bonus amount to a player
local function apply_bonus(player, amount)