Fix Entity Effect Scaling (Hopefully) for good and some other misc fixes (#41163)
* Fix the last of the entity effects bugs * aaa * losing it --------- Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
2b196257c1
commit
e5b6e4bf04
@@ -26,35 +26,35 @@ public sealed partial class SharedEntityEffectsSystem : EntitySystem, IEntityEff
|
||||
|
||||
private void OnReactive(Entity<ReactiveComponent> entity, ref ReactionEntityEvent args)
|
||||
{
|
||||
if (args.Reagent.ReactiveEffects == null || entity.Comp.ReactiveGroups == null)
|
||||
return;
|
||||
|
||||
var scale = args.ReagentQuantity.Quantity.Float();
|
||||
|
||||
foreach (var (key, val) in args.Reagent.ReactiveEffects)
|
||||
if (args.Reagent.ReactiveEffects != null && entity.Comp.ReactiveGroups != null)
|
||||
{
|
||||
if (!val.Methods.Contains(args.Method))
|
||||
continue;
|
||||
foreach (var (key, val) in args.Reagent.ReactiveEffects)
|
||||
{
|
||||
if (!val.Methods.Contains(args.Method))
|
||||
continue;
|
||||
|
||||
if (!entity.Comp.ReactiveGroups.TryGetValue(key, out var group))
|
||||
continue;
|
||||
if (!entity.Comp.ReactiveGroups.TryGetValue(key, out var group))
|
||||
continue;
|
||||
|
||||
if (!group.Contains(args.Method))
|
||||
continue;
|
||||
if (!group.Contains(args.Method))
|
||||
continue;
|
||||
|
||||
ApplyEffects(entity, val.Effects, scale);
|
||||
ApplyEffects(entity, val.Effects, scale);
|
||||
}
|
||||
}
|
||||
|
||||
if (entity.Comp.Reactions == null)
|
||||
return;
|
||||
|
||||
foreach (var entry in entity.Comp.Reactions)
|
||||
if (entity.Comp.Reactions != null)
|
||||
{
|
||||
if (!entry.Methods.Contains(args.Method))
|
||||
continue;
|
||||
foreach (var entry in entity.Comp.Reactions)
|
||||
{
|
||||
if (!entry.Methods.Contains(args.Method))
|
||||
continue;
|
||||
|
||||
if (entry.Reagents == null || entry.Reagents.Contains(args.Reagent.ID))
|
||||
ApplyEffects(entity, entry.Effects, scale);
|
||||
if (entry.Reagents == null || entry.Reagents.Contains(args.Reagent.ID))
|
||||
ApplyEffects(entity, entry.Effects, scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user