Skip to content

Commit

Permalink
Merge pull request Simple-Station#246 from FoxxoTrystan/Shadowkin-Fix
Browse files Browse the repository at this point in the history
Shadowkin Fixes/Changes
  • Loading branch information
FoxxoTrystan authored Oct 9, 2024
2 parents fcf9cd3 + 93f2951 commit 10c4d61
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 21 deletions.
12 changes: 7 additions & 5 deletions Content.Client/Shadowkin/ShadowkinSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ public override void Initialize()

private void OnInit(EntityUid uid, ShadowkinComponent component, ComponentInit args)
{
if (uid != _playerMan.LocalEntity)
if (uid != _playerMan.LocalEntity
|| _cfg.GetCVar(CCVars.NoVisionFilters))
return;

if (!_cfg.GetCVar(CCVars.NoVisionFilters))
_overlayMan.AddOverlay(_overlay);
_overlayMan.AddOverlay(_overlay);
}

private void Onhutdown(EntityUid uid, ShadowkinComponent component, ComponentShutdown args)
Expand All @@ -50,8 +50,10 @@ private void Onhutdown(EntityUid uid, ShadowkinComponent component, ComponentShu

private void OnPlayerAttached(EntityUid uid, ShadowkinComponent component, LocalPlayerAttachedEvent args)
{
if (!_cfg.GetCVar(CCVars.NoVisionFilters))
_overlayMan.AddOverlay(_overlay);
if (_cfg.GetCVar(CCVars.NoVisionFilters))
return;

_overlayMan.AddOverlay(_overlay);
}

private void OnPlayerDetached(EntityUid uid, ShadowkinComponent component, LocalPlayerDetachedEvent args)
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Shadowkin/EtherealStunItemSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ private void OnUseInHand(EntityUid uid, EtherealStunItemComponent component, Use
_stamina.TakeStaminaDamage(ent, stamina.CritThreshold, stamina, ent);

if (TryComp<PsionicComponent>(ent, out var magic))
magic.Mana -= component.ManaDamage;
magic.Mana = 0;
}

if (!component.DeleteOnUse)
Expand Down
8 changes: 0 additions & 8 deletions Content.Server/Shadowkin/ShadowkinSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ namespace Content.Server.Shadowkin;
public sealed class ShadowkinSystem : EntitySystem
{
[Dependency] private readonly StaminaSystem _stamina = default!;
[Dependency] private readonly DamageableSystem _damageable = default!;
[Dependency] private readonly PsionicAbilitiesSystem _psionicAbilitiesSystem = default!;
[Dependency] private readonly AlertsSystem _alerts = default!;
[Dependency] private readonly SharedActionsSystem _actionsSystem = default!;
Expand Down Expand Up @@ -139,13 +138,6 @@ private void OnMindbreak(EntityUid uid, ShadowkinComponent component, ref OnMind

if (TryComp<StaminaComponent>(uid, out var stamina))
_stamina.TakeStaminaDamage(uid, stamina.CritThreshold, stamina, uid);

if (!TryComp<DamageableComponent>(uid, out var damageable))
{
DamageSpecifier damage = new();
damage.DamageDict.Add("Cellular", FixedPoint2.New(5));
_damageable.TryChangeDamage(uid, damage);
}
}

private void OnRejuvenate(EntityUid uid, ShadowkinComponent component, RejuvenateEvent args)
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,9 @@ public virtual void LoadProfile(EntityUid uid, HumanoidCharacterProfile? profile
return;
}

humanoid.EyeColor = profile.Appearance.EyeColor;
SetSpecies(uid, profile.Species, false, humanoid);
SetSex(uid, profile.Sex, false, humanoid);
humanoid.EyeColor = profile.Appearance.EyeColor;

SetSkinColor(uid, profile.Appearance.SkinColor, false);

Expand Down
1 change: 1 addition & 0 deletions Content.Shared/Shadowkin/EtherealComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ public sealed partial class EtherealComponent : Component
public int OldMobLayer;

public List<string> SuppressedFactions = new();
public bool HasDoorBumpTag;
}
3 changes: 0 additions & 3 deletions Content.Shared/Shadowkin/EtherealStunItemComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ public sealed partial class EtherealStunItemComponent : Component
[DataField]
public float Radius = 10;

[DataField]
public float ManaDamage = 50;

[DataField]
public bool DeleteOnUse = true;
}
11 changes: 10 additions & 1 deletion Content.Shared/Shadowkin/SharedEtherealSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using Content.Shared.CCVar;
using Robust.Shared.Configuration;
using Content.Shared.Abilities.Psionics;
using Content.Shared.Tag;

