diff --git a/Content.Server/Chat/Systems/ChatSystem.cs b/Content.Server/Chat/Systems/ChatSystem.cs index ebf526d7ca..739fa60c22 100644 --- a/Content.Server/Chat/Systems/ChatSystem.cs +++ b/Content.Server/Chat/Systems/ChatSystem.cs @@ -40,6 +40,7 @@ using Robust.Shared.Prototypes; using Robust.Shared.Random; using Robust.Shared.Replays; using Robust.Shared.Utility; +using Content.Shared._Sunrise.TTS; namespace Content.Server.Chat.Systems; @@ -346,7 +347,7 @@ public sealed partial class ChatSystem : SharedChatSystem bool playDefault = true, SoundSpecifier? announcementSound = null, bool playTts = true, // Sunrise-edit, - string? announceVoice = null, // Sunrise-edit + ProtoId? announceVoice = null, // Sunrise-edit Color? colorOverride = null ) { @@ -386,7 +387,7 @@ public sealed partial class ChatSystem : SharedChatSystem string? sender = null, bool playDefault = true, // Sunrise-edit bool playTts = true, // Sunrise-edit - string? announceVoice = null, // Sunrise-edit + ProtoId? announceVoice = null, // Sunrise-edit SoundSpecifier? announcementSound = null, Color? colorOverride = null) { @@ -432,7 +433,7 @@ public sealed partial class ChatSystem : SharedChatSystem string? sender = null, bool playDefault = true, // Sunrise bool playTts = true, // Sunrise - string? announceVoice = null, // Sunrise + ProtoId? announceVoice = null, // Sunrise bool playDefaultSound = true, SoundSpecifier? announcementSound = null, Color? colorOverride = null) diff --git a/Content.Server/Communications/CommunicationsConsoleComponent.cs b/Content.Server/Communications/CommunicationsConsoleComponent.cs index 6735aa3dec..2606d584c6 100644 --- a/Content.Server/Communications/CommunicationsConsoleComponent.cs +++ b/Content.Server/Communications/CommunicationsConsoleComponent.cs @@ -1,7 +1,10 @@ +using Content.Server.Database.Migrations.Postgres; using Content.Server.UserInterface; using Content.Shared._Sunrise.TTS; using Content.Shared.Communications; +using JetBrains.Annotations; using Robust.Shared.Audio; +using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Server.Communications @@ -78,8 +81,8 @@ namespace Content.Server.Communications public bool AnnounceSentBy = false; // Sunrise-Start - [DataField("announceVoice", customTypeSerializer:typeof(PrototypeIdSerializer))] - public string AnnounceVoice = "Hanson"; + [DataField] + public ProtoId? AnnounceVoice = "Hanson"; [ViewVariables] public bool IsRelaying; diff --git a/Content.Server/EnergyDome/EnergyDomeSystem.cs b/Content.Server/EnergyDome/EnergyDomeSystem.cs index 725e072782..6abfaa06c4 100644 --- a/Content.Server/EnergyDome/EnergyDomeSystem.cs +++ b/Content.Server/EnergyDome/EnergyDomeSystem.cs @@ -217,7 +217,7 @@ public sealed partial class EnergyDomeSystem : EntitySystem { _battery.UseCharge(cell.Value.Owner, energyLeak); - if (cell.Value.Comp.ChargeRate == 0) + if (cell.Value.Comp.LastCharge == 0) TurnOff((generatorUid, generatorComp), true); } } @@ -226,7 +226,7 @@ public sealed partial class EnergyDomeSystem : EntitySystem if (TryComp(generatorUid, out var battery)) { _battery.UseCharge(generatorUid, energyLeak); - if (battery.ChargeRate == 0) + if (battery.LastCharge == 0) TurnOff((generatorUid, generatorComp), true); } } @@ -251,58 +251,53 @@ public sealed partial class EnergyDomeSystem : EntitySystem public bool AttemptToggle(Entity generator, bool status) { var parent = Transform(generator.Owner).ParentUid; + if (HasComp(Transform(parent).ParentUid)) + return false; + + if (TryComp(generator, out var useDelay) && + _useDelay.IsDelayed((generator, useDelay))) { + Fail(generator, "energy-dome-recharging"); return false; } - if (TryComp(generator, out var useDelay) && _useDelay.IsDelayed(new (generator, useDelay))) + if (TryComp(generator, out _)) { - _audio.PlayPvs(generator.Comp.TurnOffSound, generator); - _popup.PopupEntity( - Loc.GetString("energy-dome-recharging"), - generator); - return false; - } - - if (TryComp(generator, out var powerCellSlot)) - { - if (!_powerCell.TryGetBatteryFromSlot(generator.Owner, out var cell) && - !HasComp(generator.Owner)) + if (!_powerCell.TryGetBatteryFromSlot(generator.Owner, out _)) { - _audio.PlayPvs(generator.Comp.TurnOffSound, generator); - _popup.PopupEntity( - Loc.GetString("energy-dome-no-cell"), - generator); + Fail(generator, "energy-dome-no-cell"); return false; } if (!_powerCell.HasDrawCharge(generator.Owner)) { - _audio.PlayPvs(generator.Comp.TurnOffSound, generator); - _popup.PopupEntity( - Loc.GetString("energy-dome-no-power"), - generator); + Fail(generator, "energy-dome-no-power"); return false; } } - - if (TryComp(generator, out var battery)) + else if (TryComp(generator, out var battery)) { - if (battery.ChargeRate == 0) + if (battery.LastCharge <= 0) { - _audio.PlayPvs(generator.Comp.TurnOffSound, generator); - _popup.PopupEntity( - Loc.GetString("energy-dome-no-power"), - generator); + Fail(generator, "energy-dome-no-power"); return false; } } + else + { + Fail(generator, "energy-dome-no-power"); + return false; + } Toggle(generator, status); return true; } - + private void Fail(Entity generator, string locKey) + { + _audio.PlayPvs(generator.Comp.TurnOffSound, generator); + _popup.PopupEntity(Loc.GetString(locKey), generator); + } private void Toggle(Entity generator, bool status) { if (status) diff --git a/Content.Server/Mech/Equipment/EntitySystems/MechGunSystem.cs b/Content.Server/Mech/Equipment/EntitySystems/MechGunSystem.cs index 8ea07e6d4b..d8dd3b698c 100644 --- a/Content.Server/Mech/Equipment/EntitySystems/MechGunSystem.cs +++ b/Content.Server/Mech/Equipment/EntitySystems/MechGunSystem.cs @@ -35,7 +35,7 @@ public sealed class MechGunSystem : EntitySystem || !TryComp(mechEquipment.EquipmentOwner.Value, out var mech)) return; - var chargeDelta = component.MaxCharge - component.ChargeRate; + var chargeDelta = component.MaxCharge - component.LastCharge; // TODO: The battery charge of the mech would be spent directly when fired. if (chargeDelta <= 0 || mech.Energy - chargeDelta < 0 diff --git a/Content.Server/Medical/HealthAnalyzerSystem.cs b/Content.Server/Medical/HealthAnalyzerSystem.cs index 6d1d5c6c08..dd337364c8 100644 --- a/Content.Server/Medical/HealthAnalyzerSystem.cs +++ b/Content.Server/Medical/HealthAnalyzerSystem.cs @@ -31,6 +31,7 @@ public sealed class HealthAnalyzerSystem : AbstractAnalyzerSystem public override void UpdateScannedUser(EntityUid healthAnalyzer, EntityUid target, bool scanMode) @@ -64,10 +65,9 @@ public sealed class HealthAnalyzerSystem : AbstractAnalyzerSystem 0; } - // Collect hunger and thirst data as percentages float hungerLevel = -1; float thirstLevel = -1; diff --git a/Content.Server/Ninja/Systems/NinjaSuitDrawSystem.cs b/Content.Server/Ninja/Systems/NinjaSuitDrawSystem.cs index d897918261..c0a561b1a1 100644 --- a/Content.Server/Ninja/Systems/NinjaSuitDrawSystem.cs +++ b/Content.Server/Ninja/Systems/NinjaSuitDrawSystem.cs @@ -104,8 +104,8 @@ public sealed class NinjaSuitDrawSystem : SharedNinjaSuitDrawSystem if (_ninja.GetNinjaBattery(user, out _, out var battery)) { - var canUse = ent.Comp.UseRate <= 0f || battery.ChargeRate >= ent.Comp.UseRate; - var canDraw = ent.Comp.DrawRate <= 0f || battery.ChargeRate > 0f; + var canUse = ent.Comp.UseRate <= 0f || battery.LastCharge >= ent.Comp.UseRate; + var canDraw = ent.Comp.DrawRate <= 0f || battery.LastCharge > 0f; SetPowerStatus(ent, canDraw, canUse); if (!canUse) { @@ -138,7 +138,7 @@ public sealed class NinjaSuitDrawSystem : SharedNinjaSuitDrawSystem if (!_ninja.IsNinja(user)) return false; - return _ninja.GetNinjaBattery(user, out _, out var battery) && battery.ChargeRate > 0f; + return _ninja.GetNinjaBattery(user, out _, out var battery) && battery.LastCharge > 0f; } public override bool CanUse(Entity ent) @@ -148,7 +148,7 @@ public sealed class NinjaSuitDrawSystem : SharedNinjaSuitDrawSystem return false; return _ninja.GetNinjaBattery(user, out _, out var battery) && - (ent.Comp.UseRate <= 0f || battery.ChargeRate >= ent.Comp.UseRate); + (ent.Comp.UseRate <= 0f || battery.LastCharge >= ent.Comp.UseRate); } } diff --git a/Content.Server/Silicons/Borgs/BorgVoiceSystem.cs b/Content.Server/Silicons/Borgs/BorgVoiceSystem.cs index 888cb49b91..5430a44e70 100644 --- a/Content.Server/Silicons/Borgs/BorgVoiceSystem.cs +++ b/Content.Server/Silicons/Borgs/BorgVoiceSystem.cs @@ -125,7 +125,7 @@ public sealed class BorgVoiceSystem : EntitySystem // Use the borg's selected voice instead of the default if (component.SelectedVoiceId != null) { - args.VoiceId = component.SelectedVoiceId; + args.VoiceId = component.SelectedVoiceId.Value; } args.Effect = component.VoiceEffect; } diff --git a/Content.Server/Speech/EmotesMenuSystem.cs b/Content.Server/Speech/EmotesMenuSystem.cs index 6571587b91..d755a7d823 100644 --- a/Content.Server/Speech/EmotesMenuSystem.cs +++ b/Content.Server/Speech/EmotesMenuSystem.cs @@ -1,6 +1,7 @@ using Content.Shared.Chat; using Content.Server.Chat.Systems; using Robust.Shared.Prototypes; +using Content.Shared._Sunrise.Animations; namespace Content.Server.Speech; @@ -22,8 +23,11 @@ public sealed partial class EmotesMenuSystem : EntitySystem if (!player.HasValue) return; - if (!_prototypeManager.Resolve(msg.ProtoId, out var proto) || proto.ChatTriggers.Count == 0) - return; + if (!_prototypeManager.TryIndex(msg.ProtoId, out var proto) || proto.ChatTriggers.Count == 0) + { + if (!HasComp(player)) + return; + } _chat.TryEmoteWithChat(player.Value, msg.ProtoId); } diff --git a/Content.Server/Traitor/Uplink/UplinkSystem.cs b/Content.Server/Traitor/Uplink/UplinkSystem.cs index 793bd6cb33..258088a722 100644 --- a/Content.Server/Traitor/Uplink/UplinkSystem.cs +++ b/Content.Server/Traitor/Uplink/UplinkSystem.cs @@ -129,7 +129,7 @@ public sealed class UplinkSystem : EntitySystem // Sunrtise-Start if (pdaUid == null) - return null; + continue; if (_tagSystem.HasTag(pdaUid.Value, "SunriseUplink")) continue; diff --git a/Content.Server/VoiceMask/VoiceMaskerComponent.cs b/Content.Server/VoiceMask/VoiceMaskerComponent.cs index c87dba8217..5ff1b3efcd 100644 --- a/Content.Server/VoiceMask/VoiceMaskerComponent.cs +++ b/Content.Server/VoiceMask/VoiceMaskerComponent.cs @@ -1,4 +1,6 @@ +using Content.Shared._Sunrise.TTS; using Content.Shared.Humanoid; +using Robust.Shared.Prototypes; namespace Content.Server.VoiceMask; @@ -7,5 +9,5 @@ public sealed partial class VoiceMaskerComponent : Component { [DataField] [ViewVariables(VVAccess.ReadWrite)] - public string VoiceId = SharedHumanoidAppearanceSystem.DefaultVoice; + public ProtoId VoiceId = SharedHumanoidAppearanceSystem.DefaultVoice; } diff --git a/Content.Server/_Sunrise/AnnouncementSpeaker/AnnouncementSpeakerSystem.cs b/Content.Server/_Sunrise/AnnouncementSpeaker/AnnouncementSpeakerSystem.cs index 35631859b0..653b4a4728 100644 --- a/Content.Server/_Sunrise/AnnouncementSpeaker/AnnouncementSpeakerSystem.cs +++ b/Content.Server/_Sunrise/AnnouncementSpeaker/AnnouncementSpeakerSystem.cs @@ -216,7 +216,7 @@ public sealed class AnnouncementSpeakerSystem : EntitySystem /// /// Gets a voice prototype by ID, with fallback to default voice. /// - private bool GetVoicePrototype(string voiceId, [NotNullWhen(true)] out TTSVoicePrototype? voicePrototype) + private bool GetVoicePrototype(ProtoId voiceId, [NotNullWhen(true)] out TTSVoicePrototype? voicePrototype) { if (!_prototypeManager.TryIndex(voiceId, out voicePrototype)) { diff --git a/Content.Server/_Sunrise/EnergyShield/EnergyShieldSystem.cs b/Content.Server/_Sunrise/EnergyShield/EnergyShieldSystem.cs index 9ed958b616..2405efa825 100644 --- a/Content.Server/_Sunrise/EnergyShield/EnergyShieldSystem.cs +++ b/Content.Server/_Sunrise/EnergyShield/EnergyShieldSystem.cs @@ -44,7 +44,7 @@ public sealed class EnergyShieldSystem : EntitySystem _battery.UseCharge(ent.Owner, cost); _audio.PlayPvs(ent.Comp.AbsorbSound, ent); - if (battery.ChargeRate <= 0) + if (battery.LastCharge <= 0) { _itemToggle.Toggle(ent.Owner); _audio.PlayPvs(ent.Comp.ShutdownSound, ent); @@ -54,7 +54,7 @@ public sealed class EnergyShieldSystem : EntitySystem private void OnToggleAttempt(Entity ent, ref ItemToggleActivateAttemptEvent args) { if (TryComp(ent, out var battery) && - battery.ChargeRate >= battery.MaxCharge * ent.Comp.MinChargeFractionForActivation) + battery.LastCharge >= battery.MaxCharge * ent.Comp.MinChargeFractionForActivation) { return; } diff --git a/Content.Server/_Sunrise/TTS/TTSSystem.cs b/Content.Server/_Sunrise/TTS/TTSSystem.cs index 895ba28bcd..46f9e6c176 100644 --- a/Content.Server/_Sunrise/TTS/TTSSystem.cs +++ b/Content.Server/_Sunrise/TTS/TTSSystem.cs @@ -110,10 +110,10 @@ public sealed partial class TTSSystem : EntitySystem return; var voiceId = senderComponent.VoicePrototypeId; - if (voiceId == null) + if (voiceId == null || string.IsNullOrWhiteSpace(voiceId.Value)) return; - var voiceEv = new TransformSpeakerVoiceEvent(args.Source, voiceId); + var voiceEv = new TransformSpeakerVoiceEvent(args.Source, voiceId.Value); RaiseLocalEvent(args.Source, voiceEv); voiceId = voiceEv.VoiceId; @@ -139,7 +139,7 @@ public sealed partial class TTSSystem : EntitySystem return; var voiceId = collectiveMindProto.VoiceId; - if (voiceId == null) + if (voiceId == null || string.IsNullOrWhiteSpace(voiceId.Value)) return; if (!GetVoicePrototype(voiceId, out var protoVoice)) @@ -159,7 +159,7 @@ public sealed partial class TTSSystem : EntitySystem RaiseNetworkEvent(new PlayTTSEvent(soundData, null, false), recipients); } - private bool GetVoicePrototype(string voiceId, [NotNullWhen(true)] out TTSVoicePrototype? voicePrototype) + private bool GetVoicePrototype(ProtoId? voiceId, [NotNullWhen(true)] out TTSVoicePrototype? voicePrototype) { if (!_prototypeManager.TryIndex(voiceId, out voicePrototype)) { @@ -256,10 +256,10 @@ public sealed partial class TTSSystem : EntitySystem var voiceId = component.VoicePrototypeId; if (!_isEnabled || args.Message.Length > MaxMessageChars || - voiceId == null) + voiceId == null || string.IsNullOrWhiteSpace(voiceId.Value)) return; - var voiceEv = new TransformSpeakerVoiceEvent(uid, voiceId); + var voiceEv = new TransformSpeakerVoiceEvent(uid, voiceId.Value); RaiseLocalEvent(uid, voiceEv); voiceId = voiceEv.VoiceId; @@ -368,10 +368,10 @@ public sealed partial class TTSSystem : EntitySystem public sealed class TransformSpeakerVoiceEvent : EntityEventArgs { public EntityUid Sender; - public string VoiceId; + public ProtoId VoiceId; public string? Effect; - public TransformSpeakerVoiceEvent(EntityUid sender, string voiceId, string? effect = null) + public TransformSpeakerVoiceEvent(EntityUid sender, ProtoId voiceId, string? effect = null) { Sender = sender; VoiceId = voiceId; diff --git a/Content.Server/_Sunrise/Weapons/Melee/Systems/PowerDrainOnMeleeHitSystem.cs b/Content.Server/_Sunrise/Weapons/Melee/Systems/PowerDrainOnMeleeHitSystem.cs index 604a5d6986..a956f07539 100644 --- a/Content.Server/_Sunrise/Weapons/Melee/Systems/PowerDrainOnMeleeHitSystem.cs +++ b/Content.Server/_Sunrise/Weapons/Melee/Systems/PowerDrainOnMeleeHitSystem.cs @@ -55,7 +55,7 @@ public sealed class PowerDrainOnMeleeHitSystem : EntitySystem // Fall back to direct BatteryComponent on the same entity if (TryComp(uid, out var directBattery)) { - if (directBattery.ChargeRate < comp.ChargePerHit) + if (directBattery.LastCharge < comp.ChargePerHit) { args.Handled = true; return; diff --git a/Content.Shared/Chat/SharedChatSystem.cs b/Content.Shared/Chat/SharedChatSystem.cs index 7ef2bc3999..66d0b39a89 100644 --- a/Content.Shared/Chat/SharedChatSystem.cs +++ b/Content.Shared/Chat/SharedChatSystem.cs @@ -15,6 +15,7 @@ using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Random; using Robust.Shared.Utility; +using Content.Shared._Sunrise.TTS; namespace Content.Shared.Chat; @@ -470,7 +471,7 @@ public abstract partial class SharedChatSystem : EntitySystem bool playSound = true, SoundSpecifier? announcementSound = null, bool playTts = true, // Sunrise-edit - string? announceVoice = null, // Sunrise-edit + ProtoId? announceVoice = null, // Sunrise-edit Color? colorOverride = null ) { } @@ -492,7 +493,7 @@ public abstract partial class SharedChatSystem : EntitySystem string? sender = null, bool playSound = true, bool playTts = true, // Sunrise-edit - string? announceVoice = null, // Sunrise-edit + ProtoId? announceVoice = null, // Sunrise-edit SoundSpecifier? announcementSound = null, Color? colorOverride = null) { } @@ -512,7 +513,7 @@ public abstract partial class SharedChatSystem : EntitySystem string? sender = null, bool playDefault = true, // Sunrise bool playTts = true, // Sunrise - string? announceVoice = null, // Sunrise + ProtoId? announceVoice = null, // Sunrise bool playDefaultSound = true, SoundSpecifier? announcementSound = null, Color? colorOverride = null) diff --git a/Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs b/Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs index ec66630870..eee273af09 100644 --- a/Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs +++ b/Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs @@ -586,7 +586,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem // Sunrise-TTS-Start // ReSharper disable once InconsistentNaming - public void SetTTSVoice(EntityUid uid, string voiceId, HumanoidAppearanceComponent humanoid) + public void SetTTSVoice(EntityUid uid, ProtoId voiceId, HumanoidAppearanceComponent humanoid) { if (!TryComp(uid, out var comp)) return; diff --git a/Content.Shared/Preferences/HumanoidCharacterProfile.cs b/Content.Shared/Preferences/HumanoidCharacterProfile.cs index 3219bf9fb8..07a08834ce 100644 --- a/Content.Shared/Preferences/HumanoidCharacterProfile.cs +++ b/Content.Shared/Preferences/HumanoidCharacterProfile.cs @@ -78,7 +78,7 @@ namespace Content.Shared.Preferences public ProtoId Species { get; set; } = SharedHumanoidAppearanceSystem.DefaultSpecies; [DataField] - public string Voice { get; set; } = SharedHumanoidAppearanceSystem.DefaultVoice; + public ProtoId Voice { get; set; } = SharedHumanoidAppearanceSystem.DefaultVoice; [DataField] public int Age { get; set; } = 18; diff --git a/Content.Shared/_Sunrise/CollectiveMind/CollectiveMindPrototype.cs b/Content.Shared/_Sunrise/CollectiveMind/CollectiveMindPrototype.cs index e17233ceda..4c53885459 100644 --- a/Content.Shared/_Sunrise/CollectiveMind/CollectiveMindPrototype.cs +++ b/Content.Shared/_Sunrise/CollectiveMind/CollectiveMindPrototype.cs @@ -1,3 +1,4 @@ +using Content.Shared._Sunrise.TTS; using Robust.Shared.Prototypes; namespace Content.Shared._Sunrise.CollectiveMind; @@ -18,7 +19,7 @@ public sealed partial class CollectiveMindPrototype : IPrototype public Color Color { get; private set; } = Color.Lime; [DataField("voiceId")] - public string? VoiceId { get; private set; } = null; + public ProtoId? VoiceId; [DataField("showAuthor")] public bool ShowAuthor { get; private set; } = false; diff --git a/Content.Server/_Sunrise/Emp/EmpImmuneComponent.cs b/Content.Shared/_Sunrise/Emp/EmpImmuneComponent.cs similarity index 72% rename from Content.Server/_Sunrise/Emp/EmpImmuneComponent.cs rename to Content.Shared/_Sunrise/Emp/EmpImmuneComponent.cs index da98ee891d..1ff1d1a52d 100644 --- a/Content.Server/_Sunrise/Emp/EmpImmuneComponent.cs +++ b/Content.Shared/_Sunrise/Emp/EmpImmuneComponent.cs @@ -1,6 +1,6 @@ -using Content.Server._Sunrise.Emp; +using Content.Shared._Sunrise.Emp; -namespace Content.Server.Emp; +namespace Content.Shared._Sunrise.Emp; /// /// Upon being triggered will EMP area around it. @@ -9,5 +9,4 @@ namespace Content.Server.Emp; [Access(typeof(EmpImmuneSystem))] public sealed partial class EmpImmuneComponent : Component { - } diff --git a/Content.Server/_Sunrise/Emp/EmpImmuneSystem.cs b/Content.Shared/_Sunrise/Emp/EmpImmuneSystem.cs similarity index 64% rename from Content.Server/_Sunrise/Emp/EmpImmuneSystem.cs rename to Content.Shared/_Sunrise/Emp/EmpImmuneSystem.cs index 6ef9252e38..3a0c73dcad 100644 --- a/Content.Server/_Sunrise/Emp/EmpImmuneSystem.cs +++ b/Content.Shared/_Sunrise/Emp/EmpImmuneSystem.cs @@ -1,7 +1,6 @@ -using Content.Server.Emp; using Content.Shared.Emp; -namespace Content.Server._Sunrise.Emp; +namespace Content.Shared._Sunrise.Emp; public sealed class EmpImmuneSystem : EntitySystem { @@ -13,7 +12,7 @@ public sealed class EmpImmuneSystem : EntitySystem SubscribeLocalEvent(OnEmpAttempt); } - private void OnEmpAttempt(EntityUid uid, EmpImmuneComponent comp, EmpAttemptEvent args) + private void OnEmpAttempt(Entity ent, ref EmpAttemptEvent args) { args.Cancelled = true; } diff --git a/Content.Shared/_Sunrise/TTS/TTSComponent.cs b/Content.Shared/_Sunrise/TTS/TTSComponent.cs index 5c37efc25f..38bea37f63 100644 --- a/Content.Shared/_Sunrise/TTS/TTSComponent.cs +++ b/Content.Shared/_Sunrise/TTS/TTSComponent.cs @@ -1,4 +1,5 @@ using Robust.Shared.GameStates; +using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Shared._Sunrise.TTS; @@ -13,7 +14,6 @@ public sealed partial class TTSComponent : Component /// /// Prototype of used voice for TTS. /// - [ViewVariables(VVAccess.ReadWrite)] - [DataField("voice", customTypeSerializer: typeof(PrototypeIdSerializer))] - public string? VoicePrototypeId { get; set; } = "Voljin"; // Fish-edit: Default voice when component is freshly added + [DataField("voice")] + public ProtoId? VoicePrototypeId; } diff --git a/Content.Shared/_Sunrise/TTS/TTSVoicePrototype.cs b/Content.Shared/_Sunrise/TTS/TTSVoicePrototype.cs index f3fc7a04c4..6c64aee406 100644 --- a/Content.Shared/_Sunrise/TTS/TTSVoicePrototype.cs +++ b/Content.Shared/_Sunrise/TTS/TTSVoicePrototype.cs @@ -6,6 +6,7 @@ namespace Content.Shared._Sunrise.TTS; [Prototype("ttsVoice")] public sealed partial class TTSVoicePrototype : IPrototype { + [ViewVariables] [IdDataField] public string ID { get; private set; } = default!; @@ -15,11 +16,9 @@ public sealed partial class TTSVoicePrototype : IPrototype [DataField(required: true)] public Sex Sex; - [ViewVariables(VVAccess.ReadWrite)] [DataField(required: true)] public string Speaker = string.Empty; - [ViewVariables(VVAccess.ReadWrite)] [DataField(required: true)] public string Provider = string.Empty; diff --git a/Resources/Locale/ru-RU/_prototypes/entities/structures/wallmounts/wallmountmachines/air_alarm.ftl b/Resources/Locale/ru-RU/_prototypes/entities/structures/wallmounts/wallmountmachines/air_alarm.ftl index a523557db2..761fc636ea 100644 --- a/Resources/Locale/ru-RU/_prototypes/entities/structures/wallmounts/wallmountmachines/air_alarm.ftl +++ b/Resources/Locale/ru-RU/_prototypes/entities/structures/wallmounts/wallmountmachines/air_alarm.ftl @@ -1,8 +1,8 @@ -ent-AirAlarm = сирена воздушной тревоги +ent-AirAlarm = воздушная тревога .desc = Сирена воздушной тревоги. Тревога... воздух? ent-AirAlarmAssembly = сборочный модуль сирены воздушной тревоги .desc = Сборочный модуль сирены воздушной тревоги. Не похоже, что она будет тревожить воздух в ближайшее время. -ent-AirAlarmXeno = сирена воздушной тревоги +ent-AirAlarmXeno = воздушная тревога .desc = Инопланетная сирена воздушной тревоги. Надеюсь, они не дышали ядом. ent-AirAlarmAssemblyXeno = сборочный модуль сирены воздушной тревоги - .desc = Инопланетная сирена воздушной тревоги. Почему провода пульсируют?... \ No newline at end of file + .desc = Инопланетная сирена воздушной тревоги. Почему провода пульсируют?... diff --git a/Resources/Locale/ru-RU/_strings/atmos/atmos-alerts-console.ftl b/Resources/Locale/ru-RU/_strings/atmos/atmos-alerts-console.ftl index 3f548f47ac..72d2c896bc 100644 --- a/Resources/Locale/ru-RU/_strings/atmos/atmos-alerts-console.ftl +++ b/Resources/Locale/ru-RU/_strings/atmos/atmos-alerts-console.ftl @@ -3,8 +3,8 @@ atmos-alerts-window-station-name = [color=white][font size=14]{ $stationName }[/ atmos-alerts-window-unknown-location = Неизвестное местоположение atmos-alerts-window-tab-no-alerts = Предупреждения atmos-alerts-window-tab-alerts = Предупреждения ({ $value }) -atmos-alerts-window-tab-air-alarms = Воздушные тревоги -atmos-alerts-window-tab-fire-alarms = Пожарные тревоги +atmos-alerts-window-tab-air-alarms = Воздушные +atmos-alerts-window-tab-fire-alarms = Пожарные atmos-alerts-window-alarm-label = { CAPITALIZE($name) } ({ $address }) atmos-alerts-window-temperature-label = Температура atmos-alerts-window-temperature-value = { $valueInC } °C ({ $valueInK } K) diff --git a/Resources/Prototypes/Entities/Mobs/Species/base.yml b/Resources/Prototypes/Entities/Mobs/Species/base.yml index 8193ebbeb8..f08848cab6 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/base.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/base.yml @@ -248,6 +248,7 @@ - type: CognizinFix - type: InjectNeed - type: CanJump + isOnlyEmotion: false - type: CanFall # Sunrise-End diff --git a/Resources/Prototypes/Entities/Objects/Misc/paper.yml b/Resources/Prototypes/Entities/Objects/Misc/paper.yml index 3c37fd264a..8e42c04f03 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/paper.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/paper.yml @@ -65,6 +65,7 @@ - type: EmitSoundOnUse sound: path: /Audio/_Sunrise/Items/Handling/paper_use.ogg + handle: false - type: EmitSoundOnCollide sound: path: /Audio/_Sunrise/Items/Handling/paper_drop.ogg diff --git a/Resources/Prototypes/Entities/Objects/Tools/energydome.yml b/Resources/Prototypes/Entities/Objects/Tools/energydome.yml index 75ff14af9c..a46ba8ec8b 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/energydome.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/energydome.yml @@ -99,82 +99,3 @@ - Toggle - On - Off - -- type: entity - id: EnergyDomeWiredTest - name: Static Dome - description: Test energy barrier powered by station wiring. I don't know how the hell to balance it..... - parent: BaseMachine - suffix: DO NOT MERGE - placement: - mode: SnapgridCenter - components: - - type: Transform - anchored: true - - type: Physics - bodyType: Static - - type: Fixtures - fixtures: - fix1: - shape: - !type:PhysShapeAabb - bounds: "-0.45,-0.45,0.45,0.45" - density: 190 - mask: - - MachineMask - layer: - - MachineLayer - - type: Sprite - sprite: Structures/Power/Generation/Tesla/coil.rsi - snapCardinals: true - noRot: true - layers: - - state: coil - - type: ExaminableBattery - - type: Battery - maxCharge: 30000 #<- max supply - startingCharge: 10000 - - type: PowerNetworkBattery - maxSupply: 30000 - maxChargeRate: 1000 #<- passive charging frow power net - supplyRampTolerance: 500 - supplyRampRate: 50 - netsync: false # Sunrise edit - - type: BatteryCharger - voltage: Medium - - type: NodeContainer - examinable: true - nodes: - input: - !type:CableDeviceNode - nodeGroupID: MVPower - - type: BatterySelfRecharger - autoRechargeRate: -800 #<- discharge per second while active - - type: Damageable - damageContainer: Inorganic - damageModifierSet: Metallic - - type: Destructible - thresholds: - - trigger: - !type:DamageTrigger - damage: 200 - behaviors: - - !type:DoActsBehavior - acts: [ "Destruction" ] - - type: UseDelay - delay: 30.0 - - type: DeviceNetwork - deviceNetId: Wireless - receiveFrequencyId: BasicDevice - - type: WirelessNetworkConnection - range: 200 - - type: DeviceLinkSink - ports: - - Toggle - - On - - Off - - type: EnergyDomeGenerator - enabled: true - damageEnergyDraw: 100 - domePrototype: EnergyDomeSlowing - canDeviceNetworkUse: true diff --git a/Resources/migration.yml b/Resources/migration.yml index 6bb02276fa..0fdc5de03f 100644 --- a/Resources/migration.yml +++ b/Resources/migration.yml @@ -946,4 +946,6 @@ GrenadeFlashTimer: null ImplantExtractorMachineCircuitboard: InterrogatorMachineCircuitboard +# 2026-01-02 +EnergyDomeWiredTest: null # Sunrise-End