Skip to content

Commit

Permalink
Merge branch 'Vulpkanin-Update' of https://github.com/FoxxoTrystan/Ei…
Browse files Browse the repository at this point in the history
…nstein-Engines into Vulpkanin-Update
  • Loading branch information
FoxxoTrystan committed Aug 13, 2024
2 parents fad032f + 1cbe6ea commit 06755bb
Show file tree
Hide file tree
Showing 44 changed files with 826 additions and 113 deletions.
8 changes: 8 additions & 0 deletions Content.Server/Shower/ShowerSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using Content.Shared.Showers;

namespace Content.Server.Shower;

public sealed class ShowerSystem : SharedShowerSystem
{

}
2 changes: 1 addition & 1 deletion Content.Shared/Medical/SuitSensor/SharedSuitSensor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public SuitSensorStatus(NetEntity suitSensorUid, string name, string job, string
public bool IsAlive;
public int? TotalDamage;
public int? TotalDamageThreshold;
public float? DamagePercentage => TotalDamageThreshold == null || TotalDamage == null ? null : TotalDamage / TotalDamageThreshold;
public float? DamagePercentage => TotalDamageThreshold == null || TotalDamage == null ? null : TotalDamage / (float) TotalDamageThreshold;
public NetCoordinates? Coordinates;
}

Expand Down
92 changes: 92 additions & 0 deletions Content.Shared/Showers/SharedShowerSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
using Content.Shared.Interaction;
using Content.Shared.Verbs;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Random;
using Robust.Shared.Utility;

namespace Content.Shared.Showers
{
public abstract class SharedShowerSystem : EntitySystem
{
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<ShowerComponent, MapInitEvent>(OnMapInit);
SubscribeLocalEvent<ShowerComponent, GetVerbsEvent<AlternativeVerb>>(OnToggleShowerVerb);
SubscribeLocalEvent<ShowerComponent, ActivateInWorldEvent>(OnActivateInWorld);
}
private void OnMapInit(EntityUid uid, ShowerComponent component, MapInitEvent args)
{
if (_random.Prob(0.5f))
component.ToggleShower = true;
UpdateAppearance(uid);
}
private void OnToggleShowerVerb(EntityUid uid, ShowerComponent component, GetVerbsEvent<AlternativeVerb> args)
{
if (!args.CanInteract || !args.CanAccess || args.Hands == null)
return;

AlternativeVerb toggleVerb = new()
{
Act = () => ToggleShowerHead(uid, args.User, component)
};

if (component.ToggleShower)
{
toggleVerb.Text = Loc.GetString("shower-turn-on");
toggleVerb.Icon =
new SpriteSpecifier.Texture(new ResPath("/Textures/Interface/VerbIcons/open.svg.192dpi.png"));
}
else
{
toggleVerb.Text = Loc.GetString("shower-turn-off");
toggleVerb.Icon =
new SpriteSpecifier.Texture(new ResPath("/Textures/Interface/VerbIcons/close.svg.192dpi.png"));
}
args.Verbs.Add(toggleVerb);
}
private void OnActivateInWorld(EntityUid uid, ShowerComponent comp, ActivateInWorldEvent args)
{
if (args.Handled)
return;

args.Handled = true;
ToggleShowerHead(uid, args.User, comp);

_audio.PlayPvs(comp.EnableShowerSound, uid);
}
public void ToggleShowerHead(EntityUid uid, EntityUid? user = null, ShowerComponent? component = null, MetaDataComponent? meta = null)
{
if (!Resolve(uid, ref component))
return;

component.ToggleShower = !component.ToggleShower;

UpdateAppearance(uid, component);
}
private void UpdateAppearance(EntityUid uid, ShowerComponent? component = null)
{
if (!Resolve(uid, ref component))
return;

_appearance.SetData(uid, ShowerVisuals.ShowerVisualState, component.ToggleShower ? ShowerVisualState.On : ShowerVisualState.Off);

if (component.ToggleShower)
{
if (component.PlayingStream == null)
{
component.PlayingStream = _audio.PlayPvs(component.LoopingSound, uid, AudioParams.Default.WithLoop(true).WithMaxDistance(5)).Value.Entity;
}
}
else
{
component.PlayingStream = _audio.Stop(component.PlayingStream);
component.PlayingStream = null;
}
}
}
}
43 changes: 43 additions & 0 deletions Content.Shared/Showers/ShowerComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;

