Skip to content

Commit

Permalink
clothingwhitelist tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
pheenty committed Nov 7, 2024
1 parent 0991ba8 commit 333babd
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 62 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -28,6 +29,8 @@ public override void Initialize()

private void OnEquipped(EntityUid uid, ClothingWhitelistComponent comp, GotEquippedEvent args)
{
if (!HasComp<DnaComponent>(args.Equipee)) return;

if (_whitelistSystem.IsBlacklistFailOrNull(comp.Blacklist, args.Equipee) && _whitelistSystem.IsWhitelistPass(comp.Whitelist, args.Equipee)) return;

if (TryComp<NpcFactionMemberComponent>(args.Equipee, out var npc))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
64 changes: 8 additions & 56 deletions Resources/Prototypes/Entities/Clothing/OuterClothing/hardsuits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -914,8 +868,6 @@
tags:
- Hardsuit
- WhitelistChameleon
- type: ClothingWhitelist # Stories-ExplodingHardsuit
factionsWhitelist: null

#ERT Janitor Hardsuit
- type: entity
Expand Down
22 changes: 22 additions & 0 deletions Resources/Prototypes/Stories/Entities/Clothing/base_clothing.yml
Original file line number Diff line number Diff line change
@@ -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 # Нельзя емагнуть скафандр без биокода, если он уже емагнут.

0 comments on commit 333babd

Please sign in to comment.