diff --git a/Content.Server/_White/Wizard/Magic/WizardSpellsSystem.cs b/Content.Server/_White/Wizard/Magic/WizardSpellsSystem.cs index 89c0ff1f2e..c696b82902 100644 --- a/Content.Server/_White/Wizard/Magic/WizardSpellsSystem.cs +++ b/Content.Server/_White/Wizard/Magic/WizardSpellsSystem.cs @@ -939,6 +939,10 @@ public sealed class WizardSpellsSystem : EntitySystem if (hasReqs) return; + if (_inventory.TryGetSlotEntity(args.Performer, "outerClothing", out var entity) && + comp.ClothingWhitelist?.IsValid(entity.Value) is true) + return; + args.Cancelled = true; _popupSystem.PopupEntity(Loc.GetString("magic-component-missing-req"), args.Performer, args.Performer); } diff --git a/Content.Shared/_White/Wizard/Magic/MagicComponent.cs b/Content.Shared/_White/Wizard/Magic/MagicComponent.cs index a43001ca53..7517d10ead 100644 --- a/Content.Shared/_White/Wizard/Magic/MagicComponent.cs +++ b/Content.Shared/_White/Wizard/Magic/MagicComponent.cs @@ -1,4 +1,5 @@ -using Robust.Shared.GameStates; +using Content.Shared.Whitelist; +using Robust.Shared.GameStates; namespace Content.Shared._White.Wizard.Magic; @@ -10,4 +11,7 @@ public sealed partial class MagicComponent : Component /// [DataField, ViewVariables(VVAccess.ReadWrite)] public bool RequiresClothes; + + [DataField] + public EntityWhitelist? ClothingWhitelist; } diff --git a/Resources/Locale/ru-RU/_white/wizard/spells.ftl b/Resources/Locale/ru-RU/_white/wizard/spells.ftl index 1f75497f0f..bba48bccdc 100644 --- a/Resources/Locale/ru-RU/_white/wizard/spells.ftl +++ b/Resources/Locale/ru-RU/_white/wizard/spells.ftl @@ -5,7 +5,7 @@ ent-ActionForceSpell = Сила .desc = Притягивает все объекты и сущности в указанную точку. Альтернативный каст: Прицельно притягивает к вам предмет или сущность. При зарядке: Вместо притяжение в выбранную точку, отталкивает все объекты от заклинателя. С каждым уровнем повышается мощность отталкивания. ent-ActionFireballSpell = Огненный шар - .desc = Создает огненный шар, наносящий огромный урон при взрыве. Альтернативный каст: Поджигает одну цель на любом расстоянии, навешивая проклятие, при котором смерть от огня уничтожит тело. При зарядке: Поджигает все сущности вокруг, с каждым уровнем повышается сила поджога и радиус поражения. + .desc = Создает огненный шар, наносящий огромный урон при взрыве. Альтернативный каст: Поджигает одну цель на любом расстоянии, навешивая проклятие, при котором смерть от огня уничтожит тело. При зарядке: Поджигает все сущности вокруг, с каждым уровнем повышается сила поджога и радиус поражения. Не работает без волшебной мантии и шляпы. ent-ActionCardSpell = Карты .desc = Настоящий козырь в рукаве! Вернее, целая колода таких. Выпускает несколько смертельных карт в одном направлении. Карты способны оглушить цель. Альтернативный каст: Превращает в карту любой предмет. В карту можно превратить только предметы. При зарядке: Выпускает карты вокруг вас, с каждым уровнем зарядки количество выпускаемых карт повышается. diff --git a/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/clothing/outerclothing/armor.ftl b/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/clothing/outerclothing/armor.ftl index b44670be46..48a4e9917b 100644 --- a/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/clothing/outerclothing/armor.ftl +++ b/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/clothing/outerclothing/armor.ftl @@ -17,10 +17,10 @@ ent-ClothingOuterArmorHeavyRed = красный тяжелый бронекос .desc = Тяжело бронированный костюм с красными вставками, способный защитить от высокого урона. .suffix = { "" } ent-ClothingOuterArmorMagusblue = синие доспехи магуса - .desc = Синий бронекостюм, обеспечивающий хорошую защиту. Не обладает свойствами волшебной мантии. + .desc = Синий бронекостюм, обеспечивающий хорошую защиту. Не обладает свойствами волшебной мантии, но позволяет кастовать заклинание электрической дуги. .suffix = { "" } ent-ClothingOuterArmorMagusred = красные доспехи магуса - .desc = Красный бронекостюм, обеспечивающий хорошую защиту. Не обладает свойствами волшебной мантии. + .desc = Красный бронекостюм, обеспечивающий хорошую защиту. Не обладает свойствами волшебной мантии, но позволяет кастовать заклинание огненного шара. .suffix = { "" } ent-ClothingOuterArmorRiot = противоударный костюм .desc = Бронежилет с тяжелыми накладками для защиты в ближнем бою, идеально подходит для борьбы с правонарушителями на станции. diff --git a/Resources/Prototypes/Entities/Clothing/OuterClothing/armor.yml b/Resources/Prototypes/Entities/Clothing/OuterClothing/armor.yml index bdf7e9fbd2..5eca9c6b41 100644 --- a/Resources/Prototypes/Entities/Clothing/OuterClothing/armor.yml +++ b/Resources/Prototypes/Entities/Clothing/OuterClothing/armor.yml @@ -222,6 +222,10 @@ - type: ClothingSpeedModifier walkModifier: 1 sprintModifier: 1 + - type: Tag + tags: + - WhitelistChameleon + - BlueMagusArmor - type: entity parent: ClothingOuterArmorMagusblue @@ -233,8 +237,10 @@ sprite: Clothing/OuterClothing/Armor/magusred.rsi - type: Clothing sprite: Clothing/OuterClothing/Armor/magusred.rsi - - + - type: Tag + tags: + - WhitelistChameleon + - RedMagusArmor - type: entity parent: ClothingOuterBase diff --git a/Resources/Prototypes/Magic/white.yml b/Resources/Prototypes/Magic/white.yml index a2cae1c89c..59f4b17ebb 100644 --- a/Resources/Prototypes/Magic/white.yml +++ b/Resources/Prototypes/Magic/white.yml @@ -5,6 +5,9 @@ components: - type: Magic requiresClothes: true + clothingWhitelist: + tags: + - BlueMagusArmor - type: WorldTargetAction itemIconStyle: BigAction useDelay: 60 @@ -72,7 +75,10 @@ noSpawn: true components: - type: Magic - requiresClothes: false + requiresClothes: true + clothingWhitelist: + tags: + - RedMagusArmor - type: WorldTargetAction itemIconStyle: BigAction useDelay: 60 diff --git a/Resources/Prototypes/_White/tags.yml b/Resources/Prototypes/_White/tags.yml index cec579ce37..2cb343cffe 100644 --- a/Resources/Prototypes/_White/tags.yml +++ b/Resources/Prototypes/_White/tags.yml @@ -93,3 +93,9 @@ - type: Tag id: UnoCard + +- type: Tag + id: RedMagusArmor + +- type: Tag + id: BlueMagusArmor