Some cult fixes

This commit is contained in:
Aviu00
2024-01-28 09:11:36 +03:00
parent 5cec339558
commit cff24101b0
3 changed files with 6 additions and 5 deletions

View File

@@ -410,14 +410,15 @@ public sealed partial class CultSystem : EntitySystem
if (state.CurrentState != MobState.Dead)
{
var canBeConverted = _entityManager.TryGetComponent<MindContainerComponent>(victim.Value, out var mind) && mind.HasMind;
var canBeConverted = _entityManager.TryGetComponent<MindContainerComponent>(victim.Value, out var mind) &&
mind is {Mind: { }};
// Проверка, является ли жертва целью
_entityManager.TryGetComponent<MindContainerComponent>(target?.CurrentEntity, out var targetMind);
var isTarget = mind != null && mind.Mind!.Value == targetMind?.Mind!.Value;
var isTarget = mind!.Mind!.Value == targetMind?.Mind!.Value;
var jobAllowConvert = true;
if(_jobSystem.MindTryGetJob(mind!.Mind!.Value, out var _, out var prototype))
if(_jobSystem.MindTryGetJob(mind.Mind!.Value, out var _, out var prototype))
{
jobAllowConvert = prototype.CanBeAntag;
}

View File

@@ -6,3 +6,4 @@ shuttle-curse-shuttle-arrived = Сфера доносит, что уже сли
shuttle-curse-shuttle-delayed = Сфера доносит, что прокльяте наложено
ent-CultShuttleCurse = сфера проклятия
.desc = Cтранная каменная сфера, пульсирующая красным светом.
round-end-system-shuttle-curse-delayed-announcement = По определённым причинам, шаттл был задержан на некоторое время.

View File

@@ -23,13 +23,12 @@
thresholds:
- trigger:
!type:DamageTrigger
damage: 300
damage: 150
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: Reflect
reflectProb: 0.5
passiveReflect: true
reflects:
- Energy
- type: ReturnItemOnThrow