- fix: Holy water fix. (#159)
* - fix: Holy water fix. * - tweak: Move bible check to CultSystem. * - tweak: Remove unused.
This commit is contained in:
@@ -13,7 +13,12 @@ public sealed partial class PuddleSystem
|
|||||||
[ValidatePrototypeId<ReagentPrototype>]
|
[ValidatePrototypeId<ReagentPrototype>]
|
||||||
private const string Water = "Water";
|
private const string Water = "Water";
|
||||||
|
|
||||||
public static string[] EvaporationReagents = new[] { Water };
|
// WD EDIT START
|
||||||
|
[ValidatePrototypeId<ReagentPrototype>]
|
||||||
|
private const string HolyWater = "Holywater";
|
||||||
|
|
||||||
|
public static string[] EvaporationReagents = new[] { Water, HolyWater };
|
||||||
|
// WD EDIT END
|
||||||
|
|
||||||
private void OnEvaporationMapInit(Entity<EvaporationComponent> entity, ref MapInitEvent args)
|
private void OnEvaporationMapInit(Entity<EvaporationComponent> entity, ref MapInitEvent args)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,6 +10,10 @@ using Content.Server.Hands.Systems;
|
|||||||
using Content.Server.Weapons.Ranged.Systems;
|
using Content.Server.Weapons.Ranged.Systems;
|
||||||
using Content.Server._White.Cult.GameRule;
|
using Content.Server._White.Cult.GameRule;
|
||||||
using Content.Server._White.Cult.Runes.Comps;
|
using Content.Server._White.Cult.Runes.Comps;
|
||||||
|
using Content.Server.Bible.Components;
|
||||||
|
using Content.Server.Chemistry.Components;
|
||||||
|
using Content.Server.Chemistry.Containers.EntitySystems;
|
||||||
|
using Content.Server.Fluids.Components;
|
||||||
using Content.Shared._White.Chaplain;
|
using Content.Shared._White.Chaplain;
|
||||||
using Content.Shared.Chemistry.Components.SolutionManager;
|
using Content.Shared.Chemistry.Components.SolutionManager;
|
||||||
using Content.Shared.Cuffs.Components;
|
using Content.Shared.Cuffs.Components;
|
||||||
@@ -64,6 +68,7 @@ public sealed partial class CultSystem : EntitySystem
|
|||||||
[Dependency] private readonly FlammableSystem _flammableSystem = default!;
|
[Dependency] private readonly FlammableSystem _flammableSystem = default!;
|
||||||
[Dependency] private readonly SharedPullingSystem _pulling = default!;
|
[Dependency] private readonly SharedPullingSystem _pulling = default!;
|
||||||
[Dependency] private readonly SharedCuffableSystem _cuffable = default!;
|
[Dependency] private readonly SharedCuffableSystem _cuffable = default!;
|
||||||
|
[Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!;
|
||||||
|
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
@@ -259,6 +264,14 @@ public sealed partial class CultSystem : EntitySystem
|
|||||||
|
|
||||||
private void TryErase(EntityUid uid, CultRuneBaseComponent component, InteractUsingEvent args)
|
private void TryErase(EntityUid uid, CultRuneBaseComponent component, InteractUsingEvent args)
|
||||||
{
|
{
|
||||||
|
if (TryComp<BibleComponent>(args.Used, out var bible) && HasComp<BibleUserComponent>(args.User))
|
||||||
|
{
|
||||||
|
_popupSystem.PopupEntity(Loc.GetString("cult-erased-rune"), args.User, args.User);
|
||||||
|
_audio.PlayPvs(bible.HealSoundPath, args.User);
|
||||||
|
EntityManager.DeleteEntity(args.Target);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var entityPrototype = _entityManager.GetComponent<MetaDataComponent>(args.Used).EntityPrototype;
|
var entityPrototype = _entityManager.GetComponent<MetaDataComponent>(args.Used).EntityPrototype;
|
||||||
|
|
||||||
if (entityPrototype == null)
|
if (entityPrototype == null)
|
||||||
@@ -293,7 +306,7 @@ public sealed partial class CultSystem : EntitySystem
|
|||||||
|
|
||||||
if (_doAfterSystem.TryStartDoAfter(argsDoAfterEvent))
|
if (_doAfterSystem.TryStartDoAfter(argsDoAfterEvent))
|
||||||
{
|
{
|
||||||
_popupSystem.PopupEntity(Loc.GetString("cult-started-erasing-rune"), target);
|
_popupSystem.PopupEntity(Loc.GetString("cult-started-erasing-rune"), args.User, args.User);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -305,18 +318,20 @@ public sealed partial class CultSystem : EntitySystem
|
|||||||
var target = GetEntity(args.TargetEntityId);
|
var target = GetEntity(args.TargetEntityId);
|
||||||
|
|
||||||
_entityManager.DeleteEntity(target);
|
_entityManager.DeleteEntity(target);
|
||||||
_popupSystem.PopupEntity(Loc.GetString("cult-erased-rune"), args.User);
|
_popupSystem.PopupEntity(Loc.GetString("cult-erased-rune"), args.User, args.User);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleCollision(EntityUid uid, CultRuneBaseComponent component, ref StartCollideEvent args)
|
private void HandleCollision(EntityUid uid, CultRuneBaseComponent component, ref StartCollideEvent args)
|
||||||
{
|
{
|
||||||
if (!TryComp<SolutionContainerManagerComponent>(args.OtherEntity, out var solution) || solution.Solutions == null)
|
if (!TryComp<SolutionContainerManagerComponent>(args.OtherEntity, out var solution) ||
|
||||||
|
!HasComp<VaporComponent>(args.OtherEntity) && !HasComp<SprayComponent>(args.OtherEntity))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (solution.Solutions.TryGetValue("vapor", out var vapor) &&
|
var solutions = _solutionContainerSystem.EnumerateSolutions((args.OtherEntity, solution));
|
||||||
vapor.Contents.Any(x => x.Reagent.Prototype == CultRuleComponent.HolyWaterReagent))
|
|
||||||
|
if (solutions.Any(x => x.Solution.Comp.Solution.ContainsPrototype(CultRuleComponent.HolyWaterReagent)))
|
||||||
{
|
{
|
||||||
Del(uid);
|
Del(uid);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1008,12 +1008,17 @@
|
|||||||
- type: reagent
|
- type: reagent
|
||||||
id: Holywater
|
id: Holywater
|
||||||
name: reagent-name-holywater
|
name: reagent-name-holywater
|
||||||
|
parent: BaseDrink
|
||||||
group: Medicine
|
group: Medicine
|
||||||
desc: reagent-desc-holywater
|
desc: reagent-desc-holywater
|
||||||
physicalDesc: reagent-physical-desc-holy
|
physicalDesc: reagent-physical-desc-holy
|
||||||
flavor: holy
|
flavor: holy
|
||||||
color: "#91C3F7"
|
color: "#91C3F7"
|
||||||
metabolisms:
|
metabolisms:
|
||||||
|
Drink:
|
||||||
|
effects:
|
||||||
|
- !type:SatiateThirst
|
||||||
|
factor: 4
|
||||||
Medicine:
|
Medicine:
|
||||||
effects:
|
effects:
|
||||||
- !type:HealthChange
|
- !type:HealthChange
|
||||||
|
|||||||
Reference in New Issue
Block a user