Фиксы и твики (#29)

* - 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
This commit is contained in:
Aviu00
2024-02-07 00:41:09 +09:00
committed by GitHub
parent 1105109152
commit 07bb3cae88
9 changed files with 45 additions and 28 deletions

View File

@@ -547,12 +547,18 @@ public sealed class ChatUIController : UIController
} }
// WD EDIT // WD EDIT
var localEnt = _player.LocalPlayer != null ? _player.LocalPlayer.ControlledEntity : null; var localEnt = _player.LocalEntity;
if (_entities.TryGetComponent(localEnt, out CultistComponent? comp)) if (_entities.HasComponent<CultistComponent>(localEnt))
{ {
FilterableChannels |= ChatChannel.Cult; FilterableChannels |= ChatChannel.Cult;
CanSendChannels |= ChatSelectChannel.Cult; CanSendChannels |= ChatSelectChannel.Cult;
} }
if (_entities.HasComponent<ChangelingComponent>(localEnt))
{
FilterableChannels |= ChatChannel.Changeling;
CanSendChannels |= ChatSelectChannel.Changeling;
}
// WD EDIT END // WD EDIT END
SelectableChannels = CanSendChannels; SelectableChannels = CanSendChannels;

View File

@@ -107,12 +107,6 @@ public sealed class BloodstreamSystem : EntitySystem
if (!_solutionContainerSystem.ResolveSolution(uid, bloodstream.BloodSolutionName, ref bloodstream.BloodSolution, out var bloodSolution)) if (!_solutionContainerSystem.ResolveSolution(uid, bloodstream.BloodSolutionName, ref bloodstream.BloodSolution, out var bloodSolution))
continue; 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. // 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)) if (bloodSolution.Volume < bloodSolution.MaxVolume && !_mobStateSystem.IsDead(uid))
@@ -391,6 +385,14 @@ public sealed class BloodstreamSystem : EntitySystem
component.BleedAmount += amount; component.BleedAmount += amount;
component.BleedAmount = Math.Clamp(component.BleedAmount, 0, component.MaxBleedAmount); 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; return true;
} }

View File

@@ -1,5 +1,7 @@
using System.Linq; using System.Linq;
using Content.Server.Administration.Systems; using Content.Server.Administration.Systems;
using Content.Server.Body.Components;
using Content.Server.Body.Systems;
using Content.Server.DoAfter; using Content.Server.DoAfter;
using Content.Server.Forensics; using Content.Server.Forensics;
using Content.Server.Humanoid; using Content.Server.Humanoid;
@@ -61,6 +63,7 @@ public sealed partial class ChangelingSystem
[Dependency] private readonly ActionContainerSystem _actionContainerSystem = default!; [Dependency] private readonly ActionContainerSystem _actionContainerSystem = default!;
[Dependency] private readonly SharedPullingSystem _pullingSystem = default!; [Dependency] private readonly SharedPullingSystem _pullingSystem = default!;
[Dependency] private readonly MindSystem _mindSystem = default!; [Dependency] private readonly MindSystem _mindSystem = default!;
[Dependency] private readonly BloodstreamSystem _blood = default!;
private void InitializeAbilities() private void InitializeAbilities()
@@ -228,6 +231,12 @@ public sealed partial class ChangelingSystem
if (!TryComp<DamageableComponent>(uid, out var damageableComponent)) if (!TryComp<DamageableComponent>(uid, out var damageableComponent))
return; return;
if (component.ChemicalsBalance < 15)
{
_popup.PopupEntity("We're lacking of chemicals!", uid, uid);
return;
}
if (damageableComponent.TotalDamage >= 0 && !_mobStateSystem.IsDead(uid)) if (damageableComponent.TotalDamage >= 0 && !_mobStateSystem.IsDead(uid))
{ {
KillUser(uid, "Cellular"); KillUser(uid, "Cellular");
@@ -433,8 +442,9 @@ public sealed partial class ChangelingSystem
if (!TakeChemicals(uid, component, 20)) if (!TakeChemicals(uid, component, 20))
return; return;
_solutionContainer.TryAddReagent(injectable.Value, "Omnizine", 50); _solutionContainer.TryAddReagent(injectable.Value, "Omnizine", 25);
_solutionContainer.TryAddReagent(injectable.Value, "TranexamicAcid", 10); if (TryComp(uid, out BloodstreamComponent? bloodstream))
_blood.TryModifyBleedAmount(uid, -bloodstream.BleedAmount, bloodstream);
args.Handled = true; args.Handled = true;
} }

View File

@@ -85,7 +85,7 @@ chat-speech-verb-skeleton-1 = гремит
chat-speech-verb-skeleton-2 = щелкает chat-speech-verb-skeleton-2 = щелкает
chat-speech-verb-skeleton-3 = скрежет chat-speech-verb-skeleton-3 = скрежет
chat-speech-verb-canine-1 = гафкает chat-speech-verb-canine-1 = гавкает
chat-speech-verb-canine-2 = лает chat-speech-verb-canine-2 = лает
chat-speech-verb-canine-3 = воет chat-speech-verb-canine-3 = воет

View File

@@ -44,7 +44,7 @@
description: Inflates the changeling's body into an all-consuming chitinous mass of armor. description: Inflates the changeling's body into an all-consuming chitinous mass of armor.
productAction: ActionArmor productAction: ActionArmor
cost: cost:
ChangelingPoint: 4 ChangelingPoint: 1
categories: categories:
- ChangelingAbilities - ChangelingAbilities
conditions: conditions:

View File

@@ -153,7 +153,7 @@
- type: GiftIgnore - type: GiftIgnore
- type: entity - type: entity
parent: ClothingOuterArmorHeavy parent: ClothingOuterBaseLarge
id: ClothingOuterChangeling id: ClothingOuterChangeling
name: chitinous armor name: chitinous armor
description: Chitinous and flesh mass of armor. description: Chitinous and flesh mass of armor.
@@ -162,6 +162,15 @@
sprite: Clothing/OuterClothing/Armor/changeling.rsi sprite: Clothing/OuterClothing/Armor/changeling.rsi
- type: Clothing - type: Clothing
sprite: Clothing/OuterClothing/Armor/changeling.rsi 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 - type: Unremoveable
deleteOnDrop: true deleteOnDrop: true

View File

@@ -133,10 +133,6 @@
metabolismRate: 0.2 metabolismRate: 0.2
effects: effects:
- !type:ResetNarcolepsy - !type:ResetNarcolepsy
- !type:SatiateHunger
factor: 1
- !type:SatiateThirst
factor: 1
- !type:HealthChange - !type:HealthChange
conditions: conditions:
- !type:TotalDamage - !type:TotalDamage
@@ -230,10 +226,6 @@
metabolismRate: 0.25 metabolismRate: 0.25
effects: effects:
- !type:ResetNarcolepsy - !type:ResetNarcolepsy
- !type:SatiateHunger
factor: 1
- !type:SatiateThirst
factor: 1
- !type:HealthChange - !type:HealthChange
conditions: conditions:
- !type:ReagentThreshold - !type:ReagentThreshold

View File

@@ -97,14 +97,14 @@
- type: emote - type: emote
id: Chitter id: Chitter
category: Vocal category: Vocal
chatMessages: [ тарахтит ] chatMessages: [ стрекочет ]
chatTriggers: chatTriggers:
- стрекочет
- стрекочет.
- стрекочет!
- щебечет - щебечет
- щебечет. - щебечет.
- щебечет! - щебечет!
- тарахтит
- тарахтит.
- тарахтит!
- type: emote - type: emote
id: Squeak id: Squeak

View File

@@ -1,4 +1,4 @@
- type: speechVerb - type: speechVerb
id: Default id: Default
speechVerbStrings: speechVerbStrings:
- chat-speech-verb-default - chat-speech-verb-default
@@ -34,7 +34,6 @@
id: Arachnid id: Arachnid
speechVerbStrings: speechVerbStrings:
- chat-speech-verb-insect-1 - chat-speech-verb-insect-1
- chat-speech-verb-insect-2
- chat-speech-verb-insect-3 - chat-speech-verb-insect-3
- chat-speech-verb-reptilian-1 - chat-speech-verb-reptilian-1
@@ -58,7 +57,6 @@
- chat-speech-verb-reptilian-1 - chat-speech-verb-reptilian-1
- chat-speech-verb-reptilian-2 - chat-speech-verb-reptilian-2
- chat-speech-verb-reptilian-3 - chat-speech-verb-reptilian-3
- chat-speech-verb-insect-2
- type: speechVerb - type: speechVerb
id: Skeleton id: Skeleton