Skip to content

Commit

Permalink
Merge pull request #970 from Darkmajia/ling-refine-chameleon-skin
Browse files Browse the repository at this point in the history
changeling chameleon skin nerf and price reduction
  • Loading branch information
formlessnameless authored Dec 9, 2024
2 parents 23817ba + b02e9b7 commit c5e80fc
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
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

0 comments on commit c5e80fc

Please sign in to comment.