diff --git a/Content.Server/Changeling/ChangelingSystem.Abilities.cs b/Content.Server/Changeling/ChangelingSystem.Abilities.cs index 6c02cf6684..0c7e36dcc8 100644 --- a/Content.Server/Changeling/ChangelingSystem.Abilities.cs +++ b/Content.Server/Changeling/ChangelingSystem.Abilities.cs @@ -1008,9 +1008,6 @@ public sealed partial class ChangelingSystem if (HasComp(from)) EnsureComp(to); - if (HasComp(from)) - EnsureComp(to); - if (HasComp(from)) EnsureComp(to); diff --git a/Content.Server/_White/Chaplain/NullRodSystem.cs b/Content.Server/_White/Chaplain/NullRodSystem.cs index a9fb99bc60..9a192fa0e1 100644 --- a/Content.Server/_White/Chaplain/NullRodSystem.cs +++ b/Content.Server/_White/Chaplain/NullRodSystem.cs @@ -8,7 +8,6 @@ namespace Content.Server._White.Chaplain; public sealed class NullRodSystem : EntitySystem { [Dependency] private readonly HandsSystem _hands = default!; - [Dependency] private readonly PopupSystem _popup = default!; public override void Initialize() { @@ -24,14 +23,7 @@ public sealed class NullRodSystem : EntitySystem if (args.SelectedWeapon == string.Empty || entity == null) return; - if (!HasComp(entity.Value) && !HasComp(entity.Value)) - { - _popup.PopupEntity($"Вам не хватает веры, чтобы использовать {Name(ent)}", entity.Value, entity.Value); - return; - } - var weapon = Spawn(args.SelectedWeapon, Transform(entity.Value).Coordinates); - EnsureComp(weapon); Del(ent); diff --git a/Content.Server/_White/Cult/GameRule/CultRuleSystem.cs b/Content.Server/_White/Cult/GameRule/CultRuleSystem.cs index 6065306ec7..32d1055534 100644 --- a/Content.Server/_White/Cult/GameRule/CultRuleSystem.cs +++ b/Content.Server/_White/Cult/GameRule/CultRuleSystem.cs @@ -1,6 +1,7 @@ using System.Linq; using Content.Server._Miracle.GulagSystem; using Content.Server.Actions; +using Content.Server.Bible.Components; using Content.Server.Chat.Managers; using Content.Server.GameTicking; using Content.Server.GameTicking.Rules; @@ -24,7 +25,6 @@ using Robust.Shared.Configuration; using Robust.Shared.Player; using Robust.Shared.Random; using Content.Shared._White; -using Content.Shared._White.Chaplain; using Content.Shared._White.Cult.Components; using Content.Shared._White.Cult.Systems; using Content.Shared.Mind; @@ -357,7 +357,7 @@ public sealed class CultRuleSystem : GameRuleSystem // Chaplain if (!_mindSystem.TryGetMind(player, out _, out var mind) || - mind.OwnedEntity is not { } ownedEntity || HasComp(ownedEntity)) + mind.OwnedEntity is not { } ownedEntity || HasComp(ownedEntity)) continue; // Latejoin diff --git a/Content.Server/_White/Cult/Items/Systems/ReturnItemOnThrowSystem.cs b/Content.Server/_White/Cult/Items/Systems/ReturnItemOnThrowSystem.cs index bd1988ab62..a7126f67d2 100644 --- a/Content.Server/_White/Cult/Items/Systems/ReturnItemOnThrowSystem.cs +++ b/Content.Server/_White/Cult/Items/Systems/ReturnItemOnThrowSystem.cs @@ -4,7 +4,6 @@ using Content.Server._White.Cult.Items.Components; using Content.Shared._White.Chaplain; using Content.Shared.Mobs.Components; using Content.Shared.Throwing; -using Content.Shared._White.Cult; using CultistComponent = Content.Shared._White.Cult.Components.CultistComponent; namespace Content.Server._White.Cult.Items.Systems; @@ -13,6 +12,7 @@ public sealed class ReturnItemOnThrowSystem : EntitySystem { [Dependency] private readonly StunSystem _stun = default!; [Dependency] private readonly HandsSystem _hands = default!; + [Dependency] private readonly HolyWeaponSystem _holyWeapon = default!; public override void Initialize() { @@ -31,7 +31,7 @@ public sealed class ReturnItemOnThrowSystem : EntitySystem if (!HasComp(args.Target)) return; - if (!_stun.IsParalyzed(args.Target) && !isCultist && !HasComp(args.Target)) + if (!_stun.IsParalyzed(args.Target) && !isCultist && !_holyWeapon.IsHoldingHolyWeapon(args.Target)) { _stun.TryParalyze(args.Target, TimeSpan.FromSeconds(component.StunTime), true); } diff --git a/Content.Server/_White/Cult/Runes/Systems/CultSystem.Actions.cs b/Content.Server/_White/Cult/Runes/Systems/CultSystem.Actions.cs index 6924c759d6..9192be3ae2 100644 --- a/Content.Server/_White/Cult/Runes/Systems/CultSystem.Actions.cs +++ b/Content.Server/_White/Cult/Runes/Systems/CultSystem.Actions.cs @@ -6,27 +6,25 @@ using Content.Server.Emp; using Content.Server.EUI; using Content.Server._White.Cult.UI; using Content.Shared._White.Chaplain; -using Content.Shared._White.Cult; using Content.Shared.Chemistry.Components; using Content.Shared.Damage; using Content.Shared.Damage.Prototypes; using Content.Shared.FixedPoint; using Content.Shared.Fluids.Components; using Content.Shared.Inventory; -using Content.Shared.Mobs; -using Content.Shared.Mobs.Components; using Content.Shared.Stacks; using Content.Shared.StatusEffect; using Content.Shared.Stunnable; using Content.Shared._White.Cult.Actions; using Content.Shared._White.Cult.Components; using Content.Shared._White.Cult.Systems; -using Content.Shared._White.Cult.UI; +using Content.Shared.ActionBlocker; using Content.Shared.Actions; using Content.Shared.Cuffs.Components; using Content.Shared.DoAfter; using Content.Shared.Maps; using Content.Shared.Mindshield.Components; +using Content.Shared.Popups; using Robust.Server.GameObjects; using Robust.Shared.Audio; using Robust.Shared.Map.Components; @@ -49,6 +47,8 @@ public partial class CultSystem [Dependency] private readonly TileSystem _tile = default!; [Dependency] private readonly BloodSpearSystem _bloodSpear = default!; [Dependency] private readonly PhysicsSystem _physics = default!; + [Dependency] private readonly HolyWeaponSystem _holyWeapon = default!; + [Dependency] private readonly ActionBlockerSystem _actionBlocker = default!; private const string TileId = "CultFloor"; private const string ConcealedTileId = "CultFloorConcealed"; @@ -95,15 +95,17 @@ public partial class CultSystem !TryComp(args.Target, out var status)) return; - if (HasComp(args.Target)) + if (_holyWeapon.IsHoldingHolyWeapon(args.Target)) { - _popupSystem.PopupEntity("Священная сила препятствует магии.", args.Performer, args.Performer); + _popupSystem.PopupEntity("Сила священного оружия препятствует магии.", args.Performer, args.Performer, + PopupType.MediumCaution); return; } if (HasComp(args.Target)) { - _popupSystem.PopupEntity("Он имплантирован чипом защиты разума.", args.Performer, args.Performer); + _popupSystem.PopupEntity("Он имплантирован чипом защиты разума.", args.Performer, args.Performer, + PopupType.MediumCaution); return; } @@ -122,19 +124,18 @@ public partial class CultSystem !TryComp(uid, out var actor)) return; - if (HasComp(args.Target)) + if (_holyWeapon.IsHoldingHolyWeapon(args.Target)) { - _popupSystem.PopupEntity("Священная сила препятствует магии.", args.Performer, args.Performer); + _popupSystem.PopupEntity("Сила священного оружия препятствует магии.", args.Performer, args.Performer, + PopupType.MediumCaution); return; } if (!HasComp(args.Target) && !HasComp(args.Target) && - (!TryComp(args.Target, out var mobStateComponent) || - mobStateComponent.CurrentState is MobState.Alive) && - (!TryComp(args.Target, out var cuffable) || cuffable.Container.Count == 0)) + _actionBlocker.CanInteract(args.Target, null)) { - _popupSystem.PopupEntity("Цель должна быть культистом, быть связанной или лежать.", args.Performer, - args.Performer); + _popupSystem.PopupEntity("Цель должна быть культистом, быть скованной или парализованной.", args.Performer, + args.Performer, PopupType.MediumCaution); return; } @@ -422,7 +423,7 @@ public partial class CultSystem _bloodstreamSystem.TryModifyBloodLevel(uid, -5, bloodstream, createPuddle: false); - if (!HasComp(args.Target) && + if (!_holyWeapon.IsHoldingHolyWeapon(args.Target) && _statusEffectsSystem.TryAddStatusEffect(args.Target, "Muted", TimeSpan.FromSeconds(10), true, "Muted")) { _popupSystem.PopupEntity("Цель обезмолвлена.", args.Performer, args.Performer); diff --git a/Content.Server/_White/Cult/Runes/Systems/CultSystem.Rune.cs b/Content.Server/_White/Cult/Runes/Systems/CultSystem.Rune.cs index 1a0d177f5c..91b3693d1b 100644 --- a/Content.Server/_White/Cult/Runes/Systems/CultSystem.Rune.cs +++ b/Content.Server/_White/Cult/Runes/Systems/CultSystem.Rune.cs @@ -17,7 +17,6 @@ using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.Fluids.Components; using Content.Server.Ghost; using Content.Server.Revenant.Components; -using Content.Shared._White.Chaplain; using Content.Shared.Chemistry.Components.SolutionManager; using Content.Shared.Cuffs.Components; using Content.Shared.Damage; @@ -446,7 +445,7 @@ public sealed partial class CultSystem : EntitySystem mind.Mind != null && !IsTarget(mind.Mind.Value); // Выполнение действия в зависимости от условий - if (canBeConverted && !HasComp(victim.Value) && + if (canBeConverted && !HasComp(victim.Value) && !HasComp(victim.Value)) { result = Convert(uid, victim.Value, args.User, args.Cultists); diff --git a/Content.Server/_White/Cult/Structures/RunicDoorSystem.cs b/Content.Server/_White/Cult/Structures/RunicDoorSystem.cs index b92c799152..fbb2f805d9 100644 --- a/Content.Server/_White/Cult/Structures/RunicDoorSystem.cs +++ b/Content.Server/_White/Cult/Structures/RunicDoorSystem.cs @@ -28,6 +28,7 @@ public sealed class RunicDoorSystem : EntitySystem [Dependency] private readonly OccluderSystem _occluder = default!; [Dependency] private readonly MobStateSystem _mobState = default!; [Dependency] private readonly CuffableSystem _cuffable = default!; + [Dependency] private readonly HolyWeaponSystem _holyWeapon = default!; public override void Initialize() { @@ -35,7 +36,7 @@ public sealed class RunicDoorSystem : EntitySystem SubscribeLocalEvent(OnBeforeDoorOpened); SubscribeLocalEvent(OnBeforeDoorClosed); - SubscribeLocalEvent(OnGetAttacked); + // SubscribeLocalEvent(OnGetAttacked); SubscribeLocalEvent(OnConceal); } @@ -113,7 +114,7 @@ public sealed class RunicDoorSystem : EntitySystem _doorSystem.Deny(airlock); - if (!HasComp(user) || HasComp(user) || + if (!HasComp(user) || _holyWeapon.IsHoldingHolyWeapon(user) || TryComp(airlock, out ConcealableComponent? concealable) && concealable.Concealed) return false; diff --git a/Content.Shared/_White/Chaplain/HolyComponent.cs b/Content.Shared/_White/Chaplain/HolyComponent.cs deleted file mode 100644 index 9870e5d529..0000000000 --- a/Content.Shared/_White/Chaplain/HolyComponent.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Robust.Shared.GameStates; - -namespace Content.Shared._White.Chaplain; - -[RegisterComponent, NetworkedComponent] -public sealed partial class HolyComponent : Component -{ -} diff --git a/Content.Shared/_White/Chaplain/HolyWeaponComponent.cs b/Content.Shared/_White/Chaplain/HolyWeaponComponent.cs index 77bbe8bc4d..7027c00587 100644 --- a/Content.Shared/_White/Chaplain/HolyWeaponComponent.cs +++ b/Content.Shared/_White/Chaplain/HolyWeaponComponent.cs @@ -1,8 +1,6 @@ -using Robust.Shared.GameStates; - namespace Content.Shared._White.Chaplain; -[RegisterComponent, NetworkedComponent] +[RegisterComponent] public sealed partial class HolyWeaponComponent : Component { } diff --git a/Content.Shared/_White/Chaplain/HolyWeaponSystem.cs b/Content.Shared/_White/Chaplain/HolyWeaponSystem.cs index 3418882f4f..4617d9037a 100644 --- a/Content.Shared/_White/Chaplain/HolyWeaponSystem.cs +++ b/Content.Shared/_White/Chaplain/HolyWeaponSystem.cs @@ -1,30 +1,27 @@ +using System.Linq; using Content.Shared.Examine; -using Content.Shared.Ghost; -using Content.Shared.Weapons.Melee.Events; +using Content.Shared.Hands.EntitySystems; namespace Content.Shared._White.Chaplain; public sealed class HolyWeaponSystem : EntitySystem { + [Dependency] private readonly SharedHandsSystem _hands = default!; + public override void Initialize() { base.Initialize(); SubscribeLocalEvent(OnExamined); - SubscribeLocalEvent(OnMeleeAttempt); - } - - private void OnMeleeAttempt(Entity ent, ref AttemptMeleeEvent args) - { - if (HasComp(args.User) || HasComp(args.User)) - return; - - args.Cancelled = true; - args.Message = $"Вам не хватает веры, чтобы использовать {Name(ent)}"; } private void OnExamined(Entity ent, ref ExaminedEvent args) { args.PushMarkup("[color=lightblue]Данное оружие наделено священной силой.[/color]"); } + + public bool IsHoldingHolyWeapon(EntityUid uid) + { + return _hands.EnumerateHeld(uid).Any(HasComp); + } } diff --git a/Resources/Locale/ru-RU/cult/abilities.ftl b/Resources/Locale/ru-RU/cult/abilities.ftl index 59c399c6e6..249c74bb0e 100644 --- a/Resources/Locale/ru-RU/cult/abilities.ftl +++ b/Resources/Locale/ru-RU/cult/abilities.ftl @@ -16,7 +16,7 @@ ent-ActionCultTwistedConstruction = Искажённое Воздействие .desc = Зловещее заклинание, которое используют для превращения металла в рунический металл. ent-ActionCultTeleport = Телепорт - .desc = Полезное заклинание, которое телепортирует культистов в выбранное место. + .desc = Полезное заклинание, которое телепортирует цель на выбранную руну телепотрации. Цель должна являются культистом или быть парализованной. ent-ActionCultSummonCombatEquipment = Призыв Боевого Снаряжения .desc = Важное заклинание, которое позволяет вам вызвать полный набор боевого снаряжения. @@ -28,7 +28,7 @@ ent-InstantActionBloodRites = Кровавые Обряды .desc = Высасывает кровь и исцеляет вас. ent-ActionCultStun = Оглушение - .desc = Сильное заклинание, которое оглушает и обезмолвливает жертв. Не работает на священника и на экипаж с чипом защиты разума. + .desc = Сильное заклинание, которое оглушает и обезмолвливает жертв. Не работает на цели со священным оружием в руках или с чипом защиты разума. ent-ActionCultShadowShackles = Теневые Узы .desc = Бесшумное заклинание, которое наложит на человека теневые наручники и заставит вашу жертву замолчать на 10 секунд. diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/sword.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/sword.yml index f19fa9d4f6..6d71bf9a00 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/sword.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/sword.yml @@ -52,6 +52,12 @@ - type: Item size: Huge sprite: Objects/Weapons/Melee/katana.rsi + - type: Clothing + sprite: Objects/Weapons/Melee/katana.rsi + slots: + - Back + - Belt + - SuitStorage - type: DisarmMalus - type: entity @@ -83,6 +89,7 @@ slots: - Back - Belt + - SuitStorage - type: Reflect - type: entity @@ -108,6 +115,11 @@ - type: Item size: Large sprite: Objects/Weapons/Melee/machete.rsi + - type: Clothing + sprite: Objects/Weapons/Melee/machete.rsi + slots: + - Belt + - SuitStorage - type: DisarmMalus - type: Construction deconstructionTarget: null @@ -138,6 +150,8 @@ sprite: Objects/Weapons/Melee/claymore.rsi slots: - back + - belt + - suitStorage - type: DisarmMalus - type: Construction deconstructionTarget: null diff --git a/Resources/Prototypes/Roles/Jobs/Civilian/chaplain.yml b/Resources/Prototypes/Roles/Jobs/Civilian/chaplain.yml index 8e80466ae0..4ba8a27e0f 100644 --- a/Resources/Prototypes/Roles/Jobs/Civilian/chaplain.yml +++ b/Resources/Prototypes/Roles/Jobs/Civilian/chaplain.yml @@ -16,7 +16,6 @@ - !type:AddComponentSpecial components: - type: BibleUser #Lets them heal with bibles - - type: Holy - type: startingGear id: ChaplainGear diff --git a/Resources/Prototypes/_White/Entities/Objects/Weapons/chaplain_weapons.yml b/Resources/Prototypes/_White/Entities/Objects/Weapons/chaplain_weapons.yml index b2c7310c8d..acd7c8ea2e 100644 --- a/Resources/Prototypes/_White/Entities/Objects/Weapons/chaplain_weapons.yml +++ b/Resources/Prototypes/_White/Entities/Objects/Weapons/chaplain_weapons.yml @@ -71,6 +71,7 @@ sprite: White/Objects/Weapons/Chaplain/godhand.rsi - type: Unremoveable deleteOnDrop: true + - type: HolyWeapon - type: entity name: священный клеймор @@ -89,8 +90,10 @@ slots: - back - belt + - suitStorage - type: Item sprite: White/Objects/Weapons/Chaplain/claymore.rsi + - type: HolyWeapon - type: entity name: цепной меч @@ -111,6 +114,7 @@ qualities: - Sawing speed: 0.5 + - type: HolyWeapon - type: entity name: силовой меч @@ -128,6 +132,7 @@ color: lightblue - type: Item sprite: White/Objects/Weapons/Chaplain/forceweapon.rsi + - type: HolyWeapon - type: entity name: лезвие ханзо @@ -142,8 +147,10 @@ slots: - back - belt + - suitStorage - type: Item sprite: White/Objects/Weapons/Chaplain/katana.rsi + - type: HolyWeapon - type: entity name: внепространственный клинок @@ -161,9 +168,11 @@ sprite: White/Objects/Weapons/Chaplain/multiverse.rsi slots: - back + - suitStorage - type: Item sprite: White/Objects/Weapons/Chaplain/multiverse.rsi - type: RandomDamage + - type: HolyWeapon - type: entity name: коса жнеца @@ -182,8 +191,10 @@ sprite: White/Objects/Weapons/Chaplain/scythe.rsi slots: - back + - suitStorage - type: Item sprite: White/Objects/Weapons/Chaplain/scythe-inhands.rsi + - type: HolyWeapon - type: entity name: высокочастотный клинок @@ -201,10 +212,12 @@ sprite: White/Objects/Weapons/Chaplain/hfrequency.rsi slots: - back + - suitStorage - type: Reflect reflectProb: 0.33 - type: Item sprite: White/Objects/Weapons/Chaplain/hfrequency.rsi + - type: HolyWeapon - type: entity name: клинок заклинаний @@ -223,11 +236,13 @@ sprite: White/Objects/Weapons/Chaplain/spellblade.rsi slots: - back + - suitStorage - type: Crit critChance: 20 critMultiplier: 2.5 - type: Item sprite: White/Objects/Weapons/Chaplain/spellblade.rsi + - type: HolyWeapon - type: entity name: одержимый клинок @@ -243,6 +258,7 @@ sprite: White/Objects/Weapons/Chaplain/possessed.rsi slots: - back + - suitStorage - type: GhostRole allowSpeech: true name: Одержимый Клинок @@ -252,6 +268,7 @@ - type: Examiner - type: Item sprite: White/Objects/Weapons/Chaplain/possessed.rsi + - type: HolyWeapon - type: entity name: рука-бензопила @@ -284,6 +301,7 @@ qualities: - Sawing speed: 0.5 + - type: HolyWeapon - type: entity name: священная плеть @@ -309,6 +327,7 @@ slots: - belt - type: DisarmMalus + - type: HolyWeapon - type: entity name: посох монаха @@ -331,6 +350,7 @@ sprite: White/Objects/Weapons/Chaplain/staff.rsi slots: - back + - suitStorage - type: Wieldable - type: IncreaseDamageOnWield damage: @@ -339,6 +359,7 @@ - type: UseDelay - type: DisarmMalus - type: MeleeBlock + - type: HolyWeapon - type: entity name: нечестивые вилы @@ -389,6 +410,7 @@ sprite: White/Objects/Weapons/Chaplain/pitchfork.rsi slots: - back + - suitStorage - type: Wieldable - type: IncreaseDamageOnWield damage: @@ -396,6 +418,7 @@ Piercing: 9 - type: UseDelay - type: DisarmMalus + - type: HolyWeapon - type: entity name: реликтовый боевой молот @@ -424,7 +447,10 @@ sprite: White/Objects/Weapons/Chaplain/hammer.rsi slots: - belt + - back + - suitStorage - type: DisarmMalus + - type: HolyWeapon - type: entity name: гиперинструмент @@ -451,3 +477,4 @@ slots: - belt - type: DisarmMalus + - type: HolyWeapon diff --git a/Resources/Textures/Objects/Weapons/Melee/claymore.rsi/equipped-BELT.png b/Resources/Textures/Objects/Weapons/Melee/claymore.rsi/equipped-BELT.png new file mode 100644 index 0000000000..8356123719 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/claymore.rsi/equipped-BELT.png differ diff --git a/Resources/Textures/Objects/Weapons/Melee/claymore.rsi/meta.json b/Resources/Textures/Objects/Weapons/Melee/claymore.rsi/meta.json index a499314735..0e33c71c98 100644 --- a/Resources/Textures/Objects/Weapons/Melee/claymore.rsi/meta.json +++ b/Resources/Textures/Objects/Weapons/Melee/claymore.rsi/meta.json @@ -18,6 +18,10 @@ "name": "inhand-right", "directions": 4 }, + { + "name": "equipped-BELT", + "directions": 4 + }, { "name": "equipped-BACKPACK", "directions": 4 diff --git a/Resources/Textures/Objects/Weapons/Melee/katana.rsi/equipped-BACKPACK.png b/Resources/Textures/Objects/Weapons/Melee/katana.rsi/equipped-BACKPACK.png new file mode 100644 index 0000000000..afe15976c9 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/katana.rsi/equipped-BACKPACK.png differ diff --git a/Resources/Textures/Objects/Weapons/Melee/katana.rsi/equipped-BELT.png b/Resources/Textures/Objects/Weapons/Melee/katana.rsi/equipped-BELT.png new file mode 100644 index 0000000000..bc51b5a6cc Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Melee/katana.rsi/equipped-BELT.png differ diff --git a/Resources/Textures/Objects/Weapons/Melee/katana.rsi/meta.json b/Resources/Textures/Objects/Weapons/Melee/katana.rsi/meta.json index b2c66cff5b..e05ff48d0e 100644 --- a/Resources/Textures/Objects/Weapons/Melee/katana.rsi/meta.json +++ b/Resources/Textures/Objects/Weapons/Melee/katana.rsi/meta.json @@ -10,6 +10,14 @@ { "name": "icon" }, + { + "name": "equipped-BELT", + "directions": 4 + }, + { + "name": "equipped-BACKPACK", + "directions": 4 + }, { "name": "inhand-left", "directions": 4