Skip to content
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 2 additions & 3 deletions Content.Client/Anomaly/Effects/ClientInnerBodySystem.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Content.Shared._White.Body.Components;
using Content.Shared.Anomaly.Components;
using Content.Shared.Anomaly.Effects;
using Content.Shared.Body.Components;
using Robust.Client.GameObjects;

namespace Content.Client.Anomaly.Effects;
Expand All @@ -25,8 +25,7 @@ private void OnAfterHandleState(Entity<InnerBodyAnomalyComponent> ent, ref After
index = sprite.LayerMapReserveBlank(ent.Comp.LayerMap);

if (TryComp<BodyComponent>(ent, out var body) &&
body.Prototype is not null &&
ent.Comp.SpeciesSprites.TryGetValue(body.Prototype.Value, out var speciesSprite))
ent.Comp.SpeciesSprites.TryGetValue(body.Prototype, out var speciesSprite)) // WD EDIT
{
sprite.LayerSetSprite(index, speciesSprite);
}
Expand Down
80 changes: 0 additions & 80 deletions Content.Client/Body/Systems/BodySystem.cs

This file was deleted.

2 changes: 1 addition & 1 deletion Content.Client/CardboardBox/CardboardBoxSystem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Numerics;
using Content.Shared.Body.Components;
using Content.Shared._White.Body.Components;
using Content.Shared.CardboardBox;
using Content.Shared.CardboardBox.Components;
using Content.Shared.Examine;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Linq;
using Content.Shared._White.Body.Components;
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Atmos.Prototypes;
using Content.Shared.Body.Part;
using Content.Shared.Chemistry;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Components.SolutionManager;
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Commands/HideMechanismsCommand.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Content.Shared.Body.Organ;
using Content.Shared._White.Body.Components;
using Robust.Client.GameObjects;
using Robust.Shared.Console;
using Robust.Shared.Containers;
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Commands/ShowMechanismsCommand.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Content.Shared.Body.Organ;
using Content.Shared._White.Body.Components;
using Robust.Client.GameObjects;
using Robust.Shared.Console;

