Fix lumera actions (#1446)

* ZLevelMover

* fix

* Update CP14ReligionSystem.cs
This commit is contained in:
Red
2025-06-21 02:46:01 +03:00
committed by GitHub
parent a1656c0c88
commit f4abe1cf35
12 changed files with 78 additions and 53 deletions

View File

@@ -55,8 +55,19 @@ public sealed partial class CP14SpellStorageSystem : EntitySystem
storage.Comp.SpellEntities.Add(spellEnt.Value);
}
if (storage.Comp.GrantAccessToSelf)
_actions.GrantActions(storage.Owner, storage.Comp.SpellEntities, storage.Owner);
{
if (!_mind.TryGetMind(storage.Owner, out var mind, out _))
_actions.GrantActions(storage.Owner, storage.Comp.SpellEntities, storage.Owner);
else
{
foreach (var spell in storage.Comp.SpellEntities)
{
_actionContainer.AddAction(mind, spell);
}
}
}
}
private void OnMagicStorageShutdown(Entity<CP14SpellStorageComponent> mStorage, ref ComponentShutdown args)