diff --git a/Content.Client/ADT/CollectiveMind/CollectiveMindSystem.cs b/Content.Client/ADT/CollectiveMind/CollectiveMindSystem.cs index 5949eac6cc2..f1c3575f63b 100644 --- a/Content.Client/ADT/CollectiveMind/CollectiveMindSystem.cs +++ b/Content.Client/ADT/CollectiveMind/CollectiveMindSystem.cs @@ -1,31 +1,31 @@ -using Content.Client.Chat.Managers; -using Content.Shared.Sirena.CollectiveMind; -using Robust.Client.Player; +// using Content.Client.Chat.Managers; +// using Content.Shared.Sirena.CollectiveMind; +// using Robust.Client.Player; -namespace Content.Client.Sirena.CollectiveMind; +// namespace Content.Client.Sirena.CollectiveMind; -public sealed class CollectiveMindSystem : EntitySystem -{ - [Dependency] private readonly IChatManager _chatManager = default!; - [Dependency] private readonly IPlayerManager _playerManager = default!; +// public sealed class CollectiveMindSystem : EntitySystem +// { +// [Dependency] private readonly IChatManager _chatManager = default!; +// [Dependency] private readonly IPlayerManager _playerManager = default!; - public override void Initialize() - { - base.Initialize(); - SubscribeLocalEvent(OnInit); - SubscribeLocalEvent(OnRemove); - } +// public override void Initialize() +// { +// base.Initialize(); +// SubscribeLocalEvent(OnInit); +// SubscribeLocalEvent(OnRemove); +// } - public CollectiveMindComponent? Player => CompOrNull(_playerManager.LocalPlayer?.ControlledEntity); - public bool IsCollectiveMind => Player != null; +// public CollectiveMindComponent? Player => CompOrNull(_playerManager.LocalPlayer?.ControlledEntity); +// public bool IsCollectiveMind => Player != null; - private void OnInit(EntityUid uid, CollectiveMindComponent component, ComponentInit args) - { - _chatManager.UpdatePermissions(); - } +// private void OnInit(EntityUid uid, CollectiveMindComponent component, ComponentInit args) +// { +// _chatManager.UpdatePermissions(); +// } - private void OnRemove(EntityUid uid, CollectiveMindComponent component, ComponentRemove args) - { - _chatManager.UpdatePermissions(); - } -} +// private void OnRemove(EntityUid uid, CollectiveMindComponent component, ComponentRemove args) +// { +// _chatManager.UpdatePermissions(); +// } +// } diff --git a/Content.Client/Chat/Managers/IChatManager.cs b/Content.Client/Chat/Managers/IChatManager.cs index f4c2ca17b92..de96dc07ec8 100644 --- a/Content.Client/Chat/Managers/IChatManager.cs +++ b/Content.Client/Chat/Managers/IChatManager.cs @@ -7,6 +7,6 @@ public interface IChatManager void Initialize(); public void SendMessage(string text, ChatSelectChannel channel); - public void UpdatePermissions();//ADT HiveMind + //public void UpdatePermissions();//ADT HiveMind } } diff --git a/Content.Server/ADT/Boombox/BoomBoxSystem.cs b/Content.Server/ADT/Boombox/BoomBoxSystem.cs index cf54b678ba7..6cb447b543b 100644 --- a/Content.Server/ADT/Boombox/BoomBoxSystem.cs +++ b/Content.Server/ADT/Boombox/BoomBoxSystem.cs @@ -24,6 +24,7 @@ using Content.Server.Radio.Components; using Content.Server.DeviceLinking.Components; using Content.Server.DeviceLinking.Systems; +using Content.Server.Radio.Components; namespace Content.Server.BoomBox; diff --git a/Content.Server/ADT/Changeling/EntitySystems/ChangelingSlugSystem.Abilities.cs b/Content.Server/ADT/Changeling/EntitySystems/ChangelingSlugSystem.Abilities.cs index 463f530a316..a684c3ccbef 100644 --- a/Content.Server/ADT/Changeling/EntitySystems/ChangelingSlugSystem.Abilities.cs +++ b/Content.Server/ADT/Changeling/EntitySystems/ChangelingSlugSystem.Abilities.cs @@ -1,173 +1,173 @@ -using Content.Shared.Changeling.Components; -using Content.Shared.Changeling; -using Content.Shared.Inventory; -using Content.Server.Hands.Systems; -using Robust.Shared.Prototypes; -using Content.Server.Body.Systems; -using Content.Shared.Popups; -using Content.Shared.IdentityManagement; -using Robust.Shared.Audio.Systems; -using Robust.Shared.Player; -using Content.Shared.DoAfter; -using Content.Shared.Humanoid; -using Content.Server.Fluids.EntitySystems; -using Robust.Shared.Containers; -using Content.Shared.Damage.Prototypes; -using Content.Shared.Damage; -using Robust.Server.GameObjects; -using Content.Server.Resist; - -namespace Content.Server.Changeling.EntitySystems; - -public sealed partial class LingSlugSystem -{ - [Dependency] private readonly IPrototypeManager _proto = default!; - [Dependency] private readonly BloodstreamSystem _bloodstreamSystem = default!; - [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; - [Dependency] private readonly EntityManager _entityManager = default!; - [Dependency] private readonly TransformSystem _transform = default!; - - private void InitializeLingAbilities() - { - SubscribeLocalEvent(OnLayEggs); - SubscribeLocalEvent(OnLayEggsDoAfter); - SubscribeLocalEvent(OnHatch); - - } - - private void OnLayEggs(EntityUid uid, LingSlugComponent component, LingEggActionEvent args) /// TODO: Заменить на кладку яиц при ударе. - { - if (args.Handled) - return; - - var target = args.Target; - - if (!HasComp(target)) - { - var selfMessage = Loc.GetString("changeling-dna-fail-nohuman", ("target", Identity.Entity(target, EntityManager))); - _popup.PopupEntity(selfMessage, uid, uid); - return; - } - - if (!_mobState.IsIncapacitated(target)) // if target isn't crit or dead dont let absorb - { - var selfMessage = Loc.GetString("changeling-dna-fail-notdead", ("target", Identity.Entity(target, EntityManager))); - _popup.PopupEntity(selfMessage, uid, uid); - return; - } - - if (HasComp(target)) - { - var selfMessage = Loc.GetString("changeling-dna-alreadyabsorbed", ("target", Identity.Entity(target, EntityManager))); - _popup.PopupEntity(selfMessage, uid, uid); - return; - } - - if (_tagSystem.HasTag(target, "ChangelingBlacklist")) - { - var selfMessage = Loc.GetString("changeling-dna-sting-fail-nodna", ("target", Identity.Entity(target, EntityManager))); - _popup.PopupEntity(selfMessage, uid, uid); - return; - } - - if (LayEggs(uid, target, component)) - { - args.Handled = true; - - var selfMessage = Loc.GetString("changeling-eggs-self-start", ("target", Identity.Entity(target, EntityManager))); - _popup.PopupEntity(selfMessage, uid, uid, PopupType.MediumCaution); - } - - } - - public ProtoId GeneticDamageGroup = "Genetic"; - private void OnLayEggsDoAfter(EntityUid uid, LingSlugComponent component, LingEggDoAfterEvent args) - { - if (args.Handled || args.Args.Target == null) - return; - - args.Handled = true; - var target = args.Args.Target.Value; - - if (args.Cancelled || !_mobState.IsIncapacitated(target) || HasComp(target)) - { - var selfMessage = Loc.GetString("changeling-eggs-interrupted"); - _popup.PopupEntity(selfMessage, uid, uid); - return; - } - - else - { - var holderComp = EnsureComp(target); - - holderComp.Stomach = ContainerSystem.EnsureContainer(target, "stomach"); - var damage_genetic = new DamageSpecifier(_proto.Index(GeneticDamageGroup), holderComp.DamageAmount); - _damageableSystem.TryChangeDamage(target, damage_genetic); /// To be sure that target is dead - - var lingComp = EnsureComp(target); - var xform = Transform(target); - var selfMessage = Loc.GetString("changeling-eggs-self-success", ("target", Identity.Entity(target, EntityManager))); - _popup.PopupEntity(selfMessage, uid, uid, PopupType.MediumCaution); - - component.EggsLaid = true; - component.EggLing = target; - - holderComp.ChangelingHatchAction = component.HatchAction; - lingComp.AbsorbedDnaModifier = component.AbsorbedDnaModifier; - - _transform.SetParent(uid, xform.ParentUid); - _transform.SetCoordinates(uid, xform.Coordinates); - - ContainerSystem.Insert(uid, holderComp.Stomach); - RemComp(uid); - if (component.Spread == false) - _action.AddAction(uid, ref holderComp.ChangelingHatchActionEntity, holderComp.ChangelingHatchAction); - else - _action.AddAction(target, ref holderComp.ChangelingHatchActionEntity, holderComp.ChangelingHatchAction); - - _action.RemoveAction(uid, component.LayEggsActionEntity); /// Яйца откладываются только один раз - - return; - } - } - //public ProtoId BruteDamageGroup = "Brute"; - - private void OnHatch(EntityUid uid, LingSlugComponent component, LingHatchActionEvent args) /// TODO: Сделать из акшона автоматическую систему! - { - if (args.Handled) - return; - - if (!component.EggsReady && component.EggLing != null) - { - ///_mobState.ChangeMobState(uid, MobState.Critical); - - var othersMessage = Loc.GetString("changeling-egg-others", ("user", Identity.Entity(component.EggLing.Value, EntityManager))); - _popup.PopupEntity(othersMessage, component.EggLing.Value, Filter.PvsExcept(uid), true, PopupType.MediumCaution); - - var selfMessage = Loc.GetString("changeling-egg-self"); - _popup.PopupEntity(selfMessage, uid, uid, PopupType.MediumCaution); - - component.EggsReady = !component.EggsReady; - - args.Handled = true; - } - - else - { - //RemComp(uid); - - if (SpawnLingMonkey(uid, component)) - { - if (component.EggLing != null) - { - var damage_brute = new DamageSpecifier(_proto.Index(BruteDamageGroup), component.GibDamage); - _damageableSystem.TryChangeDamage(component.EggLing.Value, damage_brute); - _damageableSystem.TryChangeDamage(args.Performer, damage_brute); - - args.Handled = true; - } - } - } - } +// using Content.Shared.Changeling.Components; +// using Content.Shared.Changeling; +// using Content.Shared.Inventory; +// using Content.Server.Hands.Systems; +// using Robust.Shared.Prototypes; +// using Content.Server.Body.Systems; +// using Content.Shared.Popups; +// using Content.Shared.IdentityManagement; +// using Robust.Shared.Audio.Systems; +// using Robust.Shared.Player; +// using Content.Shared.DoAfter; +// using Content.Shared.Humanoid; +// using Content.Server.Fluids.EntitySystems; +// using Robust.Shared.Containers; +// using Content.Shared.Damage.Prototypes; +// using Content.Shared.Damage; +// using Robust.Server.GameObjects; +// using Content.Server.Resist; + +// namespace Content.Server.Changeling.EntitySystems; + +// public sealed partial class LingSlugSystem +// { +// [Dependency] private readonly IPrototypeManager _proto = default!; +// [Dependency] private readonly BloodstreamSystem _bloodstreamSystem = default!; +// [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; +// [Dependency] private readonly EntityManager _entityManager = default!; +// [Dependency] private readonly TransformSystem _transform = default!; + +// private void InitializeLingAbilities() +// { +// SubscribeLocalEvent(OnLayEggs); +// SubscribeLocalEvent(OnLayEggsDoAfter); +// SubscribeLocalEvent(OnHatch); + +// } + +// private void OnLayEggs(EntityUid uid, LingSlugComponent component, LingEggActionEvent args) /// TODO: Заменить на кладку яиц при ударе. +// { +// if (args.Handled) +// return; + +// var target = args.Target; + +// if (!HasComp(target)) +// { +// var selfMessage = Loc.GetString("changeling-dna-fail-nohuman", ("target", Identity.Entity(target, EntityManager))); +// _popup.PopupEntity(selfMessage, uid, uid); +// return; +// } + +// if (!_mobState.IsIncapacitated(target)) // if target isn't crit or dead dont let absorb +// { +// var selfMessage = Loc.GetString("changeling-dna-fail-notdead", ("target", Identity.Entity(target, EntityManager))); +// _popup.PopupEntity(selfMessage, uid, uid); +// return; +// } + +// if (HasComp(target)) +// { +// var selfMessage = Loc.GetString("changeling-dna-alreadyabsorbed", ("target", Identity.Entity(target, EntityManager))); +// _popup.PopupEntity(selfMessage, uid, uid); +// return; +// } + +// if (_tagSystem.HasTag(target, "ChangelingBlacklist")) +// { +// var selfMessage = Loc.GetString("changeling-dna-sting-fail-nodna", ("target", Identity.Entity(target, EntityManager))); +// _popup.PopupEntity(selfMessage, uid, uid); +// return; +// } + +// if (LayEggs(uid, target, component)) +// { +// args.Handled = true; + +// var selfMessage = Loc.GetString("changeling-eggs-self-start", ("target", Identity.Entity(target, EntityManager))); +// _popup.PopupEntity(selfMessage, uid, uid, PopupType.MediumCaution); +// } + +// } + +// public ProtoId GeneticDamageGroup = "Genetic"; +// private void OnLayEggsDoAfter(EntityUid uid, LingSlugComponent component, LingEggDoAfterEvent args) +// { +// if (args.Handled || args.Args.Target == null) +// return; + +// args.Handled = true; +// var target = args.Args.Target.Value; + +// if (args.Cancelled || !_mobState.IsIncapacitated(target) || HasComp(target)) +// { +// var selfMessage = Loc.GetString("changeling-eggs-interrupted"); +// _popup.PopupEntity(selfMessage, uid, uid); +// return; +// } + +// else +// { +// var holderComp = EnsureComp(target); + +// holderComp.Stomach = ContainerSystem.EnsureContainer(target, "stomach"); +// var damage_genetic = new DamageSpecifier(_proto.Index(GeneticDamageGroup), holderComp.DamageAmount); +// _damageableSystem.TryChangeDamage(target, damage_genetic); /// To be sure that target is dead + +// var lingComp = EnsureComp(target); +// var xform = Transform(target); +// var selfMessage = Loc.GetString("changeling-eggs-self-success", ("target", Identity.Entity(target, EntityManager))); +// _popup.PopupEntity(selfMessage, uid, uid, PopupType.MediumCaution); + +// component.EggsLaid = true; +// component.EggLing = target; + +// holderComp.ChangelingHatchAction = component.HatchAction; +// lingComp.AbsorbedDnaModifier = component.AbsorbedDnaModifier; + +// _transform.SetParent(uid, xform.ParentUid); +// _transform.SetCoordinates(uid, xform.Coordinates); + +// ContainerSystem.Insert(uid, holderComp.Stomach); +// RemComp(uid); +// if (component.Spread == false) +// _action.AddAction(uid, ref holderComp.ChangelingHatchActionEntity, holderComp.ChangelingHatchAction); +// else +// _action.AddAction(target, ref holderComp.ChangelingHatchActionEntity, holderComp.ChangelingHatchAction); + +// _action.RemoveAction(uid, component.LayEggsActionEntity); /// Яйца откладываются только один раз + +// return; +// } +// } +// //public ProtoId BruteDamageGroup = "Brute"; + +// private void OnHatch(EntityUid uid, LingSlugComponent component, LingHatchActionEvent args) /// TODO: Сделать из акшона автоматическую систему! +// { +// if (args.Handled) +// return; + +// if (!component.EggsReady && component.EggLing != null) +// { +// ///_mobState.ChangeMobState(uid, MobState.Critical); + +// var othersMessage = Loc.GetString("changeling-egg-others", ("user", Identity.Entity(component.EggLing.Value, EntityManager))); +// _popup.PopupEntity(othersMessage, component.EggLing.Value, Filter.PvsExcept(uid), true, PopupType.MediumCaution); + +// var selfMessage = Loc.GetString("changeling-egg-self"); +// _popup.PopupEntity(selfMessage, uid, uid, PopupType.MediumCaution); + +// component.EggsReady = !component.EggsReady; + +// args.Handled = true; +// } + +// else +// { +// //RemComp(uid); + +// if (SpawnLingMonkey(uid, component)) +// { +// if (component.EggLing != null) +// { +// var damage_brute = new DamageSpecifier(_proto.Index(BruteDamageGroup), component.GibDamage); +// _damageableSystem.TryChangeDamage(component.EggLing.Value, damage_brute); +// _damageableSystem.TryChangeDamage(args.Performer, damage_brute); + +// args.Handled = true; +// } +// } +// } +// } -} +// } diff --git a/Content.Server/ADT/Changeling/EntitySystems/ChangelingSlugSystem.cs b/Content.Server/ADT/Changeling/EntitySystems/ChangelingSlugSystem.cs index 141a5184e66..72086502c92 100644 --- a/Content.Server/ADT/Changeling/EntitySystems/ChangelingSlugSystem.cs +++ b/Content.Server/ADT/Changeling/EntitySystems/ChangelingSlugSystem.cs @@ -1,130 +1,130 @@ -using Content.Server.Actions; -using Content.Server.Store.Systems; -using Content.Shared.Changeling; -using Content.Shared.Changeling.Components; -using Content.Shared.Popups; -using Content.Server.Traitor.Uplink; -using Content.Server.Body.Components; -using Content.Shared.Mobs.Systems; -using Content.Shared.Humanoid; -using Content.Shared.IdentityManagement; -using Content.Shared.Polymorph; -using Content.Shared.Actions; -using Robust.Shared.Containers; -using Content.Shared.Alert; -using Content.Shared.Tag; -using Content.Shared.StatusEffect; -using Content.Shared.Chemistry.Components; -using Content.Shared.Damage.Prototypes; -using Content.Shared.Damage.Systems; -using Content.Shared.Damage; -using Content.Server.Polymorph.Systems; -using Content.Shared.Mind; -using Content.Shared.DoAfter; -using Robust.Shared.Prototypes; -using Content.Shared.Nutrition.Components; - -namespace Content.Server.Changeling.EntitySystems; - -public sealed partial class LingSlugSystem : EntitySystem -{ - [Dependency] private readonly SharedPopupSystem _popup = default!; - [Dependency] private readonly ActionsSystem _action = default!; - [Dependency] private readonly MobStateSystem _mobState = default!; - [Dependency] protected readonly SharedContainerSystem ContainerSystem = default!; - [Dependency] private readonly ActionContainerSystem _actionContainer = default!; - [Dependency] private readonly TagSystem _tagSystem = default!; - [Dependency] private readonly DamageableSystem _damageableSystem = default!; - [Dependency] private readonly SharedMindSystem _mindSystem = default!; - [Dependency] private readonly PolymorphSystem _polymorph = default!; - - public override void Initialize() - { - base.Initialize(); - - SubscribeLocalEvent(OnStartup); - SubscribeLocalEvent(OnMapInit); - - InitializeLingAbilities(); - } - private void OnStartup(EntityUid uid, LingSlugComponent component, ComponentStartup args) - { - RemComp(uid); - RemComp(uid); - } - private void OnMapInit(EntityUid uid, LingSlugComponent component, MapInitEvent args) - { - _action.AddAction(uid, ref component.LayEggsActionEntity, component.LayEggsAction); - } - - public ProtoId BruteDamageGroup = "Brute"; - - private bool LayEggs(EntityUid uid, EntityUid target, LingSlugComponent component) - { - if (!TryComp(target, out var metaData)) - return false; - if (!TryComp(target, out var humanoidappearance)) - { - return false; - } - - if (HasComp(target)) - { - var selfMessage = Loc.GetString("changeling-sting-fail-self", ("target", Identity.Entity(target, EntityManager))); - _popup.PopupEntity(selfMessage, uid, uid); - - var targetMessage = Loc.GetString("changeling-sting-fail-target"); - _popup.PopupEntity(targetMessage, target, target); - return false; - } - - var doAfter = new DoAfterArgs(EntityManager, uid, component.LayingDuration, new LingEggDoAfterEvent(), uid, target: target) - { - DistanceThreshold = 2, - BreakOnMove = true, - BreakOnDamage = true, - AttemptFrequency = AttemptFrequency.StartAndEnd - }; - - _doAfter.TryStartDoAfter(doAfter); - return true; - } - - public const string LingMonkeyId = "MobMonkeyChangeling"; - - public bool SpawnLingMonkey(EntityUid uid, LingSlugComponent component) - { - if (component.EggLing != null) - { - var slug = Spawn(LingMonkeyId, Transform(component.EggLing.Value).Coordinates); - - var newLingComponent = EnsureComp(slug); - newLingComponent.LesserFormActive = true; - newLingComponent.AbsorbedDnaModifier = component.AbsorbedDnaModifier; - - - _action.AddAction(slug, ref newLingComponent.ChangelingLesserFormActionEntity, newLingComponent.ChangelingLesserFormAction); - - - newLingComponent.StoredDNA = new List(); /// Создание нового ДНК списка - if (component.EggLing != null) - { - var newHumanoidData = _polymorph.TryRegisterPolymorphHumanoidData(component.EggLing.Value); - if (newHumanoidData == null) - return false; - newLingComponent.StoredDNA.Add(newHumanoidData.Value); - } - else - return false; - - if (_mindSystem.TryGetMind(uid, out var mindId, out var mind)) - _mindSystem.TransferTo(mindId, slug, mind: mind); - if (mind != null) - mind.PreventGhosting = false; - return true; - - } - else - return false; - } -} +// using Content.Server.Actions; +// using Content.Server.Store.Systems; +// using Content.Shared.Changeling; +// using Content.Shared.Changeling.Components; +// using Content.Shared.Popups; +// using Content.Server.Traitor.Uplink; +// using Content.Server.Body.Components; +// using Content.Shared.Mobs.Systems; +// using Content.Shared.Humanoid; +// using Content.Shared.IdentityManagement; +// using Content.Shared.Polymorph; +// using Content.Shared.Actions; +// using Robust.Shared.Containers; +// using Content.Shared.Alert; +// using Content.Shared.Tag; +// using Content.Shared.StatusEffect; +// using Content.Shared.Chemistry.Components; +// using Content.Shared.Damage.Prototypes; +// using Content.Shared.Damage.Systems; +// using Content.Shared.Damage; +// using Content.Server.Polymorph.Systems; +// using Content.Shared.Mind; +// using Content.Shared.DoAfter; +// using Robust.Shared.Prototypes; +// using Content.Shared.Nutrition.Components; + +// namespace Content.Server.Changeling.EntitySystems; + +// public sealed partial class LingSlugSystem : EntitySystem +// { +// [Dependency] private readonly SharedPopupSystem _popup = default!; +// [Dependency] private readonly ActionsSystem _action = default!; +// [Dependency] private readonly MobStateSystem _mobState = default!; +// [Dependency] protected readonly SharedContainerSystem ContainerSystem = default!; +// [Dependency] private readonly ActionContainerSystem _actionContainer = default!; +// [Dependency] private readonly TagSystem _tagSystem = default!; +// [Dependency] private readonly DamageableSystem _damageableSystem = default!; +// [Dependency] private readonly SharedMindSystem _mindSystem = default!; +// [Dependency] private readonly PolymorphSystem _polymorph = default!; + +// public override void Initialize() +// { +// base.Initialize(); + +// SubscribeLocalEvent(OnStartup); +// SubscribeLocalEvent(OnMapInit); + +// InitializeLingAbilities(); +// } +// private void OnStartup(EntityUid uid, LingSlugComponent component, ComponentStartup args) +// { +// RemComp(uid); +// RemComp(uid); +// } +// private void OnMapInit(EntityUid uid, LingSlugComponent component, MapInitEvent args) +// { +// _action.AddAction(uid, ref component.LayEggsActionEntity, component.LayEggsAction); +// } + +// public ProtoId BruteDamageGroup = "Brute"; + +// private bool LayEggs(EntityUid uid, EntityUid target, LingSlugComponent component) +// { +// if (!TryComp(target, out var metaData)) +// return false; +// if (!TryComp(target, out var humanoidappearance)) +// { +// return false; +// } + +// if (HasComp(target)) +// { +// var selfMessage = Loc.GetString("changeling-sting-fail-self", ("target", Identity.Entity(target, EntityManager))); +// _popup.PopupEntity(selfMessage, uid, uid); + +// var targetMessage = Loc.GetString("changeling-sting-fail-target"); +// _popup.PopupEntity(targetMessage, target, target); +// return false; +// } + +// var doAfter = new DoAfterArgs(EntityManager, uid, component.LayingDuration, new LingEggDoAfterEvent(), uid, target: target) +// { +// DistanceThreshold = 2, +// BreakOnMove = true, +// BreakOnDamage = true, +// AttemptFrequency = AttemptFrequency.StartAndEnd +// }; + +// _doAfter.TryStartDoAfter(doAfter); +// return true; +// } + +// public const string LingMonkeyId = "MobMonkeyChangeling"; + +// public bool SpawnLingMonkey(EntityUid uid, LingSlugComponent component) +// { +// if (component.EggLing != null) +// { +// var slug = Spawn(LingMonkeyId, Transform(component.EggLing.Value).Coordinates); + +// var newLingComponent = EnsureComp(slug); +// newLingComponent.LesserFormActive = true; +// newLingComponent.AbsorbedDnaModifier = component.AbsorbedDnaModifier; + + +// _action.AddAction(slug, ref newLingComponent.ChangelingLesserFormActionEntity, newLingComponent.ChangelingLesserFormAction); + + +// newLingComponent.StoredDNA = new List(); /// Создание нового ДНК списка +// if (component.EggLing != null) +// { +// var newHumanoidData = _polymorph.TryRegisterPolymorphHumanoidData(component.EggLing.Value); +// if (newHumanoidData == null) +// return false; +// newLingComponent.StoredDNA.Add(newHumanoidData.Value); +// } +// else +// return false; + +// if (_mindSystem.TryGetMind(uid, out var mindId, out var mind)) +// _mindSystem.TransferTo(mindId, slug, mind: mind); +// if (mind != null) +// mind.PreventGhosting = false; +// return true; + +// } +// else +// return false; +// } +// } diff --git a/Content.Server/ADT/Changeling/EntitySystems/ChangelingSyntEggSystem.cs b/Content.Server/ADT/Changeling/EntitySystems/ChangelingSyntEggSystem.cs index 27fa723c21f..15f84dffd8a 100644 --- a/Content.Server/ADT/Changeling/EntitySystems/ChangelingSyntEggSystem.cs +++ b/Content.Server/ADT/Changeling/EntitySystems/ChangelingSyntEggSystem.cs @@ -1,66 +1,66 @@ -using Content.Shared.Changeling.Components; -using Content.Server.Actions; -using Content.Shared.Damage; -using Content.Shared.Damage.Prototypes; -using Content.Shared.Popups; -using Robust.Shared.Prototypes; -using Content.Shared.Mind; -using Content.Shared.Alert; -using Robust.Shared.Containers; -using Robust.Server.GameObjects; -using Content.Server.Resist; +// using Content.Shared.Changeling.Components; +// using Content.Server.Actions; +// using Content.Shared.Damage; +// using Content.Shared.Damage.Prototypes; +// using Content.Shared.Popups; +// using Robust.Shared.Prototypes; +// using Content.Shared.Mind; +// using Content.Shared.Alert; +// using Robust.Shared.Containers; +// using Robust.Server.GameObjects; +// using Content.Server.Resist; -namespace Content.Server.Changeling.EntitySystems; +// namespace Content.Server.Changeling.EntitySystems; -public sealed partial class ChangelingSyntEggSystem : EntitySystem -{ - [Dependency] private readonly ActionsSystem _action = default!; - [Dependency] private readonly MetaDataSystem _metaData = default!; - [Dependency] private readonly EntityManager _entityManager = default!; - [Dependency] private readonly DamageableSystem _damageableSystem = default!; - [Dependency] private readonly SharedPopupSystem _popup = default!; - [Dependency] private readonly IPrototypeManager _proto = default!; - [Dependency] private readonly SharedMindSystem _mindSystem = default!; - [Dependency] private readonly TransformSystem _transform = default!; - [Dependency] protected readonly SharedContainerSystem ContainerSystem = default!; +// public sealed partial class ChangelingSyntEggSystem : EntitySystem +// { +// [Dependency] private readonly ActionsSystem _action = default!; +// [Dependency] private readonly MetaDataSystem _metaData = default!; +// [Dependency] private readonly EntityManager _entityManager = default!; +// [Dependency] private readonly DamageableSystem _damageableSystem = default!; +// [Dependency] private readonly SharedPopupSystem _popup = default!; +// [Dependency] private readonly IPrototypeManager _proto = default!; +// [Dependency] private readonly SharedMindSystem _mindSystem = default!; +// [Dependency] private readonly TransformSystem _transform = default!; +// [Dependency] protected readonly SharedContainerSystem ContainerSystem = default!; - public override void Initialize() - { - base.Initialize(); +// public override void Initialize() +// { +// base.Initialize(); - SubscribeLocalEvent(OnInit); - SubscribeLocalEvent(OnShutdown); +// SubscribeLocalEvent(OnInit); +// SubscribeLocalEvent(OnShutdown); - } - public const string LingSlugId = "ChangelingHeadslug"; - public ProtoId BruteDamageGroup = "Genetic"; - private void OnInit(EntityUid uid, SyntLingEggsHolderComponent component, MapInitEvent args) - { - var slug = Spawn(LingSlugId, Transform(uid).Coordinates); - var slugComp = EnsureComp(slug); - slugComp.EggLing = uid; - var xform = Transform(uid); - _transform.SetParent(slug, xform.ParentUid); - _transform.SetCoordinates(slug, xform.Coordinates); - component.Stomach = ContainerSystem.EnsureContainer(uid, "stomach"); - ContainerSystem.Insert(slug, component.Stomach); - RemComp(slug); +// } +// public const string LingSlugId = "ChangelingHeadslug"; +// public ProtoId BruteDamageGroup = "Genetic"; +// private void OnInit(EntityUid uid, SyntLingEggsHolderComponent component, MapInitEvent args) +// { +// var slug = Spawn(LingSlugId, Transform(uid).Coordinates); +// var slugComp = EnsureComp(slug); +// slugComp.EggLing = uid; +// var xform = Transform(uid); +// _transform.SetParent(slug, xform.ParentUid); +// _transform.SetCoordinates(slug, xform.Coordinates); +// component.Stomach = ContainerSystem.EnsureContainer(uid, "stomach"); +// ContainerSystem.Insert(slug, component.Stomach); +// RemComp(slug); - if (_mindSystem.TryGetMind(uid, out var mindId, out var mind)) - _mindSystem.TransferTo(mindId, slug, mind: mind); - _action.RemoveAction(slug, slugComp.LayEggsActionEntity); /// Яйца откладываются только один раз - _action.AddAction(slug, ref component.ChangelingHatchActionEntity, component.ChangelingHatchAction); +// if (_mindSystem.TryGetMind(uid, out var mindId, out var mind)) +// _mindSystem.TransferTo(mindId, slug, mind: mind); +// _action.RemoveAction(slug, slugComp.LayEggsActionEntity); /// Яйца откладываются только один раз +// _action.AddAction(slug, ref component.ChangelingHatchActionEntity, component.ChangelingHatchAction); - var damage_burn = new DamageSpecifier(_proto.Index(BruteDamageGroup), component.DamageAmount); - _damageableSystem.TryChangeDamage(uid, damage_burn); /// To be sure that target is dead - var newLing = EnsureComp(uid); - newLing.EggedBody = true; /// To make egged person into a ling - var selfMessage = Loc.GetString("changeling-eggs-inform"); - _popup.PopupEntity(selfMessage, uid, uid, PopupType.LargeCaution); /// Popup - } - private void OnShutdown(EntityUid uid, SyntLingEggsHolderComponent component, ComponentShutdown args) - { - RemComp(uid); - //_action.RemoveAction(uid, component.ChangelingHatchActionEntity); - } -} +// var damage_burn = new DamageSpecifier(_proto.Index(BruteDamageGroup), component.DamageAmount); +// _damageableSystem.TryChangeDamage(uid, damage_burn); /// To be sure that target is dead +// var newLing = EnsureComp(uid); +// newLing.EggedBody = true; /// To make egged person into a ling +// var selfMessage = Loc.GetString("changeling-eggs-inform"); +// _popup.PopupEntity(selfMessage, uid, uid, PopupType.LargeCaution); /// Popup +// } +// private void OnShutdown(EntityUid uid, SyntLingEggsHolderComponent component, ComponentShutdown args) +// { +// RemComp(uid); +// //_action.RemoveAction(uid, component.ChangelingHatchActionEntity); +// } +// } diff --git a/Content.Server/ADT/Changeling/EntitySystems/DNARefresh.cs b/Content.Server/ADT/Changeling/EntitySystems/DNARefresh.cs index 74d8621b8df..21b4ff2e05a 100644 --- a/Content.Server/ADT/Changeling/EntitySystems/DNARefresh.cs +++ b/Content.Server/ADT/Changeling/EntitySystems/DNARefresh.cs @@ -1,19 +1,19 @@ -using Content.Shared.Alert; -using Content.Server.Abilities.Mime; -using Content.Shared.Changeling.Components; +// using Content.Shared.Alert; +// using Content.Server.Abilities.Mime; +// using Content.Shared.Changeling.Components; -namespace Content.Server.Changeling.EntitySystems; +// namespace Content.Server.Changeling.EntitySystems; -[DataDefinition] -public sealed partial class DNARefresh : IAlertClick -{ - public void AlertClicked(EntityUid player) - { - var entManager = IoCManager.Resolve(); - if (entManager.TryGetComponent(player, out ChangelingComponent? component)) - { - entManager.System().Refresh(player, component); - } - } -} +// [DataDefinition] +// public sealed partial class DNARefresh : IAlertClick +// { +// public void AlertClicked(EntityUid player) +// { +// var entManager = IoCManager.Resolve(); +// if (entManager.TryGetComponent(player, out ChangelingComponent? component)) +// { +// entManager.System().Refresh(player, component); +// } +// } +// } diff --git a/Content.Server/ADT/Changeling/EntitySystems/LingHallucinationSystem.cs b/Content.Server/ADT/Changeling/EntitySystems/LingHallucinationSystem.cs index 7b65b31f3c0..9c25b8cac5b 100644 --- a/Content.Server/ADT/Changeling/EntitySystems/LingHallucinationSystem.cs +++ b/Content.Server/ADT/Changeling/EntitySystems/LingHallucinationSystem.cs @@ -1,86 +1,86 @@ -using Content.Server.Mind; -using Content.Server.Roles.Jobs; -using Content.Shared.Actions; -using Content.Shared.Eye; -using Content.Shared.Follower; -using Content.Shared.Mind; -using Content.Shared.Mobs.Systems; -using Robust.Server.GameObjects; -using Robust.Server.Player; -using Content.Shared.NarcoticEffects.Components; -using Robust.Shared.Physics.Systems; -using Content.Shared.Changeling.Components; -using Robust.Shared.Timing; +// using Content.Server.Mind; +// using Content.Server.Roles.Jobs; +// using Content.Shared.Actions; +// using Content.Shared.Eye; +// using Content.Shared.Follower; +// using Content.Shared.Mind; +// using Content.Shared.Mobs.Systems; +// using Robust.Server.GameObjects; +// using Robust.Server.Player; +// using Content.Shared.NarcoticEffects.Components; +// using Robust.Shared.Physics.Systems; +// using Content.Shared.Changeling.Components; +// using Robust.Shared.Timing; -namespace Content.Server.Changeling; +// namespace Content.Server.Changeling; -public sealed class LingHallucinationSystem : EntitySystem -{ - [Dependency] private readonly SharedEyeSystem _eye = default!; - [Dependency] private readonly VisibilitySystem _visibilitySystem = default!; - [Dependency] private readonly IEntityManager _entityManager = default!; +// public sealed class LingHallucinationSystem : EntitySystem +// { +// [Dependency] private readonly SharedEyeSystem _eye = default!; +// [Dependency] private readonly VisibilitySystem _visibilitySystem = default!; +// [Dependency] private readonly IEntityManager _entityManager = default!; - public override void Initialize() - { - SubscribeLocalEvent(OnMapInit); - SubscribeLocalEvent(OnShutdown); - } +// public override void Initialize() +// { +// SubscribeLocalEvent(OnMapInit); +// SubscribeLocalEvent(OnShutdown); +// } - private void OnMapInit(EntityUid uid, LingHallucinationComponent component, MapInitEvent args) - { - // Allow this entity to be seen by other ghosts. - var visibility = EnsureComp(uid); +// private void OnMapInit(EntityUid uid, LingHallucinationComponent component, MapInitEvent args) +// { +// // Allow this entity to be seen by other ghosts. +// var visibility = EnsureComp(uid); - _visibilitySystem.RemoveLayer(uid, visibility, (int) VisibilityFlags.Normal, false); - _visibilitySystem.RefreshVisibility(uid, visibilityComponent: visibility); - } +// _visibilitySystem.RemoveLayer(uid, visibility, (int) VisibilityFlags.Normal, false); +// _visibilitySystem.RefreshVisibility(uid, visibilityComponent: visibility); +// } - private void OnShutdown(EntityUid uid, LingHallucinationComponent component, ComponentShutdown args) - { - // Perf: If the entity is deleting itself, no reason to change these back. - if (Terminating(uid)) - return; +// private void OnShutdown(EntityUid uid, LingHallucinationComponent component, ComponentShutdown args) +// { +// // Perf: If the entity is deleting itself, no reason to change these back. +// if (Terminating(uid)) +// return; - // Entity can't be seen by ghosts anymore. - if (TryComp(uid, out VisibilityComponent? visibility)) - { - _visibilitySystem.RemoveLayer(uid, visibility, component.Layer, false); - _visibilitySystem.AddLayer(uid, visibility, (int) VisibilityFlags.Normal, false); - _visibilitySystem.RefreshVisibility(uid, visibilityComponent: visibility); - if (!_entityManager.TryGetComponent(uid, out var eye)) - return; +// // Entity can't be seen by ghosts anymore. +// if (TryComp(uid, out VisibilityComponent? visibility)) +// { +// _visibilitySystem.RemoveLayer(uid, visibility, component.Layer, false); +// _visibilitySystem.AddLayer(uid, visibility, (int) VisibilityFlags.Normal, false); +// _visibilitySystem.RefreshVisibility(uid, visibilityComponent: visibility); +// if (!_entityManager.TryGetComponent(uid, out var eye)) +// return; - _eye.SetVisibilityMask(uid, eye.VisibilityMask & ~component.Layer, eye); - _visibilitySystem.RefreshVisibility(uid, visibilityComponent: visibility); - } - } +// _eye.SetVisibilityMask(uid, eye.VisibilityMask & ~component.Layer, eye); +// _visibilitySystem.RefreshVisibility(uid, visibilityComponent: visibility); +// } +// } - public override void Update(float frameTime) - { - base.Update(frameTime); +// public override void Update(float frameTime) +// { +// base.Update(frameTime); - var query = EntityQueryEnumerator(); - while (query.MoveNext(out var uid, out var stat, out var xform)) - { - TryComp(uid, out var curVisibility); - if (curVisibility != null) - { - if (stat.Layer == curVisibility.Layer) - return; - } - // Allow this entity to be seen by other ghosts. - var visibility = EnsureComp(uid); +// var query = EntityQueryEnumerator(); +// while (query.MoveNext(out var uid, out var stat, out var xform)) +// { +// TryComp(uid, out var curVisibility); +// if (curVisibility != null) +// { +// if (stat.Layer == curVisibility.Layer) +// return; +// } +// // Allow this entity to be seen by other ghosts. +// var visibility = EnsureComp(uid); - _visibilitySystem.AddLayer(uid, visibility, stat.Layer, false); - _visibilitySystem.RemoveLayer(uid, visibility, (int) VisibilityFlags.Normal, false); - _visibilitySystem.RefreshVisibility(uid, visibilityComponent: visibility); - if (!_entityManager.TryGetComponent(uid, out var eye)) - return; +// _visibilitySystem.AddLayer(uid, visibility, stat.Layer, false); +// _visibilitySystem.RemoveLayer(uid, visibility, (int) VisibilityFlags.Normal, false); +// _visibilitySystem.RefreshVisibility(uid, visibilityComponent: visibility); +// if (!_entityManager.TryGetComponent(uid, out var eye)) +// return; - _eye.SetVisibilityMask(uid, eye.VisibilityMask | stat.Layer, eye); - _visibilitySystem.RefreshVisibility(uid, visibilityComponent: visibility); - } - } +// _eye.SetVisibilityMask(uid, eye.VisibilityMask | stat.Layer, eye); +// _visibilitySystem.RefreshVisibility(uid, visibilityComponent: visibility); +// } +// } -} +// } diff --git a/Content.Server/ADT/Changeling/EntitySystems/LingHallucinationsSystem.cs b/Content.Server/ADT/Changeling/EntitySystems/LingHallucinationsSystem.cs index 048c94b4c11..a316cec3269 100644 --- a/Content.Server/ADT/Changeling/EntitySystems/LingHallucinationsSystem.cs +++ b/Content.Server/ADT/Changeling/EntitySystems/LingHallucinationsSystem.cs @@ -1,103 +1,103 @@ -using Content.Server.Actions; -using Content.Server.Store.Systems; -using Robust.Shared.Audio.Systems; -using Content.Shared.Popups; -using Content.Shared.Humanoid; -using Content.Shared.Mobs.Systems; -using Content.Server.Polymorph.Systems; -using Content.Shared.Actions; -using Robust.Shared.Serialization.Manager; -using Content.Shared.Alert; -using Content.Shared.Tag; -using Content.Shared.StatusEffect; -using Robust.Shared.Timing; -using Content.Shared.Eye; -using Content.Shared.Movement.Systems; -using Content.Shared.Database; -using Content.Shared.Changeling.Components; -using Robust.Server.GameObjects; -using Robust.Shared.Map; -using Robust.Shared.Random; -using Content.Server.Mind; -using Content.Shared.Administration.Logs; - -namespace Content.Server.Changeling.EntitySystems; - -public sealed partial class LingHallucinationsSystem : EntitySystem -{ - [Dependency] private readonly EntityLookupSystem _lookup = default!; - [Dependency] private readonly IEntityManager _entityManager = default!; - [Dependency] private readonly VisibilitySystem _visibilitySystem = default!; - [Dependency] private readonly ISharedAdminLogManager _adminLogger = default!; - [Dependency] private readonly SharedEyeSystem _eye = default!; - [Dependency] private readonly IGameTiming _timing = default!; - [Dependency] private readonly IRobustRandom _random = default!; - [Dependency] private readonly MindSystem _mindSystem = default!; - [Dependency] private readonly SharedAudioSystem _audio = default!; - - public static string HallucinatingKey = "Hallucinations"; - - public override void Initialize() - { - base.Initialize(); - - SubscribeLocalEvent(OnHallucinationsInit); - SubscribeLocalEvent(OnHallucinationsShutdown); - } - - private void OnHallucinationsInit(EntityUid uid, LingHallucinationsComponent component, MapInitEvent args) - { - component.Layer = _random.Next(50, 500); - if (!_entityManager.TryGetComponent(uid, out var eye)) - return; - _eye.SetVisibilityMask(uid, eye.VisibilityMask | component.Layer, eye); - - _adminLogger.Add(LogType.Action, LogImpact.Medium, - $"{ToPrettyString(uid):player} began to hallucinate."); - } - - private void OnHallucinationsShutdown(EntityUid uid, LingHallucinationsComponent component, ComponentShutdown args) - { - if (!_entityManager.TryGetComponent(uid, out var eye)) - return; - _eye.SetVisibilityMask(uid, eye.VisibilityMask & ~component.Layer, eye); - _adminLogger.Add(LogType.Action, LogImpact.Medium, - $"{ToPrettyString(uid):player} stopped hallucinating."); - } - - public override void Update(float frameTime) - { - base.Update(frameTime); - - var query = EntityQueryEnumerator(); - while (query.MoveNext(out var uid, out var stat, out var xform)) - { - if (_timing.CurTime < stat.NextSecond) - continue; - var rate = stat.SpawnRate; - stat.NextSecond = _timing.CurTime + TimeSpan.FromSeconds(stat.SpawnRate); - - if (!_random.Prob(stat.Chance)) - continue; - - var range = stat.Range * 4; - - foreach (var (ent, comp) in _lookup.GetEntitiesInRange(xform.MapPosition, range)) - { - var newCoords = Transform(ent).MapPosition.Offset(_random.NextVector2(stat.Range)); - - var hallucination = Spawn(_random.Pick(stat.Spawns), newCoords); - EnsureComp(hallucination, out var visibility); - _visibilitySystem.SetLayer(hallucination, visibility, (int) stat.Layer, false); - _visibilitySystem.RefreshVisibility(hallucination, visibilityComponent: visibility); - } - - var uidnewCoords = Transform(uid).MapPosition.Offset(_random.NextVector2(stat.Range)); - - var uidhallucination = Spawn(_random.Pick(stat.Spawns), uidnewCoords); - EnsureComp(uidhallucination, out var uidvisibility); - _visibilitySystem.SetLayer(uidhallucination, uidvisibility, (int) stat.Layer, false); - _visibilitySystem.RefreshVisibility(uidhallucination, visibilityComponent: uidvisibility); - } - } -} +// using Content.Server.Actions; +// using Content.Server.Store.Systems; +// using Robust.Shared.Audio.Systems; +// using Content.Shared.Popups; +// using Content.Shared.Humanoid; +// using Content.Shared.Mobs.Systems; +// using Content.Server.Polymorph.Systems; +// using Content.Shared.Actions; +// using Robust.Shared.Serialization.Manager; +// using Content.Shared.Alert; +// using Content.Shared.Tag; +// using Content.Shared.StatusEffect; +// using Robust.Shared.Timing; +// using Content.Shared.Eye; +// using Content.Shared.Movement.Systems; +// using Content.Shared.Database; +// using Content.Shared.Changeling.Components; +// using Robust.Server.GameObjects; +// using Robust.Shared.Map; +// using Robust.Shared.Random; +// using Content.Server.Mind; +// using Content.Shared.Administration.Logs; + +// namespace Content.Server.Changeling.EntitySystems; + +// public sealed partial class LingHallucinationsSystem : EntitySystem +// { +// [Dependency] private readonly EntityLookupSystem _lookup = default!; +// [Dependency] private readonly IEntityManager _entityManager = default!; +// [Dependency] private readonly VisibilitySystem _visibilitySystem = default!; +// [Dependency] private readonly ISharedAdminLogManager _adminLogger = default!; +// [Dependency] private readonly SharedEyeSystem _eye = default!; +// [Dependency] private readonly IGameTiming _timing = default!; +// [Dependency] private readonly IRobustRandom _random = default!; +// [Dependency] private readonly MindSystem _mindSystem = default!; +// [Dependency] private readonly SharedAudioSystem _audio = default!; + +// public static string HallucinatingKey = "Hallucinations"; + +// public override void Initialize() +// { +// base.Initialize(); + +// SubscribeLocalEvent(OnHallucinationsInit); +// SubscribeLocalEvent(OnHallucinationsShutdown); +// } + +// private void OnHallucinationsInit(EntityUid uid, LingHallucinationsComponent component, MapInitEvent args) +// { +// component.Layer = _random.Next(50, 500); +// if (!_entityManager.TryGetComponent(uid, out var eye)) +// return; +// _eye.SetVisibilityMask(uid, eye.VisibilityMask | component.Layer, eye); + +// _adminLogger.Add(LogType.Action, LogImpact.Medium, +// $"{ToPrettyString(uid):player} began to hallucinate."); +// } + +// private void OnHallucinationsShutdown(EntityUid uid, LingHallucinationsComponent component, ComponentShutdown args) +// { +// if (!_entityManager.TryGetComponent(uid, out var eye)) +// return; +// _eye.SetVisibilityMask(uid, eye.VisibilityMask & ~component.Layer, eye); +// _adminLogger.Add(LogType.Action, LogImpact.Medium, +// $"{ToPrettyString(uid):player} stopped hallucinating."); +// } + +// public override void Update(float frameTime) +// { +// base.Update(frameTime); + +// var query = EntityQueryEnumerator(); +// while (query.MoveNext(out var uid, out var stat, out var xform)) +// { +// if (_timing.CurTime < stat.NextSecond) +// continue; +// var rate = stat.SpawnRate; +// stat.NextSecond = _timing.CurTime + TimeSpan.FromSeconds(stat.SpawnRate); + +// if (!_random.Prob(stat.Chance)) +// continue; + +// var range = stat.Range * 4; + +// foreach (var (ent, comp) in _lookup.GetEntitiesInRange(xform.MapPosition, range)) +// { +// var newCoords = Transform(ent).MapPosition.Offset(_random.NextVector2(stat.Range)); + +// var hallucination = Spawn(_random.Pick(stat.Spawns), newCoords); +// EnsureComp(hallucination, out var visibility); +// _visibilitySystem.SetLayer(hallucination, visibility, (int) stat.Layer, false); +// _visibilitySystem.RefreshVisibility(hallucination, visibilityComponent: visibility); +// } + +// var uidnewCoords = Transform(uid).MapPosition.Offset(_random.NextVector2(stat.Range)); + +// var uidhallucination = Spawn(_random.Pick(stat.Spawns), uidnewCoords); +// EnsureComp(uidhallucination, out var uidvisibility); +// _visibilitySystem.SetLayer(uidhallucination, uidvisibility, (int) stat.Layer, false); +// _visibilitySystem.RefreshVisibility(uidhallucination, visibilityComponent: uidvisibility); +// } +// } +// } diff --git a/Content.Server/ADT/CollectiveMind/CollectiveMindCommand.cs b/Content.Server/ADT/CollectiveMind/CollectiveMindCommand.cs index 0874103f7ee..19c11952e93 100644 --- a/Content.Server/ADT/CollectiveMind/CollectiveMindCommand.cs +++ b/Content.Server/ADT/CollectiveMind/CollectiveMindCommand.cs @@ -1,42 +1,42 @@ -using Content.Server.Chat.Systems; -using Content.Shared.Administration; -using Robust.Shared.Console; -using Robust.Shared.Enums; - -namespace Content.Server.Sirena.CollectiveMind; - -[AnyCommand] -internal sealed class CollectiveMindCommand : IConsoleCommand -{ - public string Command => "cmsay"; - public string Description => "Send chat messages to the collective mind."; - public string Help => "cmsay "; - - public void Execute(IConsoleShell shell, string argStr, string[] args) - { - if (shell.Player is not { } player) - { - shell.WriteError("This command cannot be run from the server."); - return; - } - - if (player.Status != SessionStatus.InGame) - return; - - if (player.AttachedEntity is not { } playerEntity) - { - shell.WriteError("You don't have an entity!"); - return; - } - - if (args.Length < 1) - return; - - var message = string.Join(" ", args).Trim(); - if (string.IsNullOrEmpty(message)) - return; - - IoCManager.Resolve().GetEntitySystem() - .TrySendInGameICMessage(playerEntity, message, InGameICChatType.CollectiveMind, ChatTransmitRange.Normal); - } -} +// using Content.Server.Chat.Systems; //TODO Доделать коллективный разум +// using Content.Shared.Administration; +// using Robust.Shared.Console; +// using Robust.Shared.Enums; + +// namespace Content.Server.Sirena.CollectiveMind; + +// [AnyCommand] +// internal sealed class CollectiveMindCommand : IConsoleCommand +// { +// public string Command => "cmsay"; +// public string Description => "Send chat messages to the collective mind."; +// public string Help => "cmsay "; + +// public void Execute(IConsoleShell shell, string argStr, string[] args) +// { +// if (shell.Player is not { } player) +// { +// shell.WriteError("This command cannot be run from the server."); +// return; +// } + +// if (player.Status != SessionStatus.InGame) +// return; + +// if (player.AttachedEntity is not { } playerEntity) +// { +// shell.WriteError("You don't have an entity!"); +// return; +// } + +// if (args.Length < 1) +// return; + +// var message = string.Join(" ", args).Trim(); +// if (string.IsNullOrEmpty(message)) +// return; + +// IoCManager.Resolve().GetEntitySystem() +// .TrySendInGameICMessage(playerEntity, message, InGameICChatType.CollectiveMind, ChatTransmitRange.Normal); +// } +// } diff --git a/Content.Server/Radio/Components/RadioMicrophoneComponent.cs b/Content.Server/Radio/Components/RadioMicrophoneComponent.cs index af01f86f23c..296ced8ce07 100644 --- a/Content.Server/Radio/Components/RadioMicrophoneComponent.cs +++ b/Content.Server/Radio/Components/RadioMicrophoneComponent.cs @@ -3,14 +3,14 @@ using Content.Shared.Radio; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; +using Content.Server.ComponentalActions.EntitySystems; namespace Content.Server.Radio.Components; /// /// Listens for local chat messages and relays them to some radio frequency /// -[RegisterComponent] -[Access(typeof(RadioDeviceSystem))] +[RegisterComponent] //ADT BoomBox System убрал доступы public sealed partial class RadioMicrophoneComponent : Component { [ViewVariables(VVAccess.ReadWrite)] diff --git a/Content.Shared/Stealth/Components/StealthComponent.cs b/Content.Shared/Stealth/Components/StealthComponent.cs index 1a8a647768a..4b3f6a62dbf 100644 --- a/Content.Shared/Stealth/Components/StealthComponent.cs +++ b/Content.Shared/Stealth/Components/StealthComponent.cs @@ -9,8 +9,7 @@ namespace Content.Shared.Stealth.Components; /// It also turns the entity invisible. /// Use other components (like StealthOnMove) to modify this component's visibility based on certain conditions. /// -[RegisterComponent, NetworkedComponent] -[Access(typeof(SharedStealthSystem))] +[RegisterComponent, NetworkedComponent] //ADT BoomBox System Удалили доступы public sealed partial class StealthComponent : Component { ///