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

Floofstation Release V7 #391

Merged
merged 133 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
c86e6ad
Changes/Consent
FoxxoTrystan Nov 4, 2024
b3cd068
apply warning 2
FoxxoTrystan Nov 4, 2024
6d936cc
Changes .ftl
FoxxoTrystan Nov 5, 2024
1e42299
The return of the techfabs
Mnemotechnician Nov 10, 2024
f9a0d25
Eugh
Mnemotechnician Nov 10, 2024
73d6090
Merge remote-tracking branch 'floofstation/master' into floof/feat/de…
Mnemotechnician Nov 10, 2024
878d6da
resomi
FoxxoTrystan Nov 14, 2024
2bb8d4a
displacement edit
FoxxoTrystan Nov 14, 2024
874db34
sounds
FoxxoTrystan Nov 14, 2024
6e4839b
Merge branch 'master' into Resomi
FoxxoTrystan Nov 19, 2024
657a0e2
initial commit
Memeji Nov 19, 2024
90a67bf
ONI MELEE
VividPups Nov 21, 2024
924360f
displacement
FoxxoTrystan Nov 21, 2024
a68c693
clothes
FoxxoTrystan Nov 21, 2024
d7c7090
changes
FoxxoTrystan Nov 21, 2024
c16a41c
fixes
FoxxoTrystan Nov 21, 2024
f90115f
fix linter
FoxxoTrystan Nov 21, 2024
d079648
json fixes
FoxxoTrystan Nov 21, 2024
1ca228c
fix sounds
FoxxoTrystan Nov 21, 2024
22e23fe
linter fixes
FoxxoTrystan Nov 21, 2024
fc6b4d4
consent
FoxxoTrystan Nov 22, 2024
cfd6fc6
consent
FoxxoTrystan Nov 22, 2024
0efd470
Merge branch 'master' into hypnosis-changes
FoxxoTrystan Nov 22, 2024
a461f57
Merge branch 'Fansana:master' into hypnosis-changes
FoxxoTrystan Nov 23, 2024
a9f48d6
Merge branch 'master' into hypnosis-changes
FoxxoTrystan Nov 23, 2024
b5a68a5
new
Memeji Nov 23, 2024
de78937
Merge branch 'Fansana:master' into Nikko-Items
Memeji Nov 23, 2024
75138ab
Update announcements.yml
Memeji Nov 23, 2024
073d68f
keeping it mono
Memeji Nov 23, 2024
2e206e2
robust tool
Memeji Nov 23, 2024
10a040e
Update announcements.yml
Fansana Nov 23, 2024
3bfb9b3
Merge branch 'Fansana:master' into hypnosis-changes
FoxxoTrystan Nov 24, 2024
8684f58
test fix?
FoxxoTrystan Nov 24, 2024
cee02fa
dipose fix?
FoxxoTrystan Nov 24, 2024
fe502a9
Allow kin to use
FoxxoTrystan Nov 25, 2024
c48fa10
allow kin to zoink (powred ones)
FoxxoTrystan Nov 25, 2024
aa2de35
Automatic Changelog Update (#381)
Floof-Station-Bot Nov 25, 2024
e58455a
Remove MassMindSwap
FoxxoTrystan Nov 26, 2024
062171b
Merge pull request #382 from Fansana/FoxxoTrystan-patch-1
FoxxoTrystan Nov 26, 2024
f7c4fae
Automatic Changelog Update (#382)
Floof-Station-Bot Nov 26, 2024
a11ec92
Update pickaxe.yml
fenndragon Nov 27, 2024
5513b7d
Update pickaxe.yml
fenndragon Nov 27, 2024
db09d3a
start
FoxxoTrystan Nov 28, 2024
c5fc9b5
Update roundstart.yml
fenndragon Nov 28, 2024
2f750c6
Merge branch 'Fansana:master' into Fixes
fenndragon Nov 28, 2024
9ce7c65
Merge branch 'master' of https://github.com/Fansana/floofstation1 int…
Mnemotechnician Nov 28, 2024
0de9445
No submodule update.
Mnemotechnician Nov 28, 2024
5230a85
THE VORE STARTS
FoxxoTrystan Nov 29, 2024
8f14885
THE VORE
FoxxoTrystan Nov 30, 2024
9cc5952
Ship update
JasmineRickards Dec 1, 2024
c8e5fd3
Merge branch 'Fansana:master' into master
JasmineRickards Dec 1, 2024
079b861
Merge pull request #5 from JasmineRickards/master
JasmineRickards Dec 1, 2024
ab65727
vore noises
FoxxoTrystan Dec 1, 2024
b8af22d
voredigest
FoxxoTrystan Dec 1, 2024
028774b
ent
FoxxoTrystan Dec 1, 2024
87583e1
Initial commit
Memeji Dec 2, 2024
4003a4b
tiny fixes
FoxxoTrystan Dec 2, 2024
e2bdba3
Merge pull request #327 from FoxxoTrystan/hypnosis-changes
FoxxoTrystan Dec 2, 2024
f992ba0
Automatic Changelog Update (#327)
Floof-Station-Bot Dec 2, 2024
2f9d83f
Merge branch 'master' into vore-update
FoxxoTrystan Dec 2, 2024
cc53ced
Merge branch 'master' into Resomi
FoxxoTrystan Dec 2, 2024
5f606ad
Merge pull request #342 from Mnemotechnician/floof/feat/dept-lathes
Memeji Dec 2, 2024
bde63df
Automatic Changelog Update (#342)
Floof-Station-Bot Dec 2, 2024
896a090
Merge pull request #372 from FoxxoTrystan/Resomi
FoxxoTrystan Dec 2, 2024
148670f
Automatic Changelog Update (#372)
Floof-Station-Bot Dec 2, 2024
e4a891d
Merge pull request #386 from JasmineRickards/ert
FoxxoTrystan Dec 2, 2024
4d45297
Merge branch 'Fansana:master' into Nikko-Items
Memeji Dec 2, 2024
10ea7ec
finals
FoxxoTrystan Dec 2, 2024
f5c8be3
Updating to master and adding other stuff
Memeji Dec 2, 2024
e387643
Remove request
FoxxoTrystan Dec 2, 2024
5e3f2a7
THE PERMIT
FoxxoTrystan Dec 2, 2024
b9f5ef4
Merge pull request #387 from FoxxoTrystan/vore-update
FoxxoTrystan Dec 2, 2024
f95e2a4
Automatic Changelog Update (#387)
Floof-Station-Bot Dec 2, 2024
b2ccda0
Merge pull request #388 from FoxxoTrystan/syni-remove
FoxxoTrystan Dec 2, 2024
eea462b
Automatic Changelog Update (#388)
Floof-Station-Bot Dec 2, 2024
1994417
Merge branch 'Fansana:master' into nudity-permit
FoxxoTrystan Dec 2, 2024
dfa4701
Commit final
Memeji Dec 2, 2024
54538a5
Merge branch 'stable'
FoxxoTrystan Dec 2, 2024
77152e5
Loadout fixes
Memeji Dec 2, 2024
4d4ee5f
Merge pull request #389 from FoxxoTrystan/nudity-permit
FoxxoTrystan Dec 2, 2024
865777e
Automatic Changelog Update (#389)
Floof-Station-Bot Dec 2, 2024
7185df5
Fix for speed loader issue
Memeji Dec 2, 2024
b8ba6bb
servicegroup fix
FoxxoTrystan Dec 2, 2024
2392adb
Commit for tags
Memeji Dec 2, 2024
1055d3c
Merge branch 'Nikko-Loadout' of https://github.com/Memeji/floofstatio…
Memeji Dec 2, 2024
c95ae48
Price of cargo vending from 1000 to 1300
Memeji Dec 2, 2024
055e2c6
Update Resources/Prototypes/_NF/Entities/Clothing/Neck/cloaks.yml
Memeji Dec 2, 2024
84da438
Update Resources/Prototypes/_NF/Entities/Clothing/Neck/cloaks.yml
Memeji Dec 2, 2024
e768118
Update cloaks.yml
Memeji Dec 2, 2024
8c17a7e
Update cloaks.yml
Memeji Dec 2, 2024
b6286ae
Update pickaxe.yml
fenndragon Dec 2, 2024
01c82b1
Merge pull request #390 from Memeji/Nikko-Loadout
FoxxoTrystan Dec 2, 2024
83eb85b
Automatic Changelog Update (#390)
Floof-Station-Bot Dec 2, 2024
1f14fd0
Disable Resomi
FoxxoTrystan Dec 3, 2024
da3ae12
Resomi Fixes
FoxxoTrystan Dec 3, 2024
55de706
fix .rsi
FoxxoTrystan Dec 3, 2024
6bfbcda
Merge pull request #392 from FoxxoTrystan/resomi-fixes
FoxxoTrystan Dec 3, 2024
3cad8aa
Automatic Changelog Update (#392)
Floof-Station-Bot Dec 3, 2024
61f5b8c
Merge branch 'master' into Floofstation-V7
FoxxoTrystan Dec 3, 2024
8752232
enable resomi
FoxxoTrystan Dec 3, 2024
1b9d287
Various fixes and tweaks
Mnemotechnician Dec 4, 2024
95a0a76
Update Melee.yml
VividPups Dec 4, 2024
6a5c81e
Merge branch 'master' into Oni-Brassnuckles
VividPups Dec 4, 2024
c2b6771
Update pickaxe.yml
fenndragon Dec 4, 2024
3363b22
Update publish-testing.yml
Fansana Dec 5, 2024
8390f72
Update publish-stable.yml
Fansana Dec 5, 2024
7b443cf
Merge pull request #393 from Mnemotechnician/floof/tweak/various-issues
FoxxoTrystan Dec 5, 2024
3fcbf6b
Automatic Changelog Update (#393)
Floof-Station-Bot Dec 5, 2024
902971f
Merge branch 'master' into Floofstation-V7
FoxxoTrystan Dec 5, 2024
27cbf1e
Some Language Fixes (#1223)
Mnemotechnician Nov 14, 2024
7c0c9e0
Update roundstart.yml
fenndragon Dec 5, 2024
075cc2f
Update roundstart.yml
fenndragon Dec 5, 2024
7698eda
no glimmer raise hypno
FoxxoTrystan Dec 6, 2024
8af552c
Merge branch 'master' into Floofstation-V7
FoxxoTrystan Dec 6, 2024
6e825b8
Merge pull request #395 from Mnemotechnician/floof/cherrypick/ee1223
FoxxoTrystan Dec 7, 2024
70fe049
Automatic Changelog Update (#395)
Floof-Station-Bot Dec 7, 2024
d6cbbdf
add rubyfang oc
Fansana Dec 7, 2024
233f005
Merge pull request #383 from fenndragon/mining-drill
FoxxoTrystan Dec 7, 2024
4355f23
Automatic Changelog Update (#383)
Floof-Station-Bot Dec 7, 2024
b929a34
Update Content.Server/Polymorph/Components/PolymorphProviderComponent.cs
Fansana Dec 7, 2024
9921d67
Update Content.Server/Polymorph/Systems/PolymorphSystem.Provider.cs
Fansana Dec 7, 2024
5e20d50
Update Content.Server/Polymorph/Systems/PolymorphSystem.Provider.cs
Fansana Dec 7, 2024
89c892b
Update Content.Server/Polymorph/Systems/PolymorphSystem.Provider.cs
Fansana Dec 7, 2024
a5c3ee5
Update Content.Server/Polymorph/Components/PolymorphProviderComponent.cs
Fansana Dec 7, 2024
565419a
Update Content.Server/Polymorph/Systems/PolymorphSystem.Provider.cs
Fansana Dec 7, 2024
708e739
Update Content.Server/Polymorph/Components/PolymorphProviderComponent.cs
FoxxoTrystan Dec 7, 2024
0942002
Merge pull request #396 from Fansana/rubyfang-oc
FoxxoTrystan Dec 7, 2024
e2378ad
Merge branch 'master' into Floofstation-V7
FoxxoTrystan Dec 7, 2024
04aba54
Merge pull request #371 from VividPups/Oni-Brassnuckles
Fansana Dec 7, 2024
3ff62fc
Automatic Changelog Update (#371)
Floof-Station-Bot Dec 7, 2024
6574ec0
Merge pull request #385 from fenndragon/Fixes
Fansana Dec 7, 2024
344bada
Automatic Changelog Update (#385)
Floof-Station-Bot Dec 7, 2024
354cbf7
Merge branch 'master' into Floofstation-V7
FoxxoTrystan Dec 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 4 additions & 2 deletions .github/workflows/publish-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ name: Publish stable

concurrency:
group: publish

on:
workflow_dispatch:
push:
branches:
- stable # or the branch where merge requests are being merged into (e.g., 'master')


jobs:
build:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ concurrency:
group: publish

on:
workflow_dispatch:
schedule:
- cron: '0 6 * * *'
push:
branches:
- master

jobs:
build:
Expand Down
120 changes: 35 additions & 85 deletions Content.Client/Clothing/ClientClothingSystem.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Numerics;
using Content.Client.DisplacementMap;
using Content.Client.Inventory;
using Content.Shared.Clothing;
using Content.Shared.Clothing.Components;
using Content.Shared.Clothing.EntitySystems;
using Content.Shared.DisplacementMap;
using Content.Shared.Humanoid;
using Content.Shared.Inventory;
using Content.Shared.Inventory.Events;
Expand Down Expand Up @@ -49,6 +52,7 @@ public sealed class ClientClothingSystem : ClothingSystem
[Dependency] private readonly IResourceCache _cache = default!;
[Dependency] private readonly ISerializationManager _serialization = default!;
[Dependency] private readonly InventorySystem _inventorySystem = default!;
[Dependency] private readonly DisplacementMapSystem _displacement = default!;

public override void Initialize()
{
Expand All @@ -63,15 +67,14 @@ public override void Initialize()

private void OnAppearanceUpdate(EntityUid uid, InventoryComponent component, ref AppearanceChangeEvent args)
{
// May need to update jumpsuit stencils if the sex changed. Also required to properly set the stencil on init
// May need to update displacement maps if the sex changed. Also required to properly set the stencil on init
if (args.Sprite == null)
return;

if (_inventorySystem.TryGetSlotEntity(uid, Jumpsuit, out var suit, component)
&& TryComp(suit, out ClothingComponent? clothing))
var enumerator = _inventorySystem.GetSlotEnumerator((uid, component));
while (enumerator.NextItem(out var item, out var slot))
{
SetGenderedMask(uid, args.Sprite, clothing);
return;
RenderEquipment(uid, item, slot.Name, component);
}

// No clothing equipped -> make sure the layer is hidden, though this should already be handled by on-unequip.
Expand Down Expand Up @@ -113,6 +116,7 @@ private void OnGetVisuals(EntityUid uid, ClothingComponent item, GetEquipmentVis
i++;
}

item.MappedLayer = key;
args.Layers.Add((key, layer));
}
}
Expand Down Expand Up @@ -153,13 +157,9 @@ private bool TryGetDefaultVisuals(EntityUid uid, ClothingComponent clothing, str

// species specific
if (speciesId != null && rsi.TryGetState($"{state}-{speciesId}", out _))
{
state = $"{state}-{speciesId}";
}
else if (!rsi.TryGetState(state, out _))
{
return false;
}

var layer = new PrototypeLayerData();
layer.RsiPath = rsi.Path.ToString();
Expand All @@ -181,14 +181,6 @@ private void OnVisualsChanged(EntityUid uid, InventoryComponent component, Visua

private void OnDidUnequip(EntityUid uid, SpriteComponent component, DidUnequipEvent args)
{
// Hide jumpsuit mask layer.
if (args.Slot == Jumpsuit
&& TryComp(uid, out SpriteComponent? sprite)
&& sprite.LayerMapTryGet(HumanoidVisualLayers.StencilMask, out var maskLayer))
{
sprite.LayerSetVisible(maskLayer, false);
}

if (!TryComp(uid, out InventorySlotsComponent? inventorySlots))
return;

Expand Down Expand Up @@ -233,9 +225,6 @@ private void RenderEquipment(EntityUid equipee, EntityUid equipment, string slot
return;
}

if (slot == Jumpsuit)
SetGenderedMask(equipee, sprite, clothingComponent);

if (!_inventorySystem.TryGetSlot(equipee, slot, out var slotDef, inventory))
return;

Expand Down Expand Up @@ -267,7 +256,25 @@ private void RenderEquipment(EntityUid equipee, EntityUid equipment, string slot
// temporary, until layer draw depths get added. Basically: a layer with the key "slot" is being used as a
// bookmark to determine where in the list of layers we should insert the clothing layers.
bool slotLayerExists = sprite.LayerMapTryGet(slot, out var index);
var displacementData = inventory.Displacements.GetValueOrDefault(slot);

// Select displacement maps
var displacementData = inventory.Displacements.GetValueOrDefault(slot); //Default unsexed map

var equipeeSex = CompOrNull<HumanoidAppearanceComponent>(equipee)?.Sex;
if (equipeeSex != null)
{
switch (equipeeSex)
{
case Sex.Male:
if (inventory.MaleDisplacements.Count > 0)
displacementData = inventory.MaleDisplacements.GetValueOrDefault(slot);
break;
case Sex.Female:
if (inventory.FemaleDisplacements.Count > 0)
displacementData = inventory.FemaleDisplacements.GetValueOrDefault(slot);
break;
}
}

// add the new layers
foreach (var (key, layerData) in ev.Layers)
Expand All @@ -287,12 +294,14 @@ private void RenderEquipment(EntityUid equipee, EntityUid equipment, string slot

if (layerData.Color != null)
sprite.LayerSetColor(key, layerData.Color.Value);
if (layerData.Scale != null)
sprite.LayerSetScale(key, layerData.Scale.Value);
}
else
index = sprite.LayerMapReserveBlank(key);

if (sprite[index] is not Layer layer)
return;
continue;

// In case no RSI is given, use the item's base RSI as a default. This cuts down on a lot of unnecessary yaml entries.
if (layerData.RsiPath == null
Expand All @@ -303,78 +312,19 @@ private void RenderEquipment(EntityUid equipee, EntityUid equipment, string slot
layer.SetRsi(clothingSprite.BaseRSI);
}

// Another "temporary" fix for clothing stencil masks.
// Sprite layer redactor when
// Sprite "redactor" just a week away.
if (slot == Jumpsuit)
layerData.Shader ??= "StencilDraw";

sprite.LayerSetData(index, layerData);
layer.Offset += slotDef.Offset;

if (displacementData != null)
if (displacementData is not null)
{
if (displacementData.ShaderOverride != null)
sprite.LayerSetShader(index, displacementData.ShaderOverride);

var displacementKey = $"{key}-displacement";
if (!revealedLayers.Add(displacementKey))
{
Log.Warning($"Duplicate key for clothing visuals DISPLACEMENT: {displacementKey}.");
//Checking that the state is not tied to the current race. In this case we don't need to use the displacement maps.
if (layerData.State is not null && inventory.SpeciesId is not null && layerData.State.EndsWith(inventory.SpeciesId))
continue;
}

var displacementLayer = _serialization.CreateCopy(displacementData.Layer, notNullableOverride: true);
displacementLayer.CopyToShaderParameters!.LayerKey = key;

// Add before main layer for this item.
sprite.AddLayer(displacementLayer, index);
sprite.LayerMapSet(displacementKey, index);

revealedLayers.Add(displacementKey);
_displacement.TryAddDisplacement(displacementData, sprite, index, key, revealedLayers);
}
}

RaiseLocalEvent(equipment, new EquipmentVisualsUpdatedEvent(equipee, slot, revealedLayers), true);
}


/// <summary>
/// Sets a sprite's gendered mask based on gender (obviously).
/// </summary>
/// <param name="sprite">Sprite to modify</param>
/// <param name="humanoid">Humanoid, to get gender from</param>
/// <param name="clothing">Clothing component, to get mask sprite type</param>
private void SetGenderedMask(EntityUid uid, SpriteComponent sprite, ClothingComponent clothing)
{
if (!sprite.LayerMapTryGet(HumanoidVisualLayers.StencilMask, out var layer))
return;

ClothingMask mask;
string prefix;

switch (CompOrNull<HumanoidAppearanceComponent>(uid)?.Sex)
{
case Sex.Male:
mask = clothing.MaleMask;
prefix = "male_";
break;
case Sex.Female:
mask = clothing.FemaleMask;
prefix = "female_";
break;
default:
mask = clothing.UnisexMask;
prefix = "unisex_";
break;
}

sprite.LayerSetState(layer, mask switch
{
ClothingMask.NoMask => $"{prefix}none",
ClothingMask.UniformTop => $"{prefix}top",
_ => $"{prefix}full",
});
sprite.LayerSetVisible(layer, true);
}
}
12 changes: 10 additions & 2 deletions Content.Client/Consent/UI/Windows/ConsentWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ public ConsentWindow()
ConsentFreetext.OnTextChanged += _ => UnsavedChanges();
}

protected override void Dispose(bool disposing)
{
base.Dispose(disposing);

if (disposing)
_consentManager.OnServerDataLoaded -= UpdateUi;
}

private PlayerConsentSettings GetSettings()
{
var text = Rope.Collapse(ConsentFreetext.TextRope);
Expand Down Expand Up @@ -145,8 +153,8 @@ public void UpdateUi()

ConsentFreetext.TextRope = new Rope.Leaf(consent.Freetext);

if (ConsentList.ChildCount > 0)
ConsentList.RemoveAllChildren();
ConsentList.RemoveAllChildren();

_entries.Clear();

var consentprototypelist = _protoManager.EnumeratePrototypes<ConsentTogglePrototype>();
Expand Down
65 changes: 65 additions & 0 deletions Content.Client/DisplacementMap/DisplacementMapSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
using Content.Shared.DisplacementMap;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Shared.Serialization.Manager;

namespace Content.Client.DisplacementMap;

public sealed class DisplacementMapSystem : EntitySystem
{
[Dependency] private readonly ISerializationManager _serialization = default!;

public bool TryAddDisplacement(DisplacementData data, SpriteComponent sprite, int index, string key, HashSet<string> revealedLayers)
{
if (data.ShaderOverride != null)
sprite.LayerSetShader(index, data.ShaderOverride);

var displacementKey = $"{key}-displacement";
if (!revealedLayers.Add(displacementKey))
{
Log.Warning($"Duplicate key for DISPLACEMENT: {displacementKey}.");
return false;
}

//allows you not to write it every time in the YML
foreach (var pair in data.SizeMaps)
{
pair.Value.CopyToShaderParameters??= new()
{
LayerKey = "dummy",
ParameterTexture = "displacementMap",
ParameterUV = "displacementUV",
};
}

if (!data.SizeMaps.ContainsKey(32))
{
Log.Error($"DISPLACEMENT: {displacementKey} don't have 32x32 default displacement map");
return false;
}

// We choose a displacement map from the possible ones, matching the size with the original layer size.
// If there is no such a map, we use a standard 32 by 32 one
var displacementDataLayer = data.SizeMaps[EyeManager.PixelsPerMeter];
var actualRSI = sprite.LayerGetActualRSI(index);
if (actualRSI is not null)
{
if (actualRSI.Size.X != actualRSI.Size.Y)
Log.Warning($"DISPLACEMENT: {displacementKey} has a resolution that is not 1:1, things can look crooked");

var layerSize = actualRSI.Size.X;
if (data.SizeMaps.ContainsKey(layerSize))
displacementDataLayer = data.SizeMaps[layerSize];
}

var displacementLayer = _serialization.CreateCopy(displacementDataLayer, notNullableOverride: true);
displacementLayer.CopyToShaderParameters!.LayerKey = key;

sprite.AddLayer(displacementLayer, index);
sprite.LayerMapSet(displacementKey, index);

revealedLayers.Add(displacementKey);

return true;
}
}
47 changes: 47 additions & 0 deletions Content.Client/Floofstation/VoredSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
using Content.Shared.FloofStation;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Player;

namespace Content.Client.Floofstation;

public sealed partial class VoredSystem : EntitySystem
{
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly ISharedPlayerManager _playerMan = default!;

public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<VoredComponent, ComponentInit>(OnInit);
SubscribeLocalEvent<VoredComponent, ComponentShutdown>(Onhutdown);
SubscribeLocalEvent<VoredComponent, LocalPlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<VoredComponent, LocalPlayerDetachedEvent>(OnPlayerDetached);
}

private void OnInit(EntityUid uid, VoredComponent component, ComponentInit args)
{
if (uid != _playerMan.LocalEntity)
return;

component.Stream = _audio.PlayGlobal(component.SoundBelly, Filter.Local(), false)?.Entity;
}

private void Onhutdown(EntityUid uid, VoredComponent component, ComponentShutdown args)
{
if (uid != _playerMan.LocalEntity)
return;

QueueDel(component.Stream);
}

private void OnPlayerAttached(EntityUid uid, VoredComponent component, LocalPlayerAttachedEvent args)
{
component.Stream = _audio.PlayGlobal(component.SoundBelly, Filter.Local(), false)?.Entity;
}

private void OnPlayerDetached(EntityUid uid, VoredComponent component, LocalPlayerDetachedEvent args)
{
QueueDel(component.Stream);
}
}
Loading
Loading