diff --git a/Content.Server/Stories/ClothingWhitelist/ClothingWhitelistSystem.cs b/Content.Server/Stories/ClothingWhitelist/ClothingWhitelistSystem.cs index 23ed4462da..3d9480cd3c 100644 --- a/Content.Server/Stories/ClothingWhitelist/ClothingWhitelistSystem.cs +++ b/Content.Server/Stories/ClothingWhitelist/ClothingWhitelistSystem.cs @@ -1,12 +1,13 @@ -using Content.Shared.Popups; -using Content.Shared.Inventory.Events; -using Content.Shared.Explosion.Components; +using Content.Server.Explosion.EntitySystems; +using Content.Server.Forensics; using Content.Shared.Emag.Systems; -using Content.Shared.NPC.Prototypes; +using Content.Shared.Explosion.Components; +using Content.Shared.Inventory.Events; using Content.Shared.NPC.Components; +using Content.Shared.NPC.Prototypes; using Content.Shared.NPC.Systems; +using Content.Shared.Popups; using Content.Shared.Whitelist; -using Content.Server.Explosion.EntitySystems; using System.Linq; namespace Content.Server.Stories.ClothingWhitelist; @@ -28,6 +29,8 @@ public override void Initialize() private void OnEquipped(EntityUid uid, ClothingWhitelistComponent comp, GotEquippedEvent args) { + if (!HasComp(args.Equipee)) return; + if (_whitelistSystem.IsBlacklistFailOrNull(comp.Blacklist, args.Equipee) && _whitelistSystem.IsWhitelistPass(comp.Whitelist, args.Equipee)) return; if (TryComp(args.Equipee, out var npc)) diff --git a/Resources/Prototypes/Entities/Clothing/OuterClothing/armor.yml b/Resources/Prototypes/Entities/Clothing/OuterClothing/armor.yml index 2412dd9d5c..86f8aeb386 100644 --- a/Resources/Prototypes/Entities/Clothing/OuterClothing/armor.yml +++ b/Resources/Prototypes/Entities/Clothing/OuterClothing/armor.yml @@ -100,7 +100,7 @@ - Energy - type: entity - parent: [ClothingOuterBaseLarge, AllowSuitStorageClothing, BaseSyndicateContraband ] + parent: [ ClothingOuterBaseLarge, AllowSuitStorageClothing, BaseSyndicateContraband, BaseSyndicateExplodingClothing ] # [ClothingOuterBaseLarge, AllowSuitStorageClothing, BaseSyndicateContraband ] # Stories id: ClothingOuterArmorRaid name: syndicate raid suit description: A somewhat flexible and well-armored suit with a powerful shoulder mounted flashlight manufactured in the Gorlex Marauder's iconic blood-red color scheme, it does not protect its wearer from space. diff --git a/Resources/Prototypes/Entities/Clothing/OuterClothing/hardsuits.yml b/Resources/Prototypes/Entities/Clothing/OuterClothing/hardsuits.yml index 650d5d3c01..f0fc552d0b 100644 --- a/Resources/Prototypes/Entities/Clothing/OuterClothing/hardsuits.yml +++ b/Resources/Prototypes/Entities/Clothing/OuterClothing/hardsuits.yml @@ -475,21 +475,11 @@ #ANTAG HARDSUITS #Blood-red Hardsuit - type: entity - parent: [ ClothingOuterHardsuitBase, BaseSyndicateContraband ] + parent: [ ClothingOuterHardsuitBase, BaseSyndicateContraband, BaseSyndicateExplodingClothing ] # [ ClothingOuterHardsuitBase, BaseSyndicateContraband ] # Stories id: ClothingOuterHardsuitSyndie name: blood-red hardsuit description: A heavily armored hardsuit designed for work in special operations. Property of Gorlex Marauders. components: - - type: ClothingWhitelist # Stories-ExplodingHardsuit (doublechest) - start - factionsWhitelist: - - Syndicate - - type: Explosive - explosionType: PowerSink - maxIntensity: 8 - intensitySlope: 5 - totalIntensity: 5 - canCreateVacuum: false - - type: ExplodeOnTrigger # Stories-ExplodingHardsuit (doublechest) - end - type: Sprite sprite: Clothing/OuterClothing/Hardsuits/syndicate.rsi - type: Item @@ -542,21 +532,11 @@ #Syndicate Elite Hardsuit - type: entity - parent: [ClothingOuterHardsuitBase, BaseSyndicateContraband] + parent: [ ClothingOuterHardsuitBase, BaseSyndicateContraband, BaseSyndicateExplodingClothing ] # [ ClothingOuterHardsuitBase, BaseSyndicateContraband ] # Stories id: ClothingOuterHardsuitSyndieElite name: syndicate elite hardsuit description: An elite version of the blood-red hardsuit, with improved mobility and fireproofing. Property of Gorlex Marauders. components: - - type: ClothingWhitelist # Stories-ExplodingHardsuit (doublechest) - start - factionsWhitelist: - - Syndicate - - type: Explosive - explosionType: PowerSink - maxIntensity: 8 - intensitySlope: 5 - totalIntensity: 5 - canCreateVacuum: false - - type: ExplodeOnTrigger # Stories-ExplodingHardsuit (doublechest) - end - type: Sprite sprite: Clothing/OuterClothing/Hardsuits/syndieelite.rsi - type: Clothing @@ -591,21 +571,11 @@ #Syndicate Commander Hardsuit - type: entity - parent: [ClothingOuterHardsuitBase, BaseSyndicateContraband] + parent: [ ClothingOuterHardsuitBase, BaseSyndicateContraband, BaseSyndicateExplodingClothing ] # [ ClothingOuterHardsuitBase, BaseSyndicateContraband ] # Stories id: ClothingOuterHardsuitSyndieCommander name: syndicate commander hardsuit description: A bulked up version of the blood-red hardsuit, purpose-built for the commander of a syndicate operative squad. Has significantly improved armor for those deadly front-lines firefights. components: - - type: ClothingWhitelist # Stories-ExplodingHardsuit (doublechest) - start - factionsWhitelist: - - Syndicate - - type: Explosive - explosionType: PowerSink - maxIntensity: 8 - intensitySlope: 5 - totalIntensity: 5 - canCreateVacuum: false - - type: ExplodeOnTrigger # Stories-ExplodingHardsuit (doublechest) - end - type: Sprite sprite: Clothing/OuterClothing/Hardsuits/syndiecommander.rsi - type: Clothing @@ -633,21 +603,11 @@ #Cybersun Juggernaut Hardsuit - type: entity - parent: [ClothingOuterHardsuitBase, BaseSyndicateContraband] + parent: [ ClothingOuterHardsuitBase, BaseSyndicateContraband, BaseSyndicateExplodingClothing ] # [ ClothingOuterHardsuitBase, BaseSyndicateContraband ] # Stories id: ClothingOuterHardsuitJuggernaut name: cybersun juggernaut suit description: A suit made by the cutting edge R&D department at cybersun to be hyper resilient. components: - - type: ClothingWhitelist # Stories-ExplodingHardsuit (doublechest) - start - factionsWhitelist: - - Syndicate - - type: Explosive - explosionType: PowerSink - maxIntensity: 8 - intensitySlope: 5 - totalIntensity: 5 - canCreateVacuum: false - - type: ExplodeOnTrigger # Stories-ExplodingHardsuit (doublechest) - end - type: Sprite sprite: Clothing/OuterClothing/Hardsuits/cybersun.rsi - type: Clothing @@ -803,7 +763,7 @@ #CENTCOMM / ERT HARDSUITS #ERT Leader Hardsuit - type: entity - parent: [ BaseCentcommContraband, ClothingOuterHardsuitSyndieCommander ] + parent: [ BaseERTNotExplodingClothing, BaseCentcommContraband, ClothingOuterHardsuitSyndieCommander ] # [ BaseCentcommContraband, ClothingOuterHardsuitSyndieCommander ] # Stories id: ClothingOuterHardsuitERTLeader name: ERT leader's hardsuit description: A protective hardsuit worn by the leader of an emergency response team. @@ -831,12 +791,10 @@ sprite: Clothing/OuterClothing/Hardsuits/ERTSuits/ertleader.rsi - type: ToggleableClothing clothingPrototype: ClothingHeadHelmetHardsuitERTLeader - - type: ClothingWhitelist # Stories-ExplodingHardsuit - factionsWhitelist: null #ERT Chaplain Hardsuit - type: entity - parent: [ BaseCentcommContraband, ClothingOuterHardsuitJuggernaut ] + parent: [ BaseERTNotExplodingClothing, BaseCentcommContraband, ClothingOuterHardsuitJuggernaut ] # [ BaseCentcommContraband, ClothingOuterHardsuitJuggernaut ] # Stories id: ClothingOuterHardsuitERTChaplain name: ERT chaplain's hardsuit description: A protective hardsuit worn by the chaplains of an Emergency Response Team. @@ -847,8 +805,6 @@ sprite: Clothing/OuterClothing/Hardsuits/ERTSuits/ertchaplain.rsi - type: ToggleableClothing clothingPrototype: ClothingHeadHelmetHardsuitERTChaplain - - type: ClothingWhitelist # Stories-ExplodingHardsuit - factionsWhitelist: null #ERT Engineer Hardsuit - type: entity @@ -866,7 +822,7 @@ #ERT Medic Hardsuit - type: entity - parent: [ BaseCentcommContraband, ClothingOuterHardsuitSyndieMedic ] + parent: [ BaseERTNotExplodingClothing, BaseCentcommContraband, ClothingOuterHardsuitSyndieMedic ] # [ BaseCentcommContraband, ClothingOuterHardsuitSyndieMedic ] # Stories id: ClothingOuterHardsuitERTMedical name: ERT medic's hardsuit description: A protective hardsuit worn by the medics of an emergency response team. @@ -877,12 +833,10 @@ sprite: Clothing/OuterClothing/Hardsuits/ERTSuits/ertmedical.rsi - type: ToggleableClothing clothingPrototype: ClothingHeadHelmetHardsuitERTMedical - - type: ClothingWhitelist # Stories-ExplodingHardsuit - factionsWhitelist: null #ERT Security Hardsuit - type: entity - parent: [ BaseCentcommContraband, ClothingOuterHardsuitSyndie ] + parent: [ BaseERTNotExplodingClothing, BaseCentcommContraband, ClothingOuterHardsuitSyndie ] # [ BaseCentcommContraband, ClothingOuterHardsuitSyndie ] # Stories id: ClothingOuterHardsuitERTSecurity name: ERT security's hardsuit description: A protective hardsuit worn by the security officers of an emergency response team. @@ -914,8 +868,6 @@ tags: - Hardsuit - WhitelistChameleon - - type: ClothingWhitelist # Stories-ExplodingHardsuit - factionsWhitelist: null #ERT Janitor Hardsuit - type: entity diff --git a/Resources/Prototypes/Stories/Entities/Clothing/base_clothing.yml b/Resources/Prototypes/Stories/Entities/Clothing/base_clothing.yml new file mode 100644 index 0000000000..3facad5348 --- /dev/null +++ b/Resources/Prototypes/Stories/Entities/Clothing/base_clothing.yml @@ -0,0 +1,22 @@ +- type: entity + abstract: true + id: BaseSyndicateExplodingClothing + components: + - type: ClothingWhitelist + factionsWhitelist: + - Syndicate + - type: Explosive + explosionType: PowerSink + maxIntensity: 8 + intensitySlope: 5 + totalIntensity: 5 + canCreateVacuum: false + - type: ExplodeOnTrigger + +- type: entity + abstract: true + id: BaseERTNotExplodingClothing + components: + - type: ClothingWhitelist + factionsWhitelist: null + - type: Emagged # Нельзя емагнуть скафандр без биокода, если он уже емагнут.