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 -18
View File
@@ -1,22 +1,12 @@
namespace Craftimizer.Simulator.Actions;
internal sealed class StandardTouch : BaseAction
internal sealed class StandardTouch() : BaseAction(
ActionCategory.Quality, 18, 100004,
increasesQuality: true,
defaultCPCost: 32,
defaultEfficiency: 125
)
{
public StandardTouch()
{
Category = ActionCategory.Quality;
Level = 18;
ActionId = 100004;
IncreasesQuality = true;
}
public override void CPCost(Simulator s, ref int cost)
{
cost = s.ActionStates.TouchComboIdx == 1 ? 18 : 32;
}
public override void Efficiency(Simulator s, ref int eff)
{
eff = 125;
}
public override int CPCost(Simulator s) =>
s.ActionStates.TouchComboIdx == 1 ? 18 : 32;
}