Cult stuff (#348)
* - add: Cult buff protects against spacing. * - add: Predict RunicDoor. * - add: Loc. * - fix: Missing includes. * - add: Revive rune popups. * - tweak: Buff rune. * - fix: Buff rune.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Content.Server.Administration.Logs;
|
||||
using Content.Server.Atmos.Components;
|
||||
using Content.Shared._White.Cult.Components;
|
||||
using Content.Shared.Alert;
|
||||
using Content.Shared.Atmos;
|
||||
using Content.Shared.Damage;
|
||||
@@ -262,7 +263,7 @@ public sealed class BarotraumaSystem : EntitySystem
|
||||
voidAdaptation.ChemMultiplier = 0.75f;
|
||||
ActNormalPressure(uid, barotrauma, pressure);
|
||||
break;
|
||||
case <= Atmospherics.HazardLowPressure:
|
||||
case <= Atmospherics.HazardLowPressure when !HasComp<CultBuffComponent>(uid): // WD EDIT
|
||||
ActLowPressure(uid, barotrauma);
|
||||
break;
|
||||
case >= Atmospherics.HazardHighPressure:
|
||||
@@ -333,4 +334,4 @@ public sealed class BarotraumaSystem : EntitySystem
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Content.Server._White.Cult.Items.Components;
|
||||
using Content.Server._White.Cult.TimedProduction;
|
||||
using Content.Shared._White.Cult;
|
||||
using Content.Shared._White.Cult.Components;
|
||||
using Content.Shared._White.Cult.Pylon;
|
||||
using Robust.Shared.Physics.Events;
|
||||
using CultistComponent = Content.Shared._White.Cult.Components.CultistComponent;
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Numerics;
|
||||
using Content.Server.Atmos.Piping.Other.Components;
|
||||
using Content.Server.Body.Components;
|
||||
using Content.Server.Body.Systems;
|
||||
using Content.Shared._White.Cult.Components;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Doors.Components;
|
||||
using Content.Shared.Interaction;
|
||||
|
||||
@@ -11,6 +11,7 @@ using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Physics;
|
||||
using Content.Shared.StatusEffect;
|
||||
using Content.Shared._White.Cult;
|
||||
using Content.Shared._White.Cult.Components;
|
||||
|
||||
namespace Content.Server._White.Cult.Runes.Systems;
|
||||
|
||||
|
||||
@@ -37,7 +37,6 @@ using Content.Shared._White.Cult.Components;
|
||||
using Content.Shared._White.Cult.Runes;
|
||||
using Content.Shared._White.Cult.UI;
|
||||
using Content.Shared.Cuffs;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.GameTicking;
|
||||
using Content.Shared.Mindshield.Components;
|
||||
using Content.Shared.Mobs.Systems;
|
||||
@@ -597,13 +596,14 @@ public sealed partial class CultSystem : EntitySystem
|
||||
|
||||
private bool AddCultistBuff(EntityUid target, EntityUid user)
|
||||
{
|
||||
if (HasComp<CultBuffComponent>(target))
|
||||
if (TryComp<CultBuffComponent>(target, out var buff) && buff.BuffTime > buff.BuffLimit)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("cult-buff-already-buffed"), user, user);
|
||||
return false;
|
||||
}
|
||||
|
||||
EnsureComp<CultBuffComponent>(target);
|
||||
buff = EnsureComp<CultBuffComponent>(target);
|
||||
buff.BuffTime = buff.StartingBuffTime;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -876,7 +876,10 @@ public sealed partial class CultSystem : EntitySystem
|
||||
return false;
|
||||
|
||||
if (!_mobState.IsDead(target, mobState))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("cult-revive-rune-already-alive"), user, user);
|
||||
return false;
|
||||
}
|
||||
|
||||
var airlossGroup = _prototypeManager.Index<DamageGroupPrototype>("Airloss");
|
||||
|
||||
@@ -886,7 +889,10 @@ public sealed partial class CultSystem : EntitySystem
|
||||
{
|
||||
var afterHeal = damageable.TotalDamage - toHeal;
|
||||
if (deadThreshold <= afterHeal)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("cult-revive-rune-too-damaged"), user, user);
|
||||
return false;
|
||||
}
|
||||
|
||||
var asphyxType = _prototypeManager.Index<DamageTypePrototype>("Asphyxiation");
|
||||
var bloodlossType = _prototypeManager.Index<DamageTypePrototype>("Bloodloss");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System.Diagnostics;
|
||||
using Content.Server._White.Cult.Structures;
|
||||
using Content.Shared._White.Cult.Structures;
|
||||
using Content.Shared._White.Keyhole.Components;
|
||||
using Content.Shared._White.Keyhole;
|
||||
using Content.Shared.DoAfter;
|
||||
@@ -120,4 +120,4 @@ public sealed class KeyholeSystem : EntitySystem
|
||||
_popupSystem.PopupEntity(Loc.GetString("key-pressed-in-keyform-message", ("user", user), ("key", uid)), uid);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Linq;
|
||||
using Content.Shared._White.Cult.Structures;
|
||||
using Content.Shared._White.Keyhole.Components;
|
||||
using Content.Shared.Access.Components;
|
||||
using Content.Shared.Access.Systems;
|
||||
@@ -41,6 +42,7 @@ public abstract partial class SharedDoorSystem : EntitySystem
|
||||
[Dependency] private readonly AccessReaderSystem _accessReaderSystem = default!;
|
||||
[Dependency] private readonly PryingSystem _pryingSystem = default!;
|
||||
[Dependency] protected readonly SharedPopupSystem Popup = default!;
|
||||
[Dependency] private readonly RunicDoorSystem _runicDoor = default!; // WD
|
||||
|
||||
[ValidatePrototypeId<TagPrototype>]
|
||||
public const string DoorBumpTag = "DoorBumpOpener";
|
||||
@@ -649,6 +651,9 @@ public abstract partial class SharedDoorSystem : EntitySystem
|
||||
|
||||
var otherUid = args.OtherEntity;
|
||||
|
||||
if (!_runicDoor.CanBumpOpen(uid, otherUid)) // WD
|
||||
return;
|
||||
|
||||
if (Tags.HasTag(otherUid, DoorBumpTag))
|
||||
TryOpen(uid, door, otherUid, quiet: door.State == DoorState.Denying);
|
||||
}
|
||||
@@ -762,6 +767,9 @@ public abstract partial class SharedDoorSystem : EntitySystem
|
||||
{
|
||||
foreach (var other in PhysicsSystem.GetContactingEntities(uid, physics, approximate: true))
|
||||
{
|
||||
if (!_runicDoor.CanBumpOpen(uid, other)) // WD
|
||||
continue;
|
||||
|
||||
if (Tags.HasTag(other, DoorBumpTag) && TryOpen(uid, door, other, quiet: true))
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server._White.Cult;
|
||||
namespace Content.Shared._White.Cult.Components;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed partial class ConstructComponent : Component
|
||||
@@ -3,10 +3,16 @@ namespace Content.Shared._White.Cult.Components;
|
||||
[RegisterComponent]
|
||||
public sealed partial class CultBuffComponent : Component
|
||||
{
|
||||
[ViewVariables(VVAccess.ReadOnly), DataField("buffTime")]
|
||||
[ViewVariables(VVAccess.ReadOnly), DataField]
|
||||
public TimeSpan BuffTime = TimeSpan.FromSeconds(60);
|
||||
|
||||
[ViewVariables(VVAccess.ReadOnly), DataField]
|
||||
public TimeSpan StartingBuffTime = TimeSpan.FromSeconds(60);
|
||||
|
||||
[ViewVariables(VVAccess.ReadOnly), DataField]
|
||||
public TimeSpan BuffLimit = TimeSpan.FromSeconds(55);
|
||||
|
||||
public static float NearbyTilesBuffRadius = 1f;
|
||||
|
||||
public static readonly TimeSpan CultTileBuffTime = TimeSpan.FromSeconds(5);
|
||||
public static readonly TimeSpan CultTileBuffTime = TimeSpan.FromSeconds(1);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Content.Server._White.Cult.Structures;
|
||||
namespace Content.Shared._White.Cult.Structures;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed partial class RunicDoorComponent : Component
|
||||
@@ -1,13 +1,13 @@
|
||||
using Content.Server.Cuffs;
|
||||
using Content.Server.Doors.Systems;
|
||||
using Content.Shared._White.Chaplain;
|
||||
using Content.Shared._White.Chaplain;
|
||||
using Content.Shared.Doors;
|
||||
using Content.Shared.Humanoid;
|
||||
using Content.Shared.Stunnable;
|
||||
using Content.Shared._White.Cult.Components;
|
||||
using Content.Shared._White.Cult.Systems;
|
||||
using Content.Shared.Cuffs;
|
||||
using Content.Shared.Cuffs.Components;
|
||||
using Content.Shared.Doors.Components;
|
||||
using Content.Shared.Doors.Systems;
|
||||
using Content.Shared.Mobs.Systems;
|
||||
using Content.Shared.Prying.Components;
|
||||
using Content.Shared.Weapons.Melee.Components;
|
||||
@@ -18,17 +18,18 @@ using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Physics.Systems;
|
||||
using CultistComponent = Content.Shared._White.Cult.Components.CultistComponent;
|
||||
|
||||
namespace Content.Server._White.Cult.Structures;
|
||||
namespace Content.Shared._White.Cult.Structures;
|
||||
|
||||
public sealed class RunicDoorSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly DoorSystem _doorSystem = default!;
|
||||
[Dependency] private readonly SharedDoorSystem _doorSystem = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
||||
[Dependency] private readonly SharedPhysicsSystem _physics = default!;
|
||||
[Dependency] private readonly SharedStunSystem _stunSystem = default!;
|
||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||
[Dependency] private readonly OccluderSystem _occluder = default!;
|
||||
[Dependency] private readonly MobStateSystem _mobState = default!;
|
||||
[Dependency] private readonly CuffableSystem _cuffable = default!;
|
||||
[Dependency] private readonly SharedCuffableSystem _cuffable = default!;
|
||||
[Dependency] private readonly HolyWeaponSystem _holyWeapon = default!;
|
||||
|
||||
public override void Initialize()
|
||||
@@ -125,7 +126,7 @@ public sealed class RunicDoorSystem : EntitySystem
|
||||
TryComp(airlock, out ConcealableComponent? concealable) && concealable.Concealed)
|
||||
return false;
|
||||
|
||||
var direction = Transform(user).MapPosition.Position - Transform(airlock).MapPosition.Position;
|
||||
var direction = _transform.GetMapCoordinates(user).Position - _transform.GetMapCoordinates(airlock).Position;
|
||||
var impulseVector = direction * 2000;
|
||||
|
||||
_physics.ApplyLinearImpulse(user, impulseVector);
|
||||
@@ -1,4 +1,4 @@
|
||||
soul-shard-name = Душа { $soul }
|
||||
soul-shard-name = Душа { $soul }
|
||||
soul-shard-description = В этом камне заключена душа { $soul }
|
||||
cult-too-much-empowers = Слишком много способностей
|
||||
|
||||
@@ -25,6 +25,7 @@ cult-ritual-prevented = Кто-то прервал ритуал.
|
||||
cult-narsie-summoned = НАР'СИ ВОССТАЛ!
|
||||
cult-revive-rune-already-alive = Он уже живой.
|
||||
cult-revive-rune-no-charges = У рун воскрешения кончились заряды.
|
||||
cult-revive-rune-too-damaged = Его ранения несовместимы с жизнью.
|
||||
cult-summon-rune-need-minimum-cultists = Необходимо минимум 2 культиста.
|
||||
cult-cultists-not-found = Культисты не обнаружены.
|
||||
cult-blood-boil-rune-need-minimum = Необходимо минимум 3 культиста.
|
||||
|
||||
@@ -45,7 +45,7 @@ ent-OfferingRune = руна предпонесения
|
||||
.desc = Мгновенно превращает обычного члена экипажа в культиста, для чего требуется 2 культиста вокруг руны. Члена экипажа с имплантом защиты разума нельзя перевоплотить, можно только принести в жертву, для чего нужно 3 культиста, которые встанут вокруг руны. Если цель мертва, то она будет принесена в жертву, для чего требуется 1 культист.
|
||||
|
||||
ent-BuffRune = руна усиления
|
||||
.desc = При активации усиливает вас, уменьшая затраты и ускоряя процесс подготовки заклинаний крови и черчения рун.
|
||||
.desc = При активации усиливает вас, уменьшая затраты и ускоряя процесс подготовки заклинаний крови и черчения рун. Усиление также даёт иммунитет к низкому давлению.
|
||||
|
||||
ent-EmpoweringRune = руна могущества
|
||||
.desc = Позволяет культистам приготовить до 5 заклинаний крови.
|
||||
|
||||
@@ -112,4 +112,4 @@ alerts-changeling-chemicals-name = Химикаты
|
||||
alerts-changeling-chemicals-desc = Наши химикаты.
|
||||
|
||||
alerts-cult-buff-name = Усиление
|
||||
alerts-cult-buff-desc = Подготовка заклинаний крови занимает гораздо меньше времени, и вы не теряете столько крови при этом.
|
||||
alerts-cult-buff-desc = Подготовка заклинаний крови занимает гораздо меньше времени, и вы не теряете столько крови при этом. Также вы неуязвимы к низкому давлению.
|
||||
|
||||
@@ -69,11 +69,6 @@
|
||||
graph: CultPylon
|
||||
node: pylon
|
||||
- type: Concealable
|
||||
- type: AtmosDevice
|
||||
- type: GasMiner
|
||||
maxExternalPressure: 100
|
||||
spawnAmount: 10
|
||||
spawnGas: Oxygen
|
||||
|
||||
- type: entity
|
||||
id: AltarTome
|
||||
|
||||
Reference in New Issue
Block a user