Merge remote-tracking branch 'upstream/stable' into ed-25-08-2025-upstream-sync
# Conflicts: # .github/CODEOWNERS # Content.Client/UserInterface/Systems/Actions/Controls/ActionButton.cs # Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs # Content.Server/Chat/Systems/ChatSystem.cs # Content.Server/Explosion/EntitySystems/TriggerSystem.cs # Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs # Content.Shared/Lock/LockSystem.cs # Content.Shared/Nutrition/Components/FoodComponent.cs # Content.Shared/Speech/ListenEvent.cs # Resources/Prototypes/Entities/Effects/admin_triggers.yml
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Content.Server.Speech.Components;
|
||||
using Content.Shared.Speech;
|
||||
|
||||
namespace Content.Server.Speech.EntitySystems;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Content.Server.Chat.Systems;
|
||||
using Content.Server.Speech.Components;
|
||||
using Content.Shared.Speech;
|
||||
using Content.Shared.Speech.Components;
|
||||
|
||||
namespace Content.Server.Speech.EntitySystems;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ using Content.Server.Actions;
|
||||
using Content.Server.Chat.Systems;
|
||||
using Content.Server.Speech.Components;
|
||||
using Content.Shared.Chat.Prototypes;
|
||||
using Content.Shared.Cloning.Events;
|
||||
using Content.Shared.Humanoid;
|
||||
using Content.Shared.Speech;
|
||||
using Content.Shared.Speech.Components;
|
||||
@@ -31,6 +32,25 @@ public sealed class VocalSystem : EntitySystem
|
||||
SubscribeLocalEvent<VocalComponent, ScreamActionEvent>(OnScreamAction);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copy this component's datafields from one entity to another.
|
||||
/// This can't use CopyComp because of the ScreamActionEntity DataField, which should not be copied.
|
||||
/// <summary>
|
||||
public void CopyComponent(Entity<VocalComponent?> source, EntityUid target)
|
||||
{
|
||||
if (!Resolve(source, ref source.Comp))
|
||||
return;
|
||||
|
||||
var targetComp = EnsureComp<VocalComponent>(target);
|
||||
targetComp.Sounds = source.Comp.Sounds;
|
||||
targetComp.ScreamId = source.Comp.ScreamId;
|
||||
targetComp.Wilhelm = source.Comp.Wilhelm;
|
||||
targetComp.WilhelmProbability = source.Comp.WilhelmProbability;
|
||||
LoadSounds(target, targetComp);
|
||||
|
||||
Dirty(target, targetComp);
|
||||
}
|
||||
|
||||
private void OnMapInit(EntityUid uid, VocalComponent component, MapInitEvent args)
|
||||
{
|
||||
// try to add scream action when vocal comp added
|
||||
|
||||
Reference in New Issue
Block a user