namespace Content.Shared.Showers
{
/// <summary>
/// showers that can be enabled
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class ShowerComponent : Component
{
/// <summary>
/// Toggles shower.
/// </summary>
[DataField, AutoNetworkedField]
public bool ToggleShower;

[DataField("enableShowerSound")]
public SoundSpecifier EnableShowerSound = new SoundPathSpecifier("/Audio/Ambience/Objects/shower_enable.ogg");

public EntityUid? PlayingStream;

[DataField("loopingSound")]
public SoundSpecifier LoopingSound = new SoundPathSpecifier("/Audio/Ambience/Objects/shower_running.ogg");

}


[Serializable, NetSerializable]
public enum ShowerVisuals : byte
{
ShowerVisualState,
}

[Serializable, NetSerializable]
public enum ShowerVisualState : byte
{
Off,
On
}
}

Binary file not shown.
Binary file not shown.
40 changes: 40 additions & 0 deletions Resources/Changelog/Changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5224,3 +5224,43 @@ Entries:
message: The maximum trait limit has increased from 5 traits to 10 traits.
id: 6252
time: '2024-08-11T02:08:37.0000000+00:00'
- author: Xavier
changes:
- type: Fix
message: Crew monitor not working properly, now displays correctly.
id: 6253
time: '2024-08-12T02:22:27.0000000+00:00'
- author: DangerRevolution
changes:
- type: Add
message: Added the Explorer's Labcoat and a Hairflower into Loadouts.
- type: Fix
message: Fixed Epistemics being unable to take Survival Boxes
- type: Fix
message: >-
Fixed the NearSighted trait making you unable to take glasses in your
loadout
- type: Add
message: Added a variety of Cowboy Hats into loadouts.
id: 6254
time: '2024-08-12T02:22:58.0000000+00:00'
- author: musicmanvr
changes:
- type: Add
message: Added the Home Run Bat for Syndicate operatives. Send your foes flying!
id: 6255
time: '2024-08-12T16:43:11.0000000+00:00'
- author: Tilkku
changes:
- type: Add
message: Added showers
id: 6256
time: '2024-08-12T16:46:05.0000000+00:00'
- author: gluesniffler
changes:
- type: Tweak
message: Changed hardsuit descriptions to be slightly less LRP.
- type: Tweak
message: Changed paramedic voidsuit from a softsuit to a hardsuit.
id: 6257
time: '2024-08-12T21:43:52.0000000+00:00'
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
ent-ClothingHeadHelmetHardsuitBasic = basic vacsuit helmet
.desc = A common vacsuit helmet that provides little more than basic protection from vacuum.
ent-ClothingHeadHelmetHardsuitAtmos = HpI-19t helmet
.desc = The Fotia's standard helmet, it features the same heat protection as the suit, along with some integrated protective gear for the wearer's head.
ent-ClothingHeadHelmetHardsuitEngineering = HpI-19r helmet
.desc = The Lampsi's standard helmet, it features the same radiation protection as the suit, along with some integrated protective gear for the wearer's head.
ent-ClothingHeadHelmetHardsuitSpatio = HpI-20s helmet
.desc = A lightweight helmet designed for the Kriti hardsuit, it allows for better mobility, along with some protection against radiation.
ent-ClothingHeadHelmetHardsuitSalvage = HpI-20a helmet
.desc = A bulky helmet designed for the Lavrion hardsuit, it has reinforced plating to protect the wearer's head in wildlife encounters.
ent-ClothingHeadHelmetHardsuitVoidParamed = ZhP-24m helmet
.desc = A lightweight helmet designed for use with the Sukunabikona hardsuit. Parts of the helmet are made of hard transparent plastics, allowing for better visibility.
ent-ClothingHeadHelmetHardsuitMaxim = mysterious helmet
.desc = An old looking helmet, it seems rather sturdy and lightweight. It also has an ominous red and black color scheme.
ent-ClothingHeadHelmetHardsuitSecurity = FPA-83s helmet
.desc = A bulky helmet deployed with the Baghatur tacsuit. Protects its wearer against ballistics and explosive ordinance, at the cost of some mobility.
ent-ClothingHeadHelmetHardsuitBrigmedic = FPA-84m helmet
.desc = A bulky helmet deployed with the Tsagaan tacsuit. Protects its wearer against ballistics and explosive ordinance, at the cost of some mobility.
ent-ClothingHeadHelmetHardsuitCombatStandard = FPA-85 helmet
.desc = A bulky helmet deployed with the Baghatur Mk.II tacsuit.
Protects its wearer against ballistics and explosive ordinance, at the cost of some mobility.
ent-ClothingHeadHelmetHardsuitCombatOfficer = FPA-85s helmet
.desc = { ent-ClothingHeadHelmetHardsuitCombatStandard.desc }
ent-ClothingHeadHelmetHardsuitCombatMedical = FPA-86 helmet
.desc = A bulky helmet deployed with the Tsagaan Mk.II tacsuit.
Protects its wearer against ballistics and explosive ordinance, at the cost of some mobility.
ent-ClothingHeadHelmetHardsuitCombatCorpsman = FPA-86m helmet
.desc = { ent-ClothingHeadHelmetHardsuitCombatMedical.desc }
ent-ClothingHeadHelmetHardsuitWarden = FPA-92s helmet
.desc = A modified riot-control helmet for use with the Sulde tacsuit. Offers better overall protection than standard tacsuits at the expense of mobility.
ent-ClothingHeadHelmetHardsuitCombatRiot = FPA-93 helmet
.desc = A modified riot-control helmet for use with the Sulde Mk.II tacsuit.
Offers better overall protection than other models at the expense of mobility.
ent-ClothingHeadHelmetHardsuitCombatWarden = FPA-93s helmet
.desc = { ent-ClothingHeadHelmetHardsuitCombatRiot.desc }
ent-ClothingHeadHelmetHardsuitCap = NT-42c helmet
.desc = A special helmet for the Tengri tacsuit, despite its lightweight appearance, it provides good all-around protection to its wearer.
ent-ClothingHeadHelmetHardsuitEngineeringWhite = HpI-24c helmet
.desc = A high-grade helmet used with the Daedalus hardsuit, it has a lighter construction than its standard counterparts, along with more radiation protection.
ent-ClothingHeadHelmetHardsuitMedical = ZhP-25m helmet
.desc = An extraordinarily lightweight helmet designed for use with the Okuninushi hardsuit.
It is primarily made from transparent hard-plastics, providing complete freedom of vision.
ent-ClothingHeadHelmetHardsuitRd = NT-45e helmet
.desc = A heavily armored helmet worn over the Sophia hardsuit. It boasts the same near-immunity to explosions, heat and radiation as the suit, but heavily restricts the wearer's mobility.
ent-ClothingHeadHelmetHardsuitMystagogue = NT-45e helmet
.desc = { ent-ClothingHeadHelmetHardsuitRd.desc }
ent-ClothingHeadHelmetHardsuitSecurityRed = FPA-98s helmet
.desc = A high quality helmet for the Dayicin tacsuit. It offers better overall protection than standard tacsuits without impacting mobility as much.
ent-ClothingHeadHelmetHardsuitCombatAdvanced = FPA-99 helmet
.desc = A high quality helmet for the Dayicin Mk.II tacsuit.
Features a lightweight construction, offering the same protection as a standard tacsuit without impacting mobility as much.
ent-ClothingHeadHelmetHardsuitCombatHoS = FPA-99s helmet
.desc = { ent-ClothingHeadHelmetHardsuitCombatAdvanced.desc }
ent-ClothingHeadHelmetHardsuitLuxury = HpI-20c helmet
.desc = A modified helmet for the Minos hardsuit, fashioned after the Logistics Officer's colors. It's been modified for greater mobility at the expense of physical trauma protection.
ent-ClothingHeadHelmetHardsuitSyndie = CSA-51a helmet
.desc = An armored helmet deployed over a Shanlin tacsuit. This one has been painted blood red.
ent-ClothingHeadHelmetHardsuitSyndieMedic = CSA-51m helmet
.desc = An armored helmet deployed over a Zhongyao tacsuit. features optic integrations for nearly every medical hud on the market.
Designed to enable the survival of combat medics in the most dangerous of environments.
ent-ClothingHeadHelmetHardsuitSyndieElite = CSA-54UA helmet
.desc = An elite version of the Shanlin tacsuit's helmet, featuring improved armor and fireproofing.
ent-ClothingHeadHelmetHardsuitSyndieCommander = CSA-54c helmet
.desc = A bulked up version of the Shanlin tacsuit's helmet, purpose-built for commanders of special operation squads. This one has been painted blood-red.
ent-ClothingHeadHelmetHardsuitCybersun = CSA-80UA helmet
.desc = An incredibly sturdy looking helmet designed for the Guan Yu tacsuit.
ent-ClothingHeadHelmetHardsuitWizard = WZD-84 helmet
.desc = A bizarre, gem-encrusted helmet from unknown origins. It provides some protection to its wearer without restricting their movements.
ent-ClothingHeadHelmetHardsuitLing = organic space helmet
.desc = A spaceworthy biomass of pressure and temperature resistant tissue.
ent-ClothingHeadHelmetHardsuitPirateEVA = pirate helmet
.desc = A pirate vacsuit helmet, very heavy but provides good protection.
.suffix = Pirate
ent-ClothingHeadHelmetHardsuitPirateCap = pirate captain's tacsuit helmet
.desc = A special hardsuit helmet, made for the captain of a pirate ship.
.suffix = Pirate
ent-ClothingHeadHelmetHardsuitSyndieReverseEngineered = NTSA-122 helmet
.desc = A sturdy, lightweight helmet made by the special adquisitions department of Nanotrasen.
ent-ClothingHeadHelmetHardsuitJuggernautReverseEngineered = NTSA-126 helmet
.desc = A very sturdy helmet made by the special acquisitions department of Nanotrasen, based on the "Juggernaut" tacsuit's design.
ent-ClothingHeadHelmetHardsuitERTCentcomm = NT-444c helmet
.desc = A special tacsuit helmet worn by Central Command Officers.
ent-ClothingHeadHelmetHardsuitERTLeader = NT-444l helmet
.desc = A special tacsuit helmet worn by leaders of an emergency response team.
ent-ClothingHeadHelmetHardsuitERTEngineer = NT-444e helmet
.desc = A special hardsuit helmet worn by members of an engineering emergency response team.
ent-ClothingHeadHelmetHardsuitERTMedical = NT-444m helmet
.desc = A special hardsuit helmet worn by members of a medical emergency response team.
ent-ClothingHeadHelmetHardsuitERTSecurity = NT-444s helmet
.desc = A special tacsuit helmet worn by members of a engineering emergency response team.
ent-ClothingHeadHelmetHardsuitERTJanitor = NT-444j helmet
.desc = A special hardsuit helmet worn by members of a janitorial emergency response team.
ent-ClothingHeadHelmetCBURN = NT-444-CBRN helmet
.desc = A pressure resistant and fireproof hood worn by special cleanup units.
ent-ClothingHeadHelmetHardsuitDeathsquad = NT-662ua helmet
.desc = A highly advanced, top of the line helmet used in special operations.
ent-ClothingHeadHelmetHardsuitClown = clown vacsuit helmet
.desc = A colorful clown vacsuit helmet. On closer inspection, it appears to be a normal helmet painted with crayons, and a clown mask glued on top.
ent-ClothingHeadHelmetHardsuitMime = mime vacsuit helmet
.desc = A mime vacsuit helmet. On closer inspection, it appears to be a normal helmet painted with crayons, and a mime mask glued on top.
ent-ClothingHeadHelmetHardsuitSanta = DNK-31 helmet
.desc = A festive-looking hardsuit helmet that provides the jolly gift-giver protection from low-pressure environments.
Loading

0 comments on commit 06755bb

Please sign in to comment.