Unstable 0.1500.1.0 (BaroDev edition)

This commit is contained in:
Markus Isberg
2021-09-03 21:56:31 +09:00
parent 501e02c026
commit e7b7c1a748
143 changed files with 2928 additions and 1356 deletions
@@ -89,11 +89,11 @@ namespace Barotrauma
return (skill == null) ? 0.0f : skill.Level;
}
public void IncreaseSkillLevel(string skillIdentifier, float increase)
public void IncreaseSkillLevel(string skillIdentifier, float increase, bool increasePastMax)
{
if (skills.TryGetValue(skillIdentifier, out Skill skill))
{
skill.Level += increase;
skill.IncreaseSkill(increase, increasePastMax);
}
else
{
@@ -7,11 +7,18 @@ namespace Barotrauma
private float level;
public string Identifier { get; }
public const float MaximumSkill = 100.0f;
public float Level
{
get { return level; }
set { level = MathHelper.Clamp(value, 0.0f, 100.0f); }
set { level = value; }
}
public void IncreaseSkill(float value, bool increasePastMax)
{
level = MathHelper.Clamp(level + value, 0.0f, increasePastMax ? float.MaxValue : MaximumSkill);
}
private Sprite icon;