Remove ref passing, but keep devirtualizations

This commit is contained in:
Asriel Camora
2024-03-16 13:24:26 -07:00
parent 3223bdcbfb
commit ec77f1d021
48 changed files with 411 additions and 787 deletions
+8 -21
View File
@@ -1,26 +1,13 @@
namespace Craftimizer.Simulator.Actions;
internal sealed class BasicSynthesis : BaseAction
internal sealed class BasicSynthesis() : BaseAction(
ActionCategory.Synthesis, 1, 100001,
increasesProgress: true,
defaultCPCost: 0,
defaultEfficiency: 100
)
{
public int CP;
public int EfficiencyNormal = 100;
public int EfficiencyGood = 120;
public BasicSynthesis()
{
Category = ActionCategory.Synthesis;
IncreasesProgress = true;
ActionId = 100001;
Level = 1;
}
public override void CPCost(Simulator s, ref int cost)
{
cost = CP;
}
// Basic Synthesis Mastery Trait
public override void Efficiency(Simulator s, ref int eff)
{
eff = s.Input.Stats.Level >= 31 ? EfficiencyGood : EfficiencyNormal;
}
public override int Efficiency(Simulator s) =>
s.Input.Stats.Level >= 31 ? 120 : 100;
}