namespace Content.Shared.Shadowkin;

Expand All @@ -22,6 +23,7 @@ public abstract class SharedEtherealSystem : EntitySystem
[Dependency] private readonly SharedPopupSystem _popup = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly IConfigurationManager _cfg = default!;
[Dependency] private readonly TagSystem _tag = default!;

public override void Initialize()
{
Expand Down Expand Up @@ -52,6 +54,10 @@ public virtual void OnStartup(EntityUid uid, EtherealComponent component, MapIni
{
_physics.SetCollisionMask(uid, fixture.Key, fixture.Value, (int) CollisionGroup.GhostImpassable, fixtures);
_physics.SetCollisionLayer(uid, fixture.Key, fixture.Value, 0, fixtures);

if (_tag.RemoveTag(uid, "DoorBumpOpener"))
component.HasDoorBumpTag = true;

return;
}

Expand All @@ -68,6 +74,9 @@ public virtual void OnShutdown(EntityUid uid, EtherealComponent component, Compo

_physics.SetCollisionMask(uid, fixture.Key, fixture.Value, component.OldMobMask, fixtures);
_physics.SetCollisionLayer(uid, fixture.Key, fixture.Value, component.OldMobLayer, fixtures);

if (component.HasDoorBumpTag)
_tag.AddTag(uid, "DoorBumpOpener");
}

private void OnMindbreak(EntityUid uid, EtherealComponent component, ref OnMindbreakEvent args)
Expand Down Expand Up @@ -126,7 +135,7 @@ private void OnAttemptPowerUse(EntityUid uid, EtherealComponent component, OnAtt
{
if (args.Power == "DarkSwap")
return;

args.Cancel();
}
}
6 changes: 6 additions & 0 deletions Resources/Prototypes/DeltaV/Entities/Mobs/Player/humanoid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

- type: randomHumanoidSettings
id: SyndicateListener
speciesBlacklist:
- Shadowkin
components:
- type: Loadout
prototypes: [SyndicateListenerGear]
Expand All @@ -34,6 +36,8 @@
- type: randomHumanoidSettings
id: Mobster
randomizeName: false
speciesBlacklist:
- Shadowkin
components:
- type: GhostRole
name: Mobster
Expand Down Expand Up @@ -65,6 +69,8 @@
- type: randomHumanoidSettings
id: MobsterAlt
randomizeName: false
speciesBlacklist:
- Shadowkin
components:
- type: GhostRole
name: Mobster
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
bodyPart: HeadTop
markingCategory: HeadTop
speciesRestriction: [Shadowkin]
forcedColoring: true
sprites:
- sprite: Mobs/Customization/Shadowkin/ears.rsi
state: shadowkin
Expand All @@ -14,6 +15,15 @@
bodyPart: HeadTop
markingCategory: HeadTop
speciesRestriction: [Shadowkin]
coloring:
default:
type:
!type:SkinColoring
layers:
shadowkin_stripes:
type:
!type:SimpleColoring
color: "#FFFFFF"
sprites:
- sprite: Mobs/Customization/Shadowkin/ears.rsi
state: shadowkin
Expand All @@ -27,6 +37,7 @@
bodyPart: Tail
markingCategory: Tail
speciesRestriction: [Shadowkin]
forcedColoring: true
sprites:
- sprite: Mobs/Customization/Shadowkin/tails64x32.rsi
state: shadowkin
Expand All @@ -36,6 +47,7 @@
bodyPart: Tail
markingCategory: Tail
speciesRestriction: [Shadowkin]
forcedColoring: true
sprites:
- sprite: Mobs/Customization/Shadowkin/tails64x32.rsi
state: shadowkin_big
Expand All @@ -45,6 +57,7 @@
bodyPart: Tail
markingCategory: Tail
speciesRestriction: [Shadowkin, Reptilian]
forcedColoring: true
sprites:
- sprite: Mobs/Customization/Shadowkin/tails64x32.rsi
state: shadowkin_big_fluff
Expand All @@ -54,6 +67,7 @@
bodyPart: Tail
markingCategory: Tail
speciesRestriction: [Shadowkin]
forcedColoring: true
sprites:
- sprite: Mobs/Customization/Shadowkin/tails32x32.rsi
state: shadowkin_shorter
Expand All @@ -63,6 +77,7 @@
bodyPart: Tail
markingCategory: Tail
speciesRestriction: [Shadowkin]
forcedColoring: true
sprites:
- sprite: Mobs/Customization/Shadowkin/tails32x32.rsi
state: shadowkin_medium
state: shadowkin_medium
14 changes: 14 additions & 0 deletions Resources/Prototypes/Entities/Mobs/Player/humanoid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
- type: randomHumanoidSettings
id: DeathSquad
randomizeName: false
speciesBlacklist:
- Shadowkin
components:
- type: MindShield
- type: GhostRole
Expand Down Expand Up @@ -57,6 +59,8 @@
- type: randomHumanoidSettings
id: ERTLeader
randomizeName: false
speciesBlacklist:
- Shadowkin
components:
- type: MindShield
- type: GhostRole
Expand Down Expand Up @@ -456,6 +460,8 @@

- type: randomHumanoidSettings
id: CBURNAgent
speciesBlacklist:
- Shadowkin
components:
- type: MindShield
- type: Loadout
Expand Down Expand Up @@ -484,6 +490,8 @@

- type: randomHumanoidSettings
id: CentcomOfficial
speciesBlacklist:
- Shadowkin
components:
- type: MindShield
- type: GhostRole
Expand All @@ -510,6 +518,8 @@

- type: randomHumanoidSettings
id: SyndicateAgent
speciesBlacklist:
- Shadowkin
components:
- type: Loadout
prototypes: [SyndicateOperativeGearExtremelyBasic]
Expand All @@ -526,6 +536,8 @@

- type: randomHumanoidSettings
id: NukeOp
speciesBlacklist:
- Shadowkin
components:
- type: NukeOperative
- type: Psionic
Expand All @@ -548,6 +560,8 @@

- type: randomHumanoidSettings
id: Cluwne
speciesBlacklist:
- Shadowkin
randomizeName: false
components:
- type: GhostRole
Expand Down
3 changes: 2 additions & 1 deletion Resources/Prototypes/Species/species_weights.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
weights:
Human: 5
Reptilian: 4
SlimePerson: 4
SlimePerson: 3
Oni: 3 #Nyanotrasen Oni, see Prototypes/Nyanotrasen/Entities/Mobs/Species/Oni.yml
Felinid: 4 # Nyanotrasen - Felinid, see Prototypes/Nyanotrasen/Entities/Mobs/Species/felinid.yml
Vulpkanin: 3 # DeltaV - Vulpkanin, see Prototypes/DeltaV/Entities/Mobs/Species/vulpkanin.yml
Rodentia: 3 # DeltaV - Rodentia, see Prototypes/DeltaV/Entities/Mobs/Species/rodentia.yml
Diona: 2
Shadowkin: 0

0 comments on commit 10c4d61

Please sign in to comment.