You can bless more containers with a bible (#26526)

* Made more things blessable

* Removed junk

* Remove whatever that was

* Make bowls blessable

* New mixablesolution component, converted everything to work with it

* Fix minor mishaps

* Fix extra spaces in bottle yml

* Fix last extra space, fix bottle havign the wrong solution name

* Remvoe unneeded event(I think), fix alcohol bottles not being mixable

* I missed cans
This commit is contained in:
Verm
2024-04-20 01:16:55 -05:00
committed by GitHub
parent c85bdef7f1
commit 089c9cb967
24 changed files with 54 additions and 48 deletions

View File

@@ -78,31 +78,15 @@ public abstract partial class SharedSolutionContainerSystem
return TryGetSolution((entity.Owner, entity.Comp2), entity.Comp1.Solution, out soln, out solution);
}
public bool TryGetMixableSolution(Entity<SolutionContainerManagerComponent?> container, [NotNullWhen(true)] out Entity<SolutionComponent>? solution)
public bool TryGetMixableSolution(Entity<MixableSolutionComponent?, SolutionContainerManagerComponent?> entity, [NotNullWhen(true)] out Entity<SolutionComponent>? soln, [NotNullWhen(true)] out Solution? solution)
{
var getMixableSolutionAttempt = new GetMixableSolutionAttemptEvent(container);
RaiseLocalEvent(container, ref getMixableSolutionAttempt);
if (getMixableSolutionAttempt.MixedSolution != null)
if (!Resolve(entity, ref entity.Comp1, logMissing: false))
{
solution = getMixableSolutionAttempt.MixedSolution;
return true;
}
if (!Resolve(container, ref container.Comp, false))
{
solution = default!;
(soln, solution) = (default!, null);
return false;
}
var tryGetSolution = EnumerateSolutions(container).FirstOrNull(x => x.Solution.Comp.Solution.CanMix);
if (tryGetSolution.HasValue)
{
solution = tryGetSolution.Value.Solution;
return true;
}
solution = default!;
return false;
return TryGetSolution((entity.Owner, entity.Comp2), entity.Comp1.Solution, out soln, out solution);
}
#endregion Solution Accessors