фиксы тестов
This commit is contained in:
@@ -21,7 +21,7 @@ public sealed class EmoteAnimationSystem : EntitySystem
|
||||
|
||||
private void OnEmote(EntityUid uid, EmoteAnimationComponent component, ref EmoteEvent args)
|
||||
{
|
||||
if (args.Handled || !args.Emote.Category.HasFlag(EmoteCategory.Gesture))
|
||||
if (args.Handled || !args.Emote.Category.HasFlag(EmoteCategory.Hands))
|
||||
return;
|
||||
|
||||
PlayEmoteAnimation(uid, component, args.Emote.ID);
|
||||
|
||||
@@ -78,7 +78,8 @@ namespace Content.Server._White.AspectsSystem.Base
|
||||
|
||||
if (aspect is { Description: not null, IsHidden: false })
|
||||
{
|
||||
_chatSystem.DispatchGlobalAnnouncement(aspect.Description, playSound: false, colorOverride: Color.Aquamarine);
|
||||
_chatSystem.DispatchGlobalAnnouncement(aspect.Description, playSound: false,
|
||||
colorOverride: Color.Aquamarine);
|
||||
}
|
||||
|
||||
_audio.PlayGlobal(aspect.StartAudio, Filter.Broadcast(), true);
|
||||
@@ -88,7 +89,11 @@ namespace Content.Server._White.AspectsSystem.Base
|
||||
/// <summary>
|
||||
/// Called when an aspect is started.
|
||||
/// </summary>
|
||||
protected override void Started(EntityUid uid, T component, GameRuleComponent gameRule, GameRuleStartedEvent args)
|
||||
protected override void Started(
|
||||
EntityUid uid,
|
||||
T component,
|
||||
GameRuleComponent gameRule,
|
||||
GameRuleStartedEvent args)
|
||||
{
|
||||
base.Started(uid, component, gameRule, args);
|
||||
|
||||
@@ -112,13 +117,14 @@ namespace Content.Server._White.AspectsSystem.Base
|
||||
|
||||
if (aspect is { Name: not null, IsHidden: false })
|
||||
{
|
||||
_chatSystem.DispatchGlobalAnnouncement($"Именем аспекта являлось: {aspect.Name}", playSound: false, colorOverride: Color.Aquamarine);
|
||||
_chatSystem.DispatchGlobalAnnouncement($"Именем аспекта являлось: {aspect.Name}", playSound: false,
|
||||
colorOverride: Color.Aquamarine);
|
||||
}
|
||||
|
||||
_audio.PlayGlobal(aspect.EndAudio, Filter.Broadcast(), true);
|
||||
}
|
||||
|
||||
#region Helpers
|
||||
#region Helpers
|
||||
|
||||
/// <summary>
|
||||
/// Forces this aspect to end prematurely.
|
||||
@@ -130,13 +136,19 @@ namespace Content.Server._White.AspectsSystem.Base
|
||||
GameTicker.EndGameRule(uid, component);
|
||||
}
|
||||
|
||||
protected bool TryGetRandomStation([NotNullWhen(true)] out EntityUid? station, Func<EntityUid, bool>? filter = null)
|
||||
protected bool TryGetRandomStation(
|
||||
[NotNullWhen(true)] out EntityUid? station,
|
||||
Func<EntityUid, bool>? filter = null)
|
||||
{
|
||||
var stations = new ValueList<EntityUid>();
|
||||
|
||||
if (filter == null)
|
||||
{
|
||||
stations.EnsureCapacity(Count<StationEventEligibleComponent>());
|
||||
var stationCount = Count<StationEventEligibleComponent>();
|
||||
if (stationCount > 0)
|
||||
{
|
||||
stations.EnsureCapacity(stationCount);
|
||||
}
|
||||
}
|
||||
|
||||
filter ??= _ => true;
|
||||
@@ -160,7 +172,8 @@ namespace Content.Server._White.AspectsSystem.Base
|
||||
return true;
|
||||
}
|
||||
|
||||
protected bool TryGetStationGrids([NotNullWhen(true)] out EntityUid? targetStation,
|
||||
protected bool TryGetStationGrids(
|
||||
[NotNullWhen(true)] out EntityUid? targetStation,
|
||||
[NotNullWhen(true)] out HashSet<EntityUid>? grids)
|
||||
{
|
||||
if (!TryGetRandomStation(out targetStation))
|
||||
@@ -175,7 +188,11 @@ namespace Content.Server._White.AspectsSystem.Base
|
||||
return grids.Count > 0;
|
||||
}
|
||||
|
||||
protected bool TryFindRandomTile(out Vector2i tile, [NotNullWhen(true)] out EntityUid? targetStation, out EntityUid targetGrid, out EntityCoordinates targetCoords)
|
||||
protected bool TryFindRandomTile(
|
||||
out Vector2i tile,
|
||||
[NotNullWhen(true)] out EntityUid? targetStation,
|
||||
out EntityUid targetGrid,
|
||||
out EntityCoordinates targetCoords)
|
||||
{
|
||||
tile = default;
|
||||
|
||||
@@ -219,6 +236,7 @@ namespace Content.Server._White.AspectsSystem.Base
|
||||
{
|
||||
if (!physQuery.TryGetComponent(ent, out var body))
|
||||
continue;
|
||||
|
||||
if (body.BodyType != BodyType.Static ||
|
||||
!body.Hard ||
|
||||
(body.CollisionLayer & (int) CollisionGroup.Impassable) == 0)
|
||||
@@ -239,8 +257,6 @@ namespace Content.Server._White.AspectsSystem.Base
|
||||
return found;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
namespace Content.Server._White.Cult;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server._White.Cult;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed partial class ConstructComponent : Component
|
||||
{
|
||||
[DataField("actions")]
|
||||
public List<string> Actions = new();
|
||||
public List<EntProtoId> Actions = new();
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
|
||||
using CultistComponent = Content.Shared._White.Cult.Components.CultistComponent;
|
||||
|
||||
namespace Content.Server._White.Cult.GameRule;
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ using Robust.Shared.Utility;
|
||||
using Content.Shared._White;
|
||||
using Content.Shared.Mind;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using CultistComponent = Content.Shared._White.Cult.Components.CultistComponent;
|
||||
|
||||
namespace Content.Server._White.Cult.GameRule;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ using Content.Shared._White.Cult;
|
||||
using Content.Shared._White.Cult.Components;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Prototypes;
|
||||
using CultistComponent = Content.Shared._White.Cult.Components.CultistComponent;
|
||||
using Timer = Robust.Shared.Timing.Timer;
|
||||
|
||||
namespace Content.Server._White.Cult.HolyWater;
|
||||
|
||||
@@ -3,6 +3,7 @@ using Content.Server._White.Cult.TimedProduction;
|
||||
using Content.Shared._White.Cult;
|
||||
using Content.Shared._White.Cult.Pylon;
|
||||
using Robust.Shared.Physics.Events;
|
||||
using CultistComponent = Content.Shared._White.Cult.Components.CultistComponent;
|
||||
|
||||
namespace Content.Server._White.Cult.Items.Systems;
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Shared.Inventory.Events;
|
||||
using Content.Shared.Movement.Components;
|
||||
using Content.Shared.Movement.Systems;
|
||||
using Content.Shared._White.Cult;
|
||||
using CultistComponent = Content.Shared._White.Cult.Components.CultistComponent;
|
||||
|
||||
namespace Content.Server._White.Cult.Items.Systems;
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Server._White.Cult.Items.Components;
|
||||
using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Throwing;
|
||||
using Content.Shared._White.Cult;
|
||||
using CultistComponent = Content.Shared._White.Cult.Components.CultistComponent;
|
||||
|
||||
namespace Content.Server._White.Cult.Items.Systems;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared._White.Cult;
|
||||
using Robust.Shared.Timing;
|
||||
using CultistComponent = Content.Shared._White.Cult.Components.CultistComponent;
|
||||
|
||||
namespace Content.Server._White.Cult.Items.Systems;
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Timing;
|
||||
using CultistComponent = Content.Shared._White.Cult.Components.CultistComponent;
|
||||
|
||||
namespace Content.Server._White.Cult.Items.Systems;
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Timing;
|
||||
using CultistComponent = Content.Shared._White.Cult.Components.CultistComponent;
|
||||
using Timer = Robust.Shared.Timing.Timer;
|
||||
|
||||
namespace Content.Server._White.Cult.Items.Systems;
|
||||
|
||||
@@ -20,6 +20,7 @@ using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Timing;
|
||||
using CultistComponent = Content.Shared._White.Cult.Components.CultistComponent;
|
||||
|
||||
namespace Content.Server._White.Cult.Pylon;
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ using Content.Shared._White.Cult.Actions;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Player;
|
||||
using CultistComponent = Content.Shared._White.Cult.Components.CultistComponent;
|
||||
|
||||
namespace Content.Server._White.Cult.Runes.Systems;
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ using Content.Shared.Interaction;
|
||||
using Content.Shared.Stealth.Components;
|
||||
using Content.Shared._White.Cult;
|
||||
using Robust.Server.GameObjects;
|
||||
using CultistComponent = Content.Shared._White.Cult.Components.CultistComponent;
|
||||
|
||||
namespace Content.Server._White.Cult.Runes.Systems;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ using Content.Shared.Maps;
|
||||
using Content.Shared._White.Cult;
|
||||
using Content.Shared._White.Cult.Components;
|
||||
using Robust.Shared.Map;
|
||||
using CultistComponent = Content.Shared._White.Cult.Components.CultistComponent;
|
||||
|
||||
namespace Content.Server._White.Cult.Runes.Systems;
|
||||
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
using Content.Shared.Containers.ItemSlots;
|
||||
using Content.Shared.Mind;
|
||||
using Content.Shared.Mind.Components;
|
||||
using Content.Shared._White.Cult.Runes.Components;
|
||||
using Content.Shared._White.Cult.UI;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
using ConstructShellComponent = Content.Shared._White.Cult.Components.ConstructShellComponent;
|
||||
|
||||
namespace Content.Server._White.Cult.Runes.Systems;
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
using System.Linq;
|
||||
using Content.Server.GameTicking;
|
||||
using Content.Server.GameTicking;
|
||||
using Content.Server.GameTicking.Rules.Components;
|
||||
using Content.Server.Maps;
|
||||
using Content.Server.Popups;
|
||||
using Content.Server._White.Cult.GameRule;
|
||||
using Content.Server._White.IncorporealSystem;
|
||||
@@ -25,6 +23,7 @@ public partial class CultSystem
|
||||
[Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!;
|
||||
[Dependency] private readonly SharedActionsSystem _actionsSystem = default!;
|
||||
[Dependency] private readonly GameTicker _gameTicker = default!;
|
||||
[Dependency] private readonly ActionContainerSystem _actionContainer = default!;
|
||||
|
||||
public void InitializeConstructsAbilities()
|
||||
{
|
||||
@@ -39,17 +38,22 @@ public partial class CultSystem
|
||||
|
||||
SubscribeLocalEvent<JuggernautCreateWallActionEvent>(OnJuggernautCreateWall);
|
||||
|
||||
SubscribeLocalEvent<ConstructComponent, MapInitEvent>(OnMapInit);
|
||||
SubscribeLocalEvent<ConstructComponent, ComponentInit>(OnConstructInit);
|
||||
SubscribeLocalEvent<ConstructComponent, ComponentRemove>(OnConstructComponentRemoved);
|
||||
}
|
||||
|
||||
private void OnMapInit(EntityUid uid, ConstructComponent component, MapInitEvent args)
|
||||
{
|
||||
var comp = EnsureComp<ActionsContainerComponent>(uid);
|
||||
foreach (var id in component.Actions)
|
||||
{
|
||||
_actionContainer.AddAction(uid, id, comp);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnConstructInit(EntityUid uid, ConstructComponent component, ComponentInit args)
|
||||
{
|
||||
foreach (var action in component.Actions)
|
||||
{
|
||||
_actionsSystem.AddAction(uid, action, uid);
|
||||
}
|
||||
|
||||
var query = EntityQueryEnumerator<CultRuleComponent, GameRuleComponent>();
|
||||
|
||||
while (query.MoveNext(out var ruleEnt, out var cultRuleComponent, out _))
|
||||
|
||||
@@ -40,6 +40,7 @@ using Robust.Shared.Map;
|
||||
using Robust.Shared.Physics.Events;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Random;
|
||||
using CultistComponent = Content.Shared._White.Cult.Components.CultistComponent;
|
||||
|
||||
namespace Content.Server._White.Cult.Runes.Systems;
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Roles;
|
||||
using Content.Shared._White.Cult;
|
||||
using Content.Shared._White.Cult.Items;
|
||||
using CultistComponent = Content.Shared._White.Cult.Components.CultistComponent;
|
||||
|
||||
namespace Content.Server._White.Cult.Runes.Systems;
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ using Content.Shared._White.Cult;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Player;
|
||||
using CultistComponent = Content.Shared._White.Cult.Components.CultistComponent;
|
||||
|
||||
namespace Content.Server._White.Cult.Structures;
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Shared.Humanoid;
|
||||
using Content.Shared.Stunnable;
|
||||
using Content.Shared._White.Cult;
|
||||
using Robust.Shared.Physics.Systems;
|
||||
using CultistComponent = Content.Shared._White.Cult.Components.CultistComponent;
|
||||
|
||||
namespace Content.Server._White.Cult.Structures;
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Timing;
|
||||
using CultistComponent = Content.Shared._White.Cult.Components.CultistComponent;
|
||||
|
||||
namespace Content.Server._White.Cult.TimedProduction;
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ public sealed class ERTRecruitmentRule : StationEventSystem<ERTRecruitmentRuleCo
|
||||
|
||||
if (_recruitment.GetEventSpawners(ERTRecruitmentRuleComponent.EventName).Count() < component.MinPlayer)
|
||||
{
|
||||
_logger.Error("Not enough spawners!");
|
||||
_logger.Debug("Not enough spawners!");
|
||||
|
||||
DeclineERT(component.TargetStation.Value);
|
||||
return;
|
||||
|
||||
@@ -10,7 +10,6 @@ using Content.Shared.Movement.Systems;
|
||||
using Content.Shared._White.Mood;
|
||||
using Content.Shared._White.Overlays;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Timer = Robust.Shared.Timing.Timer;
|
||||
@@ -56,7 +55,8 @@ public sealed class MoodSystem : EntitySystem
|
||||
|
||||
private void OnRefreshMoveSpeed(EntityUid uid, MoodComponent component, RefreshMovementSpeedModifiersEvent args)
|
||||
{
|
||||
if (component.CurrentMoodThreshold is > MoodThreshold.VeryBad and < MoodThreshold.VeryGood or MoodThreshold.Dead)
|
||||
if (component.CurrentMoodThreshold is > MoodThreshold.VeryBad and < MoodThreshold.VeryGood
|
||||
or MoodThreshold.Dead)
|
||||
return;
|
||||
|
||||
if (_jetpack.IsUserFlying(uid))
|
||||
@@ -65,8 +65,8 @@ public sealed class MoodSystem : EntitySystem
|
||||
var modifier = GetMovementThreshold(component.CurrentMoodThreshold) switch
|
||||
{
|
||||
-1 => component.SlowdownSpeedModifier,
|
||||
1 => component.IncreaseSpeedModifier,
|
||||
_ => 1
|
||||
1 => component.IncreaseSpeedModifier,
|
||||
_ => 1
|
||||
};
|
||||
|
||||
args.ModifySpeed(modifier, modifier);
|
||||
@@ -100,7 +100,9 @@ public sealed class MoodSystem : EntitySystem
|
||||
if (!component.MoodChangeValues.TryGetValue(oldPrototype.MoodChange, out var oldValue))
|
||||
return;
|
||||
|
||||
amount += (oldPrototype.PositiveEffect ? -oldValue : oldValue) + (prototype.PositiveEffect ? value : -value);
|
||||
amount += (oldPrototype.PositiveEffect ? -oldValue : oldValue) +
|
||||
(prototype.PositiveEffect ? value : -value);
|
||||
|
||||
component.CategorisedEffects[prototype.Category] = prototype.ID;
|
||||
}
|
||||
}
|
||||
@@ -111,7 +113,10 @@ public sealed class MoodSystem : EntitySystem
|
||||
}
|
||||
|
||||
if (prototype.Timeout != 0)
|
||||
Timer.Spawn(TimeSpan.FromMinutes(prototype.Timeout), () => RemoveTimedOutEffect(uid, prototype.ID, prototype.Category));
|
||||
{
|
||||
Timer.Spawn(TimeSpan.FromMinutes(prototype.Timeout),
|
||||
() => RemoveTimedOutEffect(uid, prototype.ID, prototype.Category));
|
||||
}
|
||||
}
|
||||
//Apply uncategorised effect
|
||||
else
|
||||
@@ -150,10 +155,13 @@ public sealed class MoodSystem : EntitySystem
|
||||
{
|
||||
if (!comp.CategorisedEffects.TryGetValue(category, out var currentProtoId))
|
||||
return;
|
||||
|
||||
if (currentProtoId != prototypeId)
|
||||
return;
|
||||
|
||||
if (!_prototypeManager.TryIndex<MoodEffectPrototype>(currentProtoId, out var currentProto))
|
||||
return;
|
||||
|
||||
if (!comp.MoodChangeValues.TryGetValue(currentProto.MoodChange, out var value))
|
||||
return;
|
||||
|
||||
@@ -202,15 +210,28 @@ public sealed class MoodSystem : EntitySystem
|
||||
|
||||
private void OnInit(EntityUid uid, MoodComponent component, ComponentInit args)
|
||||
{
|
||||
_mobThreshold.TryGetThresholdForState(uid, MobState.Critical, out var critThreshold);
|
||||
if (critThreshold != null)
|
||||
component.CritThresholdBeforeModify = critThreshold.Value;
|
||||
if (!TryComp(uid, out MobThresholdsComponent? thresholdsComponent))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_mobThreshold.TryGetThresholdForState(uid, MobState.Critical, out var critThreshold, thresholdsComponent))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
component.CritThresholdBeforeModify = critThreshold.Value;
|
||||
|
||||
var amount = component.MoodThresholds[MoodThreshold.Neutral];
|
||||
SetMood(uid, amount, component, refresh: true);
|
||||
}
|
||||
|
||||
public void SetMood(EntityUid uid, float amount, MoodComponent? component = null, bool force = false, bool refresh = false)
|
||||
public void SetMood(
|
||||
EntityUid uid,
|
||||
float amount,
|
||||
MoodComponent? component = null,
|
||||
bool force = false,
|
||||
bool refresh = false)
|
||||
{
|
||||
if (!Resolve(uid, ref component))
|
||||
return;
|
||||
@@ -298,9 +319,9 @@ public sealed class MoodSystem : EntitySystem
|
||||
|
||||
var newKey = modifier switch
|
||||
{
|
||||
1 => FixedPoint2.New(key.Value.Float() * component.IncreaseCritThreshold),
|
||||
1 => FixedPoint2.New(key.Value.Float() * component.IncreaseCritThreshold),
|
||||
-1 => FixedPoint2.New(key.Value.Float() * component.DecreaseCritThreshold),
|
||||
_ => component.CritThresholdBeforeModify
|
||||
_ => component.CritThresholdBeforeModify
|
||||
};
|
||||
|
||||
component.CritThresholdBeforeModify = key.Value;
|
||||
@@ -330,12 +351,12 @@ public sealed class MoodSystem : EntitySystem
|
||||
return threshold switch
|
||||
{
|
||||
>= MoodThreshold.VeryGood => 1,
|
||||
<= MoodThreshold.VeryBad => -1,
|
||||
_ => 0
|
||||
<= MoodThreshold.VeryBad => -1,
|
||||
_ => 0
|
||||
};
|
||||
}
|
||||
|
||||
#region HealthStatusCheck
|
||||
#region HealthStatusCheck
|
||||
|
||||
private void OnDamageChange(EntityUid uid, MoodComponent component, DamageChangedEvent args)
|
||||
{
|
||||
@@ -356,7 +377,7 @@ public sealed class MoodSystem : EntitySystem
|
||||
RaiseLocalEvent(uid, ev);
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
|
||||
[UsedImplicitly]
|
||||
@@ -380,7 +401,7 @@ public sealed partial class ShowMoodEffects : IAlertClick
|
||||
|
||||
var msgStart = Loc.GetString("mood-show-effects-start");
|
||||
chatManager.ChatMessageToOne(ChatChannel.Emotes, msgStart, msgStart, EntityUid.Invalid, false,
|
||||
actorComp.PlayerSession.ConnectedClient);
|
||||
actorComp.PlayerSession.Channel);
|
||||
|
||||
foreach (var (_, protoId) in comp.CategorisedEffects)
|
||||
{
|
||||
@@ -413,6 +434,6 @@ public sealed partial class ShowMoodEffects : IAlertClick
|
||||
var msg = $"[font size=10][color={color}]{proto.Description}[/color][/font]";
|
||||
|
||||
chatManager.ChatMessageToOne(ChatChannel.Emotes, msg, msg, EntityUid.Invalid, false,
|
||||
comp.PlayerSession.ConnectedClient);
|
||||
comp.PlayerSession.Channel);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Server.IdentityManagement;
|
||||
using Content.Server.PDA;
|
||||
using Content.Server.Roles;
|
||||
using Content.Shared.Access.Components;
|
||||
using Content.Shared.Humanoid;
|
||||
using Content.Shared.Inventory;
|
||||
using Content.Shared.Mind.Components;
|
||||
using Content.Shared.NukeOps;
|
||||
@@ -31,9 +32,14 @@ public sealed class RandomHumanSystem : EntitySystem
|
||||
|
||||
private void OnInit(EntityUid uid, RandomHumanComponent component, ComponentInit args)
|
||||
{
|
||||
if (!TryComp(uid, out HumanoidAppearanceComponent? humanoidAppearanceComponent))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var newProfile = HumanoidCharacterProfile.RandomWithSpecies();
|
||||
|
||||
_humanoid.LoadProfile(uid, newProfile);
|
||||
_humanoid.LoadProfile(uid, newProfile, humanoidAppearanceComponent);
|
||||
|
||||
if (HasComp<NukeOperativeComponent>(uid))
|
||||
return;
|
||||
@@ -43,7 +49,8 @@ public sealed class RandomHumanSystem : EntitySystem
|
||||
if (!_inventorySystem.TryGetSlotEntity(uid, "id", out var idUid))
|
||||
return;
|
||||
|
||||
if (!EntityManager.TryGetComponent(idUid, out PdaComponent? pdaComponent) || !TryComp<IdCardComponent>(pdaComponent.ContainedId, out var card))
|
||||
if (!EntityManager.TryGetComponent(idUid, out PdaComponent? pdaComponent) ||
|
||||
!TryComp<IdCardComponent>(pdaComponent.ContainedId, out var card))
|
||||
return;
|
||||
|
||||
var cardId = pdaComponent.ContainedId.Value;
|
||||
|
||||
@@ -15,5 +15,5 @@ public sealed partial class TTSComponent : Component
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("voice", customTypeSerializer:typeof(PrototypeIdSerializer<TTSVoicePrototype>))]
|
||||
public string VoicePrototypeId { get; set; } = string.Empty;
|
||||
public string VoicePrototypeId { get; set; } = "Eugene";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user