Невозможность использования снаряжения культистов
This commit is contained in:
@@ -3,7 +3,9 @@ using Content.Server.Popups;
|
||||
using Content.Server.Stunnable;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Content.Shared.IdentityManagement;
|
||||
using Content.Shared.Inventory;
|
||||
using Content.Shared.White.Cult;
|
||||
using Content.Shared.White.Cult.Components;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Timer = Robust.Shared.Timing.Timer;
|
||||
@@ -50,5 +52,18 @@ public sealed partial class DeconvertCultist : ReagentEffect
|
||||
cultist.HolyConvertToken = null;
|
||||
entityManager.RemoveComponent<CultistComponent>(uid);
|
||||
entityManager.RemoveComponent<PentagramComponent>(uid);
|
||||
|
||||
var inventory = entityManager.System<InventorySystem>();
|
||||
if (!inventory.TryGetContainerSlotEnumerator(uid, out var enumerator))
|
||||
return;
|
||||
|
||||
while (enumerator.MoveNext(out var container))
|
||||
{
|
||||
if (container.ContainedEntity != null &&
|
||||
entityManager.HasComponent<CultItemComponent>(container.ContainedEntity.Value))
|
||||
{
|
||||
container.Remove(container.ContainedEntity.Value, entityManager, force: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Content.Shared.White.Cult.Components;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed partial class CultItemComponent : Component
|
||||
{
|
||||
}
|
||||
29
Content.Shared/_White/Cult/Systems/CultItemSystem.cs
Normal file
29
Content.Shared/_White/Cult/Systems/CultItemSystem.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using Content.Shared.Ghost;
|
||||
using Content.Shared.Item;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.White.Cult.Components;
|
||||
|
||||
namespace Content.Shared.White.Cult.Systems;
|
||||
|
||||
public sealed class CultItemSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly SharedPopupSystem _popupSystem = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<CultItemComponent, GettingPickedUpAttemptEvent>(OnHandPickUp);
|
||||
}
|
||||
|
||||
private void OnHandPickUp(EntityUid uid, CultItemComponent component, GettingPickedUpAttemptEvent args)
|
||||
{
|
||||
if (HasComp<CultistComponent>(args.User) || HasComp<GhostComponent>(args.User))
|
||||
return;
|
||||
|
||||
args.Cancel();
|
||||
_transform.AttachToGridOrMap(uid);
|
||||
_popupSystem.PopupClient(Loc.GetString("cult-item-component-not-cultist", ("name", Name(uid))), uid, args.User);
|
||||
}
|
||||
}
|
||||
1
Resources/Locale/ru-RU/cult/cult-item.ftl
Normal file
1
Resources/Locale/ru-RU/cult/cult-item.ftl
Normal file
@@ -0,0 +1 @@
|
||||
cult-item-component-not-cultist = Вы не можете подобрать {$name}
|
||||
@@ -21,8 +21,8 @@
|
||||
BoxCandleSmall: 2
|
||||
Urn: 5
|
||||
emaggedInventory:
|
||||
ClothingOuterArmorCult: 1
|
||||
ClothingHeadHelmetCult: 1
|
||||
#ClothingOuterArmorCult: 1
|
||||
#ClothingHeadHelmetCult: 1
|
||||
ClothingOuterRobesCult: 3
|
||||
ClothingHeadHatHoodCulthood: 3
|
||||
ClothingShoesCult: 4
|
||||
|
||||
@@ -146,6 +146,7 @@
|
||||
Slash: 0.8
|
||||
Piercing: 0.9
|
||||
Heat: 0.9
|
||||
- type: CultItem
|
||||
|
||||
#SCAF Helmet
|
||||
- type: entity
|
||||
|
||||
@@ -128,6 +128,7 @@
|
||||
Piercing: 0.6
|
||||
Heat: 0.5
|
||||
- type: GroupExamine
|
||||
- type: CultItem
|
||||
|
||||
- type: entity
|
||||
parent: ClothingOuterBaseLarge
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
- type: Tool
|
||||
qualities:
|
||||
- Dagger
|
||||
- type: CultItem
|
||||
|
||||
- type: entity
|
||||
name: eldritch blade
|
||||
@@ -66,6 +67,7 @@
|
||||
slots:
|
||||
- back
|
||||
- type: DisarmMalus
|
||||
- type: CultItem
|
||||
|
||||
- type: entity
|
||||
name: unholy halberd
|
||||
@@ -104,3 +106,4 @@
|
||||
- back
|
||||
- type: UseDelay
|
||||
delay: 1
|
||||
- type: CultItem
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
id: nonPeacefulRoundEndMelee
|
||||
items:
|
||||
- FireAxeFlaming
|
||||
- FireAxe
|
||||
- CaptainSabre
|
||||
- Katana
|
||||
- Machete
|
||||
@@ -61,8 +62,6 @@
|
||||
- EnergySwordDouble
|
||||
- EnergyCutlass
|
||||
- Cutlass
|
||||
- UnholyHalberd
|
||||
- EldritchBlade
|
||||
- BaseBallBat
|
||||
- BloodSuckerDagger
|
||||
- Truncheon
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
- type: entity
|
||||
- type: entity
|
||||
id: CultPylon
|
||||
parent: BaseStructure
|
||||
name: pylon
|
||||
@@ -236,6 +236,7 @@
|
||||
products:
|
||||
- FactoryEldritchBlade
|
||||
- FactoryArmorCult
|
||||
- FactoryUnholyHalberd
|
||||
- FactoryCultRobeModify
|
||||
- FactoryCultMirrorShield
|
||||
- type: UserInterface
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
description: Some religious clothes.
|
||||
components:
|
||||
- type: CultRobeModifier
|
||||
- type: CultItem
|
||||
|
||||
- type: entity
|
||||
id: CultMirrorShield
|
||||
@@ -32,8 +33,16 @@
|
||||
reflects:
|
||||
- Energy
|
||||
- type: ReturnItemOnThrow
|
||||
- type: CultItem
|
||||
|
||||
|
||||
- type: cultistFactoryProduction
|
||||
id: FactoryUnholyHalberd
|
||||
name: Нечестивая секира
|
||||
icon: "/Textures/Objects/Weapons/Melee/cult_halberd.rsi/icon.png"
|
||||
item:
|
||||
- UnholyHalberd
|
||||
|
||||
- type: entity
|
||||
id: CultOuterArmor
|
||||
parent: ClothingOuterArmorCult
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
- type: PointLight
|
||||
color: red
|
||||
range: 2
|
||||
- type: CultItem
|
||||
|
||||
- type: entity
|
||||
parent: ClothingEyesBase
|
||||
@@ -35,6 +36,7 @@
|
||||
sprite: Clothing/Eyes/Misc/blindfold.rsi
|
||||
- type: FlashImmunity
|
||||
- type: EyeProtection
|
||||
- type: CultItem
|
||||
- type: ClothingGrantComponent
|
||||
component:
|
||||
- type: NightVision
|
||||
@@ -74,6 +76,7 @@
|
||||
color: red
|
||||
range: 2
|
||||
- type: VoidTeleport
|
||||
- type: CultItem
|
||||
|
||||
- type: entity
|
||||
name: void torch
|
||||
@@ -108,6 +111,7 @@
|
||||
interfaces:
|
||||
- key: enum.CultTeleporterUiKey.Key
|
||||
type: TorchWindowBUI
|
||||
- type: CultItem
|
||||
|
||||
- type: cultistFactoryProduction
|
||||
id: FactoryCultShuttleCurse
|
||||
@@ -166,6 +170,7 @@
|
||||
type: StructureCraftBoundUserInterface
|
||||
- type: Item
|
||||
size: Normal
|
||||
- type: CultItem
|
||||
|
||||
- type: entity
|
||||
parent: CultRunicMetal
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
- type: entity
|
||||
- type: entity
|
||||
id: BaseConstruct
|
||||
abstract: true
|
||||
noSpawn: true
|
||||
@@ -202,3 +202,4 @@
|
||||
- type: ContainerContainer
|
||||
containers:
|
||||
Shard: !type:ContainerSlot
|
||||
- type: CultItem
|
||||
|
||||
@@ -26,3 +26,4 @@
|
||||
sprite: White/Items/Misc/wetstone.rsi
|
||||
size: 1
|
||||
state: cult_sharpener
|
||||
- type: CultItem
|
||||
|
||||
Reference in New Issue
Block a user