Skill progression system (#1263)
* delete skill trees
* Revert "delete skill trees"
This reverts commit 9d7fae73c4.
* learning refactor
* UI tweaks
* sword mastery skill
* telegraphy
* rapier mastery
* research table ui
* finish studing
* polish UI researching
* pyrokinetic
* more skill tree working
* heat adapt
* alchemist and metamagic update
* skill multiple effects support + metamagic bugg manapool
* impossible 😢
* skimitar gaming
* skimidi
* blacksmithing branch
* remove research restrictions
* remove species magic buff
* fix loc
* Update thaumaturgy.yml
* pip
* Delete skill_tree.yml
This commit is contained in:
@@ -58,6 +58,19 @@ public abstract class SharedCP14MagicEnergySystem : EntitySystem
|
||||
_ambient.SetAmbience(ent, args.Powered);
|
||||
}
|
||||
|
||||
private void UpdateMagicAlert(Entity<CP14MagicEnergyContainerComponent> ent)
|
||||
{
|
||||
if (ent.Comp.MagicAlert is null)
|
||||
return;
|
||||
|
||||
var level = ContentHelpers.RoundToLevels(
|
||||
MathF.Max(0f, (float) ent.Comp.Energy),
|
||||
(float) ent.Comp.MaxEnergy,
|
||||
_alerts.GetMaxSeverity(ent.Comp.MagicAlert.Value));
|
||||
|
||||
_alerts.ShowAlert(ent, ent.Comp.MagicAlert.Value, (short) level);
|
||||
}
|
||||
|
||||
public void ChangeEnergy(Entity<CP14MagicEnergyContainerComponent?> ent,
|
||||
FixedPoint2 energy,
|
||||
out FixedPoint2 deltaEnergy,
|
||||
@@ -154,17 +167,14 @@ public abstract class SharedCP14MagicEnergySystem : EntitySystem
|
||||
("color", color));
|
||||
}
|
||||
|
||||
private void UpdateMagicAlert(Entity<CP14MagicEnergyContainerComponent> ent)
|
||||
public void ChangeMaximumEnergy(Entity<CP14MagicEnergyContainerComponent?> ent, FixedPoint2 energy)
|
||||
{
|
||||
if (ent.Comp.MagicAlert is null)
|
||||
if (!Resolve(ent, ref ent.Comp, false))
|
||||
return;
|
||||
|
||||
var level = ContentHelpers.RoundToLevels(
|
||||
MathF.Max(0f, (float) ent.Comp.Energy),
|
||||
(float) ent.Comp.MaxEnergy,
|
||||
_alerts.GetMaxSeverity(ent.Comp.MagicAlert.Value));
|
||||
ent.Comp.MaxEnergy += energy;
|
||||
|
||||
_alerts.ShowAlert(ent, ent.Comp.MagicAlert.Value, (short) level);
|
||||
ChangeEnergy(ent, energy, out _, out _);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user