Merge remote-tracking branch 'upstream/stable' into ed-04-08-2025-upstream-sync

# Conflicts:
#	Content.Server/Chat/Managers/ChatSanitizationManager.cs
#	Content.Shared/Damage/Systems/SharedStaminaSystem.cs
#	Content.Shared/Eye/VisibilityFlags.cs
#	Content.Shared/Lock/LockSystem.cs
#	Content.Shared/StatusEffectNew/StatusEffectSystem.Relay.cs
#	Resources/Prototypes/Recipes/Reactions/chemicals.yml
#	Tools/actions_changelogs_since_last_run.py
This commit is contained in:
Ed
2025-08-04 12:44:29 +03:00
507 changed files with 12042 additions and 3123 deletions

View File

@@ -2,15 +2,19 @@ using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using Content.Shared.Emoting;
using Content.Shared.Examine;
using Content.Shared.GameTicking;
using Content.Shared.Humanoid;
using Content.Shared.Interaction.Events;
using Content.Shared.Movement.Components;
using Content.Shared.Mind.Components;
using Content.Shared.Mobs.Components;
using Content.Shared.Mobs.Systems;
using Content.Shared.Objectives.Systems;
using Content.Shared.Players;
using Content.Shared.Speech;
using Content.Shared.Whitelist;
using Robust.Shared.Map;
using Robust.Shared.Network;
@@ -646,6 +650,31 @@ public abstract partial class SharedMindSystem : EntitySystem
return allHumans;
}
/// <summary>
/// Give sentience to a target entity by attaching necessary components.
/// </summary>
/// <param name="uid">Uid of the target entity.</param>
/// <param name="allowMovement">Whether the target entity should be able to move.</param>
/// <param name="allowSpeech">Whether the target entity should be able to talk.</param>
public void MakeSentient(EntityUid uid, bool allowMovement = true, bool allowSpeech = true)
{
EnsureComp<MindContainerComponent>(uid);
if (allowMovement)
{
EnsureComp<InputMoverComponent>(uid);
EnsureComp<MobMoverComponent>(uid);
EnsureComp<MovementSpeedModifierComponent>(uid);
}
if (allowSpeech)
{
EnsureComp<SpeechComponent>(uid);
EnsureComp<EmotingComponent>(uid);
}
EnsureComp<ExaminerComponent>(uid);
}
}
/// <summary>