From 1aaadab94e4489792792df7769b086fe5a6aeed5 Mon Sep 17 00:00:00 2001 From: Darkmajia Date: Mon, 9 Dec 2024 16:24:44 +0000 Subject: [PATCH 1/3] chameleon skin nerf and price reduction --- .../Changeling/ChangelingSystem.Abilities.cs | 12 +++++++++--- .../Changeling/Catalog/changeling_catalog.yml | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Content.Server/_Goobstation/Changeling/ChangelingSystem.Abilities.cs b/Content.Server/_Goobstation/Changeling/ChangelingSystem.Abilities.cs index 1ae786ddc68943..9bc3fb37be04b2 100644 --- a/Content.Server/_Goobstation/Changeling/ChangelingSystem.Abilities.cs +++ b/Content.Server/_Goobstation/Changeling/ChangelingSystem.Abilities.cs @@ -20,6 +20,7 @@ using Content.Shared.Stealth.Components; using Content.Shared.Damage.Components; using Content.Server.Radio.Components; +using Content.Shared.Stealth; namespace Content.Server.Changeling; @@ -575,10 +576,15 @@ public void OnChameleonSkin(EntityUid uid, ChangelingComponent comp, ref ActionC _popup.PopupEntity(Loc.GetString("changeling-chameleon-end"), uid, uid); return; } + else + { + AddComp(uid); - EnsureComp(uid); - EnsureComp(uid); - _popup.PopupEntity(Loc.GetString("changeling-chameleon-start"), uid, uid); + var stealthOnMove = AddComp(uid); + stealthOnMove.MovementVisibilityRate = 1; + + _popup.PopupEntity(Loc.GetString("changeling-chameleon-start"), uid, uid); + } } public void OnEphedrineOverdose(EntityUid uid, ChangelingComponent comp, ref ActionEphedrineOverdoseEvent args) { diff --git a/Resources/Prototypes/_Goobstation/Changeling/Catalog/changeling_catalog.yml b/Resources/Prototypes/_Goobstation/Changeling/Catalog/changeling_catalog.yml index dcd409927b70b6..bdf109c3f7af16 100644 --- a/Resources/Prototypes/_Goobstation/Changeling/Catalog/changeling_catalog.yml +++ b/Resources/Prototypes/_Goobstation/Changeling/Catalog/changeling_catalog.yml @@ -249,7 +249,7 @@ icon: { sprite: _Goobstation/Changeling/changeling_abilities.rsi, state: chameleon_skin } productAction: ActionChameleonSkin cost: - EvolutionPoint: 4 + EvolutionPoint: 2 categories: - ChangelingAbilityUtility conditions: From d9b0c6278ee15ba3b71d7988e110550225716a23 Mon Sep 17 00:00:00 2001 From: Darkmajia Date: Mon, 9 Dec 2024 16:27:56 +0000 Subject: [PATCH 2/3] this doesnt need to be here --- .../_Goobstation/Changeling/ChangelingSystem.Abilities.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Content.Server/_Goobstation/Changeling/ChangelingSystem.Abilities.cs b/Content.Server/_Goobstation/Changeling/ChangelingSystem.Abilities.cs index 9bc3fb37be04b2..437cced046211f 100644 --- a/Content.Server/_Goobstation/Changeling/ChangelingSystem.Abilities.cs +++ b/Content.Server/_Goobstation/Changeling/ChangelingSystem.Abilities.cs @@ -20,7 +20,6 @@ using Content.Shared.Stealth.Components; using Content.Shared.Damage.Components; using Content.Server.Radio.Components; -using Content.Shared.Stealth; namespace Content.Server.Changeling; From b02e9b76d4d5b0e708e59fd48dcd276bad0f4551 Mon Sep 17 00:00:00 2001 From: Darkmajia Date: Mon, 9 Dec 2024 17:12:41 +0000 Subject: [PATCH 3/3] actually i did need it and i forgot to make this change --- .../Changeling/ChangelingSystem.Abilities.cs | 15 ++++++++------- Content.Shared/Stealth/SharedStealthSystem.cs | 14 ++++++++++++++ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/Content.Server/_Goobstation/Changeling/ChangelingSystem.Abilities.cs b/Content.Server/_Goobstation/Changeling/ChangelingSystem.Abilities.cs index 437cced046211f..4212c141a614c5 100644 --- a/Content.Server/_Goobstation/Changeling/ChangelingSystem.Abilities.cs +++ b/Content.Server/_Goobstation/Changeling/ChangelingSystem.Abilities.cs @@ -17,6 +17,7 @@ using Content.Shared.Eye.Blinding.Components; using Content.Server.Flash.Components; using Content.Shared.Movement.Pulling.Components; +using Content.Shared.Stealth; using Content.Shared.Stealth.Components; using Content.Shared.Damage.Components; using Content.Server.Radio.Components; @@ -26,6 +27,7 @@ namespace Content.Server.Changeling; public sealed partial class ChangelingSystem : EntitySystem { [Dependency] private readonly SharedRottingSystem _rotting = default!; + [Dependency] private readonly SharedStealthSystem _stealth = default!; public void SubscribeAbilities() { @@ -575,15 +577,14 @@ public void OnChameleonSkin(EntityUid uid, ChangelingComponent comp, ref ActionC _popup.PopupEntity(Loc.GetString("changeling-chameleon-end"), uid, uid); return; } - else - { - AddComp(uid); - var stealthOnMove = AddComp(uid); - stealthOnMove.MovementVisibilityRate = 1; + EnsureComp(uid); + _stealth.SetMinVisibility(uid, 0); - _popup.PopupEntity(Loc.GetString("changeling-chameleon-start"), uid, uid); - } + var stealthOnMove = EnsureComp(uid); + stealthOnMove.MovementVisibilityRate = 1; + + _popup.PopupEntity(Loc.GetString("changeling-chameleon-start"), uid, uid); } public void OnEphedrineOverdose(EntityUid uid, ChangelingComponent comp, ref ActionEphedrineOverdoseEvent args) { diff --git a/Content.Shared/Stealth/SharedStealthSystem.cs b/Content.Shared/Stealth/SharedStealthSystem.cs index 1bab55589fd2f6..7ba45375ab4fb7 100644 --- a/Content.Shared/Stealth/SharedStealthSystem.cs +++ b/Content.Shared/Stealth/SharedStealthSystem.cs @@ -208,4 +208,18 @@ public GetVisibilityModifiersEvent(EntityUid uid, StealthComponent stealth, floa FlatModifier = flatModifier; } } + + /// + /// Sets the minimum visibility + /// + /// The value to set the minimum visibility to. + public void SetMinVisibility(EntityUid uid, float value, StealthComponent? component = null) + { + if (!Resolve(uid, ref component)) + return; + + component.MinVisibility = value; + + Dirty(uid, component); + } }