Expand Down
37 changes: 30 additions & 7 deletions Content.Client/Guidebook/Controls/GuideReagentEmbed.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
using Content.Client.Guidebook.Richtext;
using Content.Client.Message;
using Content.Client.UserInterface.ControlExtensions;
using Content.Shared.Body.Prototypes;
using Content.Shared.Chemistry.Reaction;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Localizations;
using JetBrains.Annotations;
using Robust.Client.AutoGenerated;
using Robust.Client.Graphics;
Expand Down Expand Up @@ -119,17 +119,25 @@ private void GenerateControl(ReagentPrototype reagent)
#region Effects
if (_chemistryGuideData.ReagentGuideRegistry.TryGetValue(reagent.ID, out var guideEntryRegistry) &&
guideEntryRegistry.GuideEntries != null &&
guideEntryRegistry.GuideEntries.Values.Any(pair => pair.EffectDescriptions.Any()))
guideEntryRegistry.GuideEntries.Values.Any(pair => pair.EffectDescriptions.Any() || pair.Metabolites?.Any() == true)) // WD EDI
{
EffectsDescriptionContainer.Children.Clear();
foreach (var (group, effect) in guideEntryRegistry.GuideEntries)
foreach (var (stage, effect) in guideEntryRegistry.GuideEntries) // WD EDIT
{
if (!effect.EffectDescriptions.Any())
// WD EDIT START
var hasMetabolites = effect.Metabolites.Any();
if (!effect.EffectDescriptions.Any() && !hasMetabolites)
// WD EDIT END
continue;

var groupLabel = new RichTextLabel();
groupLabel.SetMarkup(Loc.GetString("guidebook-reagent-effects-metabolism-group-rate",
("group", _prototype.Index<MetabolismGroupPrototype>(group).LocalizedName), ("rate", effect.MetabolismRate)));
// WD EDIT START
groupLabel.SetMarkup(
Loc.GetString(
"guidebook-reagent-effects-metabolism-stage-rate",
("group", _prototype.Index(stage).LocalizedName),
("stage", effect.MetabolismRate)));
// WD EDIT END
var descriptionLabel = new RichTextLabel
{
Margin = new Thickness(25, 0, 10, 0)
Expand All @@ -142,9 +150,24 @@ private void GenerateControl(ReagentPrototype reagent)
{
descMsg.AddMarkupOrThrow(effectString);
i++;
if (i < descriptionsCount)
if (i < descriptionsCount || hasMetabolites) // WD EDIT
descMsg.PushNewline();
}

// WD EDIT START
if (hasMetabolites)
{
var metabolites = new List<string>();
foreach (var (metabolite, ratio) in effect.Metabolites)
{
metabolites.Add(Loc.GetString("guidebook-reagent-effects-metabolite-item", ("rate", (double)ratio), ("reagent", _prototype.Index(metabolite).LocalizedName)));
}
metabolites.Sort();

descMsg.AddMarkupOrThrow(Loc.GetString("guidebook-reagent-effects-metabolites", ("items", ContentLocalizationManager.FormatList(metabolites))));
}
// WD EDIT END

descriptionLabel.SetMessage(descMsg);

EffectsDescriptionContainer.AddChild(groupLabel);
Expand Down
34 changes: 1 addition & 33 deletions Content.Client/Hands/Systems/HandsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
using Content.Client.Examine;
using Content.Client.Strip;
using Content.Client.Verbs.UI;
using Content.Shared._Shitmed.Body.Events;
using Content.Shared._White.Hands;
using Content.Shared._White.Hands.Components; // Shitmed Change
using Content.Shared.Body.Part; // Shitmed Change
using Content.Shared._White.Hands.Components;
using Content.Shared.Hands;
using Content.Shared.Hands.Components;
using Content.Shared.Hands.EntitySystems;
Expand Down Expand Up @@ -58,8 +56,6 @@ public override void Initialize()
SubscribeLocalEvent<HandsComponent, ComponentShutdown>(OnHandsShutdown);
SubscribeLocalEvent<HandsComponent, ComponentHandleState>(HandleComponentState);
SubscribeLocalEvent<HandsComponent, VisualsChangedEvent>(OnVisualsChanged);
SubscribeLocalEvent<HandsComponent, BodyPartRemovedEvent>(HandleBodyPartRemoved); // Shitmed Change
SubscribeLocalEvent<HandsComponent, BodyPartDisabledEvent>(HandleBodyPartDisabled); // Shitmed Change

SubscribeLocalEvent<HoldingDropComponent, ComponentInit>(HoldingDropComponentInit); // WWDP
SubscribeLocalEvent<HoldingDropComponent, ComponentShutdown>(HoldingDropComponentShutdown); // WWDP
Expand Down Expand Up @@ -287,34 +283,6 @@ public void UIHandAltActivateItem(string handName)

#region visuals

// Shitmed Change Start
private void HideLayers(EntityUid uid, HandsComponent component, Entity<BodyPartComponent> part, SpriteComponent? sprite = null)
{
if (part.Comp.PartType != BodyPartType.Hand || !Resolve(uid, ref sprite, logMissing: false))
return;

var location = part.Comp.Symmetry switch
{
BodyPartSymmetry.None => HandLocation.Middle,
BodyPartSymmetry.Left => HandLocation.Left,
BodyPartSymmetry.Right => HandLocation.Right,
_ => throw new ArgumentOutOfRangeException(nameof(part.Comp.Symmetry))
};

if (component.RevealedLayers.TryGetValue(location, out var revealedLayers))
{
foreach (var key in revealedLayers)
sprite.RemoveLayer(key);

revealedLayers.Clear();
}
}

private void HandleBodyPartRemoved(EntityUid uid, HandsComponent component, ref BodyPartRemovedEvent args) => HideLayers(uid, component, args.Part);

private void HandleBodyPartDisabled(EntityUid uid, HandsComponent component, ref BodyPartDisabledEvent args) => HideLayers(uid, component, args.Part);

// Shitmed Change End
protected override void HandleEntityInserted(EntityUid uid, HandsComponent hands, EntInsertedIntoContainerMessage args)
{
base.HandleEntityInserted(uid, hands, args);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Content.Shared.MedicalScanner;
using Content.Shared._Shitmed.Targeting; // Shitmed Change
using JetBrains.Annotations;
using Robust.Client.UserInterface;

Expand All @@ -20,11 +19,10 @@ protected override void Open()
base.Open();

_window = this.CreateWindow<HealthAnalyzerWindow>();
_window.OnBodyPartSelected += SendBodyPartMessage; // Shitmed Change

_window.Title = EntMan.GetComponent<MetaDataComponent>(Owner).EntityName;
}


protected override void ReceiveMessage(BoundUserInterfaceMessage message)
{
if (_window == null)
Expand All @@ -35,21 +33,5 @@ protected override void ReceiveMessage(BoundUserInterfaceMessage message)

_window.Populate(cast);
}

// Shitmed Change Start
private void SendBodyPartMessage(TargetBodyPart? part, EntityUid target) => SendMessage(new HealthAnalyzerPartMessage(EntMan.GetNetEntity(target), part ?? null));
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
if (!disposing)
return;

if (_window != null)
_window.OnBodyPartSelected -= SendBodyPartMessage;

_window?.Dispose();
}

// Shitmed Change End
}
}
Loading