From 07bb3cae88b1dd2015036aafe4a63514fb3f60b3 Mon Sep 17 00:00:00 2001 From: Aviu00 <93730715+Aviu00@users.noreply.github.com> Date: Wed, 7 Feb 2024 00:41:09 +0900 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=D1=8B=20=D0=B8=20?= =?UTF-8?q?=D1=82=D0=B2=D0=B8=D0=BA=D0=B8=20(#29)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * - fix: Fix speech verbs * - fix: Fix ling chat * - add: Chemical check before regeneration * - tweak: Tweak ling armor * - tweak: Tweak fleshmend * - tweak: Stims no longer satiate hunger & thirst * - add: New bleed alert * - fix: Add missing bool --- .../UserInterface/Systems/Chat/ChatUIController.cs | 10 ++++++++-- Content.Server/Body/Systems/BloodstreamSystem.cs | 14 ++++++++------ .../Changeling/ChangelingSystem.Abilities.cs | 14 ++++++++++++-- .../Locale/ru-RU/chat/managers/chat-manager.ftl | 2 +- .../Prototypes/Catalog/changeling_catalog.yml | 2 +- .../Entities/Clothing/OuterClothing/armor.yml | 11 ++++++++++- Resources/Prototypes/Reagents/narcotics.yml | 8 -------- Resources/Prototypes/Voice/speech_emotes.yml | 8 ++++---- Resources/Prototypes/Voice/speech_verbs.yml | 4 +--- 9 files changed, 45 insertions(+), 28 deletions(-) diff --git a/Content.Client/UserInterface/Systems/Chat/ChatUIController.cs b/Content.Client/UserInterface/Systems/Chat/ChatUIController.cs index 82e38ecb35..6fdd8791b4 100644 --- a/Content.Client/UserInterface/Systems/Chat/ChatUIController.cs +++ b/Content.Client/UserInterface/Systems/Chat/ChatUIController.cs @@ -547,12 +547,18 @@ public sealed class ChatUIController : UIController } // WD EDIT - var localEnt = _player.LocalPlayer != null ? _player.LocalPlayer.ControlledEntity : null; - if (_entities.TryGetComponent(localEnt, out CultistComponent? comp)) + var localEnt = _player.LocalEntity; + if (_entities.HasComponent(localEnt)) { FilterableChannels |= ChatChannel.Cult; CanSendChannels |= ChatSelectChannel.Cult; } + + if (_entities.HasComponent(localEnt)) + { + FilterableChannels |= ChatChannel.Changeling; + CanSendChannels |= ChatSelectChannel.Changeling; + } // WD EDIT END SelectableChannels = CanSendChannels; diff --git a/Content.Server/Body/Systems/BloodstreamSystem.cs b/Content.Server/Body/Systems/BloodstreamSystem.cs index 2ffd0b260e..1f04431eaf 100644 --- a/Content.Server/Body/Systems/BloodstreamSystem.cs +++ b/Content.Server/Body/Systems/BloodstreamSystem.cs @@ -107,12 +107,6 @@ public sealed class BloodstreamSystem : EntitySystem if (!_solutionContainerSystem.ResolveSolution(uid, bloodstream.BloodSolutionName, ref bloodstream.BloodSolution, out var bloodSolution)) continue; - //WD-EDIT - if (bloodstream.IsBleeding) - _alertsSystem.ShowAlert(uid, AlertType.Bleeding); - else - _alertsSystem.ClearAlert(uid, AlertType.Bleeding); - //WD-EDIT // Adds blood to their blood level if it is below the maximum; Blood regeneration. Must be alive. if (bloodSolution.Volume < bloodSolution.MaxVolume && !_mobStateSystem.IsDead(uid)) @@ -391,6 +385,14 @@ public sealed class BloodstreamSystem : EntitySystem component.BleedAmount += amount; component.BleedAmount = Math.Clamp(component.BleedAmount, 0, component.MaxBleedAmount); + if (component.BleedAmount == 0) + _alertsSystem.ClearAlert(uid, AlertType.Bleed); + else + { + var severity = (short) Math.Clamp(Math.Round(component.BleedAmount, MidpointRounding.ToZero), 0, 10); + _alertsSystem.ShowAlert(uid, AlertType.Bleed, severity); + } + return true; } diff --git a/Content.Server/Changeling/ChangelingSystem.Abilities.cs b/Content.Server/Changeling/ChangelingSystem.Abilities.cs index d4f77c7c2f..d8403d6ae4 100644 --- a/Content.Server/Changeling/ChangelingSystem.Abilities.cs +++ b/Content.Server/Changeling/ChangelingSystem.Abilities.cs @@ -1,5 +1,7 @@ using System.Linq; using Content.Server.Administration.Systems; +using Content.Server.Body.Components; +using Content.Server.Body.Systems; using Content.Server.DoAfter; using Content.Server.Forensics; using Content.Server.Humanoid; @@ -61,6 +63,7 @@ public sealed partial class ChangelingSystem [Dependency] private readonly ActionContainerSystem _actionContainerSystem = default!; [Dependency] private readonly SharedPullingSystem _pullingSystem = default!; [Dependency] private readonly MindSystem _mindSystem = default!; + [Dependency] private readonly BloodstreamSystem _blood = default!; private void InitializeAbilities() @@ -228,6 +231,12 @@ public sealed partial class ChangelingSystem if (!TryComp(uid, out var damageableComponent)) return; + if (component.ChemicalsBalance < 15) + { + _popup.PopupEntity("We're lacking of chemicals!", uid, uid); + return; + } + if (damageableComponent.TotalDamage >= 0 && !_mobStateSystem.IsDead(uid)) { KillUser(uid, "Cellular"); @@ -433,8 +442,9 @@ public sealed partial class ChangelingSystem if (!TakeChemicals(uid, component, 20)) return; - _solutionContainer.TryAddReagent(injectable.Value, "Omnizine", 50); - _solutionContainer.TryAddReagent(injectable.Value, "TranexamicAcid", 10); + _solutionContainer.TryAddReagent(injectable.Value, "Omnizine", 25); + if (TryComp(uid, out BloodstreamComponent? bloodstream)) + _blood.TryModifyBleedAmount(uid, -bloodstream.BleedAmount, bloodstream); args.Handled = true; } diff --git a/Resources/Locale/ru-RU/chat/managers/chat-manager.ftl b/Resources/Locale/ru-RU/chat/managers/chat-manager.ftl index d48c131d46..2964ea7c23 100644 --- a/Resources/Locale/ru-RU/chat/managers/chat-manager.ftl +++ b/Resources/Locale/ru-RU/chat/managers/chat-manager.ftl @@ -85,7 +85,7 @@ chat-speech-verb-skeleton-1 = гремит chat-speech-verb-skeleton-2 = щелкает chat-speech-verb-skeleton-3 = скрежет -chat-speech-verb-canine-1 = гафкает +chat-speech-verb-canine-1 = гавкает chat-speech-verb-canine-2 = лает chat-speech-verb-canine-3 = воет diff --git a/Resources/Prototypes/Catalog/changeling_catalog.yml b/Resources/Prototypes/Catalog/changeling_catalog.yml index 475d3a93af..6bab595f0d 100644 --- a/Resources/Prototypes/Catalog/changeling_catalog.yml +++ b/Resources/Prototypes/Catalog/changeling_catalog.yml @@ -44,7 +44,7 @@ description: Inflates the changeling's body into an all-consuming chitinous mass of armor. productAction: ActionArmor cost: - ChangelingPoint: 4 + ChangelingPoint: 1 categories: - ChangelingAbilities conditions: diff --git a/Resources/Prototypes/Entities/Clothing/OuterClothing/armor.yml b/Resources/Prototypes/Entities/Clothing/OuterClothing/armor.yml index aba1c7399a..a826bd5586 100644 --- a/Resources/Prototypes/Entities/Clothing/OuterClothing/armor.yml +++ b/Resources/Prototypes/Entities/Clothing/OuterClothing/armor.yml @@ -153,7 +153,7 @@ - type: GiftIgnore - type: entity - parent: ClothingOuterArmorHeavy + parent: ClothingOuterBaseLarge id: ClothingOuterChangeling name: chitinous armor description: Chitinous and flesh mass of armor. @@ -162,6 +162,15 @@ sprite: Clothing/OuterClothing/Armor/changeling.rsi - type: Clothing sprite: Clothing/OuterClothing/Armor/changeling.rsi + - type: Armor + modifiers: + coefficients: + Blunt: 0.5 + Slash: 0.5 + Piercing: 0.6 + Heat: 0.5 + - type: ExplosionResistance + damageCoefficient: 0.9 - type: Unremoveable deleteOnDrop: true diff --git a/Resources/Prototypes/Reagents/narcotics.yml b/Resources/Prototypes/Reagents/narcotics.yml index a64f455883..11b5fb1376 100644 --- a/Resources/Prototypes/Reagents/narcotics.yml +++ b/Resources/Prototypes/Reagents/narcotics.yml @@ -133,10 +133,6 @@ metabolismRate: 0.2 effects: - !type:ResetNarcolepsy - - !type:SatiateHunger - factor: 1 - - !type:SatiateThirst - factor: 1 - !type:HealthChange conditions: - !type:TotalDamage @@ -230,10 +226,6 @@ metabolismRate: 0.25 effects: - !type:ResetNarcolepsy - - !type:SatiateHunger - factor: 1 - - !type:SatiateThirst - factor: 1 - !type:HealthChange conditions: - !type:ReagentThreshold diff --git a/Resources/Prototypes/Voice/speech_emotes.yml b/Resources/Prototypes/Voice/speech_emotes.yml index 5f9ce2bb62..730ae3a0af 100644 --- a/Resources/Prototypes/Voice/speech_emotes.yml +++ b/Resources/Prototypes/Voice/speech_emotes.yml @@ -97,14 +97,14 @@ - type: emote id: Chitter category: Vocal - chatMessages: [ тарахтит ] + chatMessages: [ стрекочет ] chatTriggers: + - стрекочет + - стрекочет. + - стрекочет! - щебечет - щебечет. - щебечет! - - тарахтит - - тарахтит. - - тарахтит! - type: emote id: Squeak diff --git a/Resources/Prototypes/Voice/speech_verbs.yml b/Resources/Prototypes/Voice/speech_verbs.yml index b849a32a54..0dca3fdfb2 100644 --- a/Resources/Prototypes/Voice/speech_verbs.yml +++ b/Resources/Prototypes/Voice/speech_verbs.yml @@ -1,4 +1,4 @@ -- type: speechVerb +- type: speechVerb id: Default speechVerbStrings: - chat-speech-verb-default @@ -34,7 +34,6 @@ id: Arachnid speechVerbStrings: - chat-speech-verb-insect-1 - - chat-speech-verb-insect-2 - chat-speech-verb-insect-3 - chat-speech-verb-reptilian-1 @@ -58,7 +57,6 @@ - chat-speech-verb-reptilian-1 - chat-speech-verb-reptilian-2 - chat-speech-verb-reptilian-3 - - chat-speech-verb-insect-2 - type: speechVerb id: Skeleton