Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changeling chameleon skin nerf and price reduction #970

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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()
{
Expand Down Expand Up @@ -577,7 +579,11 @@ public void OnChameleonSkin(EntityUid uid, ChangelingComponent comp, ref ActionC
}

EnsureComp<StealthComponent>(uid);
EnsureComp<StealthOnMoveComponent>(uid);
_stealth.SetMinVisibility(uid, 0);

var stealthOnMove = EnsureComp<StealthOnMoveComponent>(uid);
stealthOnMove.MovementVisibilityRate = 1;

_popup.PopupEntity(Loc.GetString("changeling-chameleon-start"), uid, uid);
}
public void OnEphedrineOverdose(EntityUid uid, ChangelingComponent comp, ref ActionEphedrineOverdoseEvent args)
Expand Down
14 changes: 14 additions & 0 deletions Content.Shared/Stealth/SharedStealthSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,18 @@ public GetVisibilityModifiersEvent(EntityUid uid, StealthComponent stealth, floa
FlatModifier = flatModifier;
}
}

/// <summary>
/// Sets the minimum visibility
/// </summary>
/// <param name="value">The value to set the minimum visibility to.</param>
public void SetMinVisibility(EntityUid uid, float value, StealthComponent? component = null)
{
if (!Resolve(uid, ref component))
return;

component.MinVisibility = value;

Dirty(uid, component);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
icon: { sprite: _Goobstation/Changeling/changeling_abilities.rsi, state: chameleon_skin }
productAction: ActionChameleonSkin
cost:
EvolutionPoint: 4
EvolutionPoint: 2
categories:
- ChangelingAbilityUtility
conditions:
Expand Down
Loading