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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user