фиксы культа крови
This commit is contained in:
parent
9e0ab07658
commit
a2f3e60f8a
8 changed files with 123 additions and 38 deletions
|
|
@ -26,11 +26,13 @@ using Content.Shared.Mobs;
|
|||
using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Mobs.Systems;
|
||||
using Content.Shared.NPC.Systems;
|
||||
using Content.Shared.Roles;
|
||||
using Content.Shared.StatusIcon.Components;
|
||||
using Content.Shared.Tag;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Random;
|
||||
using CultMemberComponent = Content.Shared._Sunrise.BloodCult.Components.CultMemberComponent;
|
||||
|
||||
|
|
@ -53,15 +55,15 @@ public sealed class BloodCultRuleSystem : GameRuleSystem<BloodCultRuleComponent>
|
|||
[Dependency] private readonly SharedActionsSystem _actionsSystem = default!;
|
||||
[Dependency] private readonly ISharedPlayerManager _playerManager = default!;
|
||||
[Dependency] private readonly KillCultistTargetsConditionSystem _cultistTargetsConditionSystem = default!;
|
||||
[Dependency] private readonly SharedRoleSystem _roles = default!;
|
||||
|
||||
private ISawmill _sawmill = default!;
|
||||
private EntProtoId MindRoleCultistPrototypeId = "MindRoleCultist";
|
||||
private EntProtoId CultistKillObjective = "CultistKillObjective";
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
_sawmill = Logger.GetSawmill("preset");
|
||||
|
||||
SubscribeLocalEvent<CultNarsieSummoned>(OnNarsieSummon);
|
||||
SubscribeLocalEvent<UpdateCultAppearance>(UpdateCultistsAppearance);
|
||||
|
||||
|
|
@ -173,7 +175,7 @@ public sealed class BloodCultRuleSystem : GameRuleSystem<BloodCultRuleComponent>
|
|||
{
|
||||
foreach (var cultTarget in cultRuleComponent.CultTargets)
|
||||
{
|
||||
if (_mindSystem.TryGetMind(cultTarget, out var mindId, out var mind))
|
||||
if (TryComp<MindComponent>(cultTarget, out var mind))
|
||||
targetMinds.Add(mind);
|
||||
}
|
||||
}
|
||||
|
|
@ -237,10 +239,10 @@ public sealed class BloodCultRuleSystem : GameRuleSystem<BloodCultRuleComponent>
|
|||
|
||||
private void CheckRoundShouldEnd()
|
||||
{
|
||||
var querry = EntityQueryEnumerator<BloodCultRuleComponent, GameRuleComponent>();
|
||||
var query = EntityQueryEnumerator<BloodCultRuleComponent, GameRuleComponent>();
|
||||
var aliveCultistsCount = 0;
|
||||
|
||||
while (querry.MoveNext(out _, out var cultRuleComponent, out _))
|
||||
while (query.MoveNext(out _, out var cultRuleComponent, out _))
|
||||
{
|
||||
var cultisQuery = EntityQueryEnumerator<BloodCultistComponent>();
|
||||
while (cultisQuery.MoveNext(out var cultistUid, out _))
|
||||
|
|
@ -284,6 +286,15 @@ public sealed class BloodCultRuleSystem : GameRuleSystem<BloodCultRuleComponent>
|
|||
RemComp<CollectiveMindComponent>(uid);
|
||||
}
|
||||
|
||||
if (_mindSystem.TryGetMind(uid, out var mindId, out var mind))
|
||||
{
|
||||
if (_mindSystem.TryFindObjective((mindId, mind), CultistKillObjective, out var objective))
|
||||
{
|
||||
_mindSystem.TryRemoveObjective(mindId, mind, mind.Objectives.IndexOf(objective.Value));
|
||||
}
|
||||
_roles.MindRemoveRole<BloodCultistRoleComponent>((mindId, mind));
|
||||
}
|
||||
|
||||
var query = EntityQueryEnumerator<BloodCultRuleComponent, GameRuleComponent>();
|
||||
|
||||
while (query.MoveNext(out var ruleEnt, out var cultRuleComponent, out _))
|
||||
|
|
@ -385,6 +396,8 @@ public sealed class BloodCultRuleSystem : GameRuleSystem<BloodCultRuleComponent>
|
|||
if (!_mindSystem.TryGetMind(cultist, out var mindId, out var mind))
|
||||
return false;
|
||||
|
||||
_roles.MindAddRole(mindId, MindRoleCultistPrototypeId);
|
||||
|
||||
var isHumanoid = HasComp<HumanoidAppearanceComponent>(cultist);
|
||||
|
||||
var cultistComponent = EnsureComp<BloodCultistComponent>(cultist);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ using Content.Shared.Body.Components;
|
|||
using Content.Shared.Chemistry.Components;
|
||||
using Content.Shared.Chemistry.EntitySystems;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Popups;
|
||||
|
|
@ -87,22 +88,34 @@ public sealed class BloodCultWeaponSystem : EntitySystem
|
|||
|
||||
if (_body.TryGetBodyOrganEntityComps<StomachComponent>((args.Target.Value, body), out var stomachs))
|
||||
{
|
||||
var firstStomach = stomachs.FirstOrNull();
|
||||
var highestAvailable = FixedPoint2.Zero;
|
||||
Solution? stomachSol = null;
|
||||
Entity<StomachComponent>? stomachToUse = null;
|
||||
foreach (var ent in stomachs)
|
||||
{
|
||||
var owner = ent.Owner;
|
||||
if (!_solutionContainer.ResolveSolution(owner, StomachSystem.DefaultSolutionName, ref ent.Comp1.Solution, out stomachSol))
|
||||
continue;
|
||||
|
||||
if (firstStomach == null)
|
||||
if (stomachSol.AvailableVolume <= highestAvailable)
|
||||
continue;
|
||||
|
||||
stomachToUse = ent;
|
||||
highestAvailable = stomachSol.AvailableVolume;
|
||||
}
|
||||
|
||||
if (stomachToUse == null || stomachSol == null)
|
||||
return;
|
||||
|
||||
if (!_solutionContainer.TryGetSolution(firstStomach.Value.Owner,
|
||||
firstStomach.Value.Comp1.BodySolutionName,
|
||||
out var bodySolution))
|
||||
return;
|
||||
|
||||
if (_stomachSystem.TryChangeReagent(firstStomach.Value.Owner,
|
||||
if (_stomachSystem.TryChangeReagent(stomachToUse.Value.Owner,
|
||||
component.ConvertedId,
|
||||
component.ConvertedToId))
|
||||
convert = true;
|
||||
}
|
||||
|
||||
if (ConvertHolyWater(bodySolution.Value.Comp.Solution, component.ConvertedId, component.ConvertedToId))
|
||||
if (_solutionContainer.TryGetInjectableSolution(args.Target.Value, out var injectableSolution, out _))
|
||||
{
|
||||
if (ConvertHolyWater(injectableSolution.Value.Comp.Solution, component.ConvertedId, component.ConvertedToId))
|
||||
convert = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ namespace Content.Server._Sunrise.BloodCult.Runes.Systems
|
|||
if (HasComp<BorgChassisComponent>(args.Target))
|
||||
_empSystem.EmpPulse(_transformSystem.GetMapCoordinates(args.Target), 2, 100000, 5f);
|
||||
|
||||
_stunSystem.TryParalyze(args.Target, TimeSpan.FromSeconds(6), true);
|
||||
_stunSystem.TryParalyze(args.Target, TimeSpan.FromSeconds(3), true, force: true);
|
||||
_stuttering.DoStutter(args.Target, TimeSpan.FromSeconds(30), true);
|
||||
_flashSystem.Flash(args.Target, uid, null, 3, 10);
|
||||
|
||||
|
|
|
|||
|
|
@ -406,7 +406,10 @@ namespace Content.Server._Sunrise.BloodCult.Runes.Systems
|
|||
var targets =
|
||||
_lookup.GetEntitiesInRange(uid, component.RangeTarget, LookupFlags.Dynamic | LookupFlags.Sundries);
|
||||
|
||||
targets.RemoveWhere(x => HasComp<BloodCultistComponent>(x));
|
||||
targets.RemoveWhere(x =>
|
||||
HasComp<BloodCultistComponent>(x) ||
|
||||
HasComp<ConstructComponent>(x) ||
|
||||
!HasComp<MobStateComponent>(x));
|
||||
|
||||
if (targets.Count == 0)
|
||||
return;
|
||||
|
|
@ -434,7 +437,7 @@ namespace Content.Server._Sunrise.BloodCult.Runes.Systems
|
|||
{
|
||||
foreach (var mindComponent in cultTargets)
|
||||
{
|
||||
isTarget = mind.Session == mindComponent?.Session;
|
||||
isTarget = mind.Session == mindComponent.Session;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -222,15 +222,17 @@ public sealed partial class FleshCultSystem
|
|||
{
|
||||
if (_mindSystem.TryGetMind(uid, out var mindId, out var mind))
|
||||
{
|
||||
_roles.MindRemoveRole<FleshCultistRoleComponent>((mindId, mind));
|
||||
var indexesToRemove = mind.Objectives
|
||||
.Select((objective, index) => new { objective, index })
|
||||
.Where(x => MetaData(x.objective).EntityPrototype!.ID is CreateFleshHeartObjective or FleshCultSurviveObjective)
|
||||
.Select(x => x.index)
|
||||
.ToList();
|
||||
if (_mindSystem.TryFindObjective((mindId, mind), CreateFleshHeartObjective, out var fleshHeartObjective))
|
||||
{
|
||||
_mindSystem.TryRemoveObjective(mindId, mind, mind.Objectives.IndexOf(fleshHeartObjective.Value));
|
||||
}
|
||||
|
||||
foreach (var index in indexesToRemove.OrderByDescending(i => i))
|
||||
_mindSystem.TryRemoveObjective(mindId, mind, index);
|
||||
if (_mindSystem.TryFindObjective((mindId, mind), FleshCultSurviveObjective, out var surviveObjective))
|
||||
{
|
||||
_mindSystem.TryRemoveObjective(mindId, mind, mind.Objectives.IndexOf(surviveObjective.Value));
|
||||
}
|
||||
|
||||
_roles.MindRemoveRole<FleshCultistRoleComponent>((mindId, mind));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public sealed partial class BloodCultistComponent : Component
|
|||
public int HolyConvertChance = 33;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("holyConvertTime")]
|
||||
public float HolyConvertTime = 30f;
|
||||
public float HolyConvertTime = 60f;
|
||||
|
||||
public EntityUid? BloodMagicEntity;
|
||||
|
||||
|
|
|
|||
|
|
@ -13876,3 +13876,62 @@
|
|||
type: Fix
|
||||
id: 951
|
||||
time: '2025-04-02T19:03:42.712777+00:00'
|
||||
- author: VigersRay
|
||||
changes:
|
||||
- message: "\u0418\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0430 \u043E\u0448\
|
||||
\u0438\u0431\u043A\u0430 \u0438\u0437-\u0437\u0430 \u043A\u043E\u0442\u043E\u0440\
|
||||
\u043E\u0439 \u043D\u0430\u0447\u0435\u0440\u0442\u0438\u0442\u044C \u0440\u0443\
|
||||
\u043D\u0443 \u043F\u0440\u0438\u0437\u044B\u0432\u0430 \u0431\u043E\u0436\u0435\
|
||||
\u0441\u0442\u0432\u0430 \u043A\u0443\u043B\u044C\u0442\u0430 \u043A\u0440\u043E\
|
||||
\u0432\u0438 \u043C\u043E\u0436\u043D\u043E \u0431\u044B\u043B\u043E \u0431\u0435\
|
||||
\u0437 \u043F\u0440\u0438\u043D\u0435\u0441\u0435\u043D\u0438\u044F \u0432 \u0436\
|
||||
\u0435\u0440\u0442\u0432\u0443 \u0446\u0435\u043B\u0435\u0439."
|
||||
type: Fix
|
||||
- message: "\u041D\u043E\u0432\u044B\u0435 \u0447\u043B\u0435\u043D\u044B \u043A\
|
||||
\u0443\u043B\u044C\u0442\u0430 \u043A\u0440\u043E\u0432\u0438 \u0442\u0435\u043F\
|
||||
\u0435\u0440\u044C \u0432\u0438\u0434\u044F\u0442 \u0446\u0435\u043B\u0438 \u0438\
|
||||
\ \u043F\u043E\u043C\u0435\u0447\u0435\u043D\u044B \u0434\u043B\u044F \u0430\
|
||||
\u0434\u043C\u0438\u043D\u043E\u0432 \u043A\u0430\u043A \u0430\u043D\u0442\u0430\
|
||||
\u0433\u043E\u043D\u0438\u0441\u0442\u044B."
|
||||
type: Fix
|
||||
- message: "\u0418\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D \u0431\u0430\u0433\
|
||||
\ \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u043D\u0435 \u0434\u0430\u0432\
|
||||
\u0430\u043B \u043F\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044C \u0441\
|
||||
\u0432\u044F\u0442\u0443\u044E \u0432\u043E\u0434\u0443 \u0432 \u043A\u0443\u043B\
|
||||
\u044C\u0442\u0438\u0441\u0442\u0435 \u043A\u0440\u043E\u0432\u0438 \u0432 \u043D\
|
||||
\u0435\u0447\u0438\u0441\u0442\u0438\u0432\u0443\u044E \u043F\u0440\u0438 \u043F\
|
||||
\u043E\u043C\u043E\u0449\u0438 \u043A\u043B\u0438\u043D\u043A\u0430 \u043A\u0443\
|
||||
\u043B\u044C\u0442\u0430."
|
||||
type: Fix
|
||||
- message: "\u0418\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D \u0431\u0430\u0433\
|
||||
\ \u043A\u043E\u0433\u0434\u0430 \u043F\u043E\u0441\u043B\u0435 \u0434\u0435\
|
||||
\u043A\u043E\u043D\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u043A\u0443\
|
||||
\u043B\u044C\u0442\u0438\u0441\u0442\u0430 \u0443 \u043D\u0435\u0433\u043E \u043E\
|
||||
\u0441\u0442\u0430\u0432\u0430\u043B\u0430\u0441\u044C \u0430\u043D\u0442\u0430\
|
||||
\u0433 \u0440\u043E\u043B\u044C \u0438 \u0446\u0435\u043B\u0438."
|
||||
type: Fix
|
||||
- message: "\u0418\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D \u0431\u0430\u0433\
|
||||
\ \u043A\u043E\u0433\u0434\u0430 \u0446\u0435\u043B\u044C\u044E \u0440\u0443\
|
||||
\u043D\u044B \u043F\u043E\u0434\u043D\u043E\u0448\u0435\u043D\u0438\u044F \u0432\
|
||||
\u044B\u0431\u0438\u0440\u0430\u043B\u0441\u044F \u043A\u043E\u043D\u0441\u0442\
|
||||
\u0440\u0443\u043A\u0442 \u0447\u0442\u043E \u0431\u043B\u043E\u043A\u0438\u0440\
|
||||
\u043E\u0432\u0430\u043B\u043E \u0435\u0451 \u0440\u0430\u0431\u043E\u0442\u0443\
|
||||
."
|
||||
type: Fix
|
||||
- message: "\u041F\u043E\u0432\u044B\u0448\u0435\u043D\u043E \u0432\u0440\u0435\u043C\
|
||||
\u044F \u0434\u043B\u044F \u0434\u0435\u043A\u043E\u043D\u0432\u0435\u0440\u0442\
|
||||
\u0430\u0446\u0438\u0438 \u043A\u0443\u043B\u044C\u0442\u0438\u0441\u0442\u0430\
|
||||
\ \u043A\u0440\u043E\u0432\u0438 \u043F\u0440\u0438 \u043F\u043E\u043C\u043E\
|
||||
\u0449\u0438 \u0441\u0432\u044F\u0442\u043E\u0439 \u0432\u043E\u0434\u044B \u0441\
|
||||
\ 30 \u0434\u043E 60 \u0441\u0435\u043A\u0443\u043D\u0434."
|
||||
type: Tweak
|
||||
- message: "\u0423\u043C\u0435\u043D\u044C\u0448\u0435\u043D\u0430 \u0441\u043A\u043E\
|
||||
\u0440\u043E\u0441\u0442\u044C \u043C\u0435\u0442\u0430\u0431\u043E\u043B\u0438\
|
||||
\u0437\u043C\u0430 \u0441\u0432\u044F\u0442\u043E\u0439 \u0432\u043E\u0434\u044B\
|
||||
\ \u0434\u043B\u044F \u0443\u043F\u0440\u043E\u0449\u0435\u043D\u0438\u044F\
|
||||
\ \u0434\u0435\u043A\u043E\u043D\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438\
|
||||
\ \u043A\u0443\u043B\u044C\u0442\u0438\u0441\u0442\u043E\u0432 \u043A\u0440\u043E\
|
||||
\u0432\u0438."
|
||||
type: Tweak
|
||||
id: 952
|
||||
time: '2025-04-02T20:41:50.753750+00:00'
|
||||
|
|
|
|||
|
|
@ -1088,13 +1088,8 @@
|
|||
color: "#91C3F7"
|
||||
metabolisms:
|
||||
Drink:
|
||||
metabolismRate: 0.01 # Sunrise-Edit
|
||||
effects:
|
||||
- !type:SatiateThirst
|
||||
factor: 3
|
||||
conditions:
|
||||
- !type:OrganType
|
||||
type: Dwarf
|
||||
shouldHave: false
|
||||
# Sunrise-Start
|
||||
- !type:DeconvertCultist
|
||||
conditions:
|
||||
|
|
@ -1127,11 +1122,11 @@
|
|||
shouldHave: false
|
||||
damage:
|
||||
types:
|
||||
Blunt: -0.2
|
||||
Poison: -0.2
|
||||
Heat: -0.2
|
||||
Shock: -0.2
|
||||
Cold: -0.2
|
||||
Blunt: -0.5
|
||||
Poison: -0.5
|
||||
Heat: -0.5
|
||||
Shock: -0.5
|
||||
Cold: -0.5
|
||||
reactiveEffects:
|
||||
Unholy:
|
||||
methods: [ Touch ]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue