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

Будущий реворк хирургии #245

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
e96dc02
Revert "Surgery fixes (#221)"
desuwatch Jan 18, 2025
0a30de4
Revert "Disabled mood (#171)"
desuwatch Jan 18, 2025
d1606ee
Revert "Merge pull request #168 from AwareFoxy/surg-hotfix-mood"
desuwatch Jan 18, 2025
d9fc898
Revert "Merge pull request #165 from Ko4ergaNext/surgeon-pda"
desuwatch Jan 18, 2025
f574764
Revert "Merge pull request #164 from Ko4ergaNext/surgeon-spawnpoint"
desuwatch Jan 18, 2025
e1bcd74
Revert "Merge pull request #163 from AwareFoxy/upd-surgery-playtime"
desuwatch Jan 18, 2025
cec532a
Revert "Adds Surgeon role & surgical belt (#146)"
desuwatch Jan 18, 2025
126de33
Revert "medfab_cmo_locker"
desuwatch Jan 18, 2025
e1498ec
Revert "Merge pull request #142 from CaptainSqrBeard/researchable_bio…
desuwatch Jan 18, 2025
47041d9
Revert "Merge pull request #106 from TokenStyle/surgery-ohio-fix"
desuwatch Jan 18, 2025
76c1baf
Revert "[Port] ohio accent port fixes (#95)"
desuwatch Jan 18, 2025
9065057
Revert "Merge pull request #93 from TokenStyle/shitmed-hotfix-slots"
desuwatch Jan 18, 2025
a017160
Revert "[Port] Хирургия макак, рыб и кучу чего ещё (work in progress)…
desuwatch Jan 18, 2025
511cd42
Revert "[Fix] Хирургия фикс выпадения органов у частей тела вместо хо…
desuwatch Jan 18, 2025
f18c9b2
Revert "[Hotfix] Хирургия части тела теперь уничтожаемы (#73)"
desuwatch Jan 18, 2025
5fe6144
Revert "Хирургия (попытка 2) (#65)"
desuwatch Jan 18, 2025
ee7e119
Fixing reverting issues
desuwatch Jan 18, 2025
4cd47f9
Fixing prototypes error
desuwatch Jan 18, 2025
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
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions Content.Client/Body/Systems/BodySystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using Content.Shared.Body.Systems;

namespace Content.Client.Body.Systems;

public sealed class BodySystem : SharedBodySystem
{
}
2 changes: 1 addition & 1 deletion Content.Client/Buckle/BuckleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ private void OnAppearanceChange(EntityUid uid, BuckleComponent component, ref Ap
!buckled ||
args.Sprite == null)
{
// CorvaxNext: Laying System
// _CorvaxNext: Laying System
//_rotationVisualizerSystem.SetHorizontalAngle((uid, rotVisuals), rotVisuals.DefaultRotation);
return;
}
Expand Down
38 changes: 1 addition & 37 deletions Content.Client/Hands/Systems/HandsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
using Content.Client.Examine;
using Content.Client.Strip;
using Content.Client.Verbs.UI;
using Content.Shared._CorvaxNext.Surgery.Body.Events;
using Content.Shared.Body.Part;
using Content.Shared.Hands;
using Content.Shared.Hands.Components;
using Content.Shared.Hands.EntitySystems;
Expand Down Expand Up @@ -42,6 +40,7 @@ public sealed class HandsSystem : SharedHandsSystem
public event Action<string, EntityUid>? OnPlayerItemRemoved;
public event Action<string>? OnPlayerHandBlocked;
public event Action<string>? OnPlayerHandUnblocked;

public override void Initialize()
{
base.Initialize();
Expand All @@ -52,8 +51,6 @@ public override void Initialize()
SubscribeLocalEvent<HandsComponent, ComponentShutdown>(OnHandsShutdown);
SubscribeLocalEvent<HandsComponent, ComponentHandleState>(HandleComponentState);
SubscribeLocalEvent<HandsComponent, VisualsChangedEvent>(OnVisualsChanged);
SubscribeLocalEvent<HandsComponent, BodyPartRemovedEvent>(HandleBodyPartRemoved); // CorvaxNext: surgery
SubscribeLocalEvent<HandsComponent, BodyPartDisabledEvent>(HandleBodyPartDisabled); // CorvaxNext: surgery

OnHandSetActive += OnHandActivated;
}
Expand Down Expand Up @@ -241,40 +238,8 @@ public void UIHandAltActivateItem(string handName)
RaisePredictiveEvent(new RequestHandAltInteractEvent(handName));
}

#region pulling

#endregion

#region visuals

// start-_CorvaxNext: surgery
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);
// end-_CorvaxNext: surgery

protected override void HandleEntityInserted(EntityUid uid, HandsComponent hands, EntInsertedIntoContainerMessage args)
{
base.HandleEntityInserted(uid, hands, args);
Expand All @@ -299,7 +264,6 @@ protected override void HandleEntityRemoved(EntityUid uid, HandsComponent hands,

if (!hands.Hands.TryGetValue(args.Container.ID, out var hand))
return;

UpdateHandVisuals(uid, args.Entity, hand);
_stripSys.UpdateUi(uid);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Content.Shared.MedicalScanner;
using Content.Shared._CorvaxNext.Targeting;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
using Robust.Client.UserInterface;

namespace Content.Client.HealthAnalyzer.UI
{
Expand All @@ -18,13 +17,10 @@ public HealthAnalyzerBoundUserInterface(EntityUid owner, Enum uiKey) : base(owne
protected override void Open()
{
base.Open();
_window = new HealthAnalyzerWindow
{
Title = EntMan.GetComponent<MetaDataComponent>(Owner).EntityName,
};
_window.OnClose += Close;
_window.OnBodyPartSelected += SendBodyPartMessage;
_window.OpenCentered();

_window = this.CreateWindow<HealthAnalyzerWindow>();

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

protected override void ReceiveMessage(BoundUserInterfaceMessage message)
Expand All @@ -37,22 +33,5 @@ protected override void ReceiveMessage(BoundUserInterfaceMessage message)

_window.Populate(cast);
}

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.OnClose -= Close;
_window.OnBodyPartSelected -= SendBodyPartMessage;
}

_window?.Dispose();
}
}
}
222 changes: 26 additions & 196 deletions Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<controls:FancyWindow
<controls:FancyWindow
xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
MaxHeight="525"
MinWidth="350">
MinWidth="300">
<ScrollContainer
Margin="5 5 5 5"
ReturnMeasure="True"
Expand All @@ -13,215 +13,45 @@
Orientation="Vertical">
<Label
Name="NoPatientDataText"
Text="{Loc health-analyzer-window-no-patient-data-text}"/>
<Button Name="ReturnButton"
Text="{Loc 'health-analyzer-window-return-button-text'}"
Margin="0 0 0 10"
HorizontalExpand="False"/>
Text="{Loc health-analyzer-window-no-patient-data-text}" />

<BoxContainer
Name="PatientDataContainer"
Margin="0 0 0 5"
Orientation="Vertical">
<BoxContainer Orientation="Horizontal"
Margin="0 0 0 5">
<PanelContainer>
<SpriteView OverrideDirection="South"
Scale="2.5 2.5"
Name="SpriteView"
Access="Public"
SetSize="96 96"/>
<PanelContainer
Name="PartView"
SetSize="57 96"
Margin="18 0 0 0"
VerticalAlignment="Center"
HorizontalAlignment="Left">
<PanelContainer
SetSize="15 33"
Margin="4 0 0 0"
HorizontalAlignment="Left">
<TextureButton
Name="RightArmButton"
MinSize="15 25"
StyleClasses="TargetDollButtonRightArm"
VerticalAlignment="Top">
</TextureButton>
<TextureButton
Name="RightHandButton"
MinSize="15 15"
VerticalAlignment="Bottom"
StyleClasses="TargetDollButtonRightHand">
</TextureButton>
</PanelContainer>
<PanelContainer
SetSize="43 75"
Margin="0 0 0 0"
VerticalAlignment="Center"
HorizontalAlignment="Center">
<TextureButton
Name="HeadButton"
MinSize="28 23"
VerticalAlignment="Top"
HorizontalAlignment="Center"
StyleClasses="TargetDollButtonHead">
<!--<PanelContainer
SetSize="15 15"
Margin="0 9 0 0"
HorizontalAlignment="Center">
<TextureButton
Name="EyesButton"
MinSize="15 9"
VerticalAlignment="Top"
StyleClasses="TargetDollButtonEyes">
<TextureRect
TexturePath="/Textures/Interface/Targeting/Doll/eyes.png"
Stretch="KeepAspectCentered"
SetSize="15 9"/>
</TextureButton>
<TextureButton
Name="MouthButton"
SetSize="9 6"
VerticalAlignment="Bottom"
StyleClasses="TargetDollButtonMouth">
<TextureRect
TexturePath="/Textures/Interface/Targeting/Doll/mouth.png"
Stretch="KeepAspectCentered"
SetSize="9 6"/>
</TextureButton>
</PanelContainer>-->
</TextureButton>
<TextureButton
Name="ChestButton"
SetSize="28 30"
Margin="0 18 0 0"
VerticalAlignment="Top"
HorizontalAlignment="Center"
StyleClasses="TargetDollButtonChest">
</TextureButton>
<PanelContainer
MinSize="38 35"
VerticalAlignment="Bottom"
HorizontalAlignment="Center">
<TextureButton
Name="GroinButton"
MinSize="28 15"
VerticalAlignment="Top"
HorizontalAlignment="Center"
StyleClasses="TargetDollButtonGroin">
</TextureButton>
<PanelContainer
MinSize="20 30"
VerticalAlignment="Bottom"
HorizontalAlignment="Right">
<TextureButton
Name="LeftLegButton"
MinSize="15 28"
VerticalAlignment="Top"
HorizontalAlignment="Left"
StyleClasses="TargetDollButtonLeftLeg">
</TextureButton>
<TextureButton
Name="LeftFootButton"
MinSize="20 10"
VerticalAlignment="Bottom"
StyleClasses="TargetDollButtonLeftFoot">
</TextureButton>
</PanelContainer>
<PanelContainer
MinSize="20 30"
VerticalAlignment="Bottom"
HorizontalAlignment="Left">
<TextureButton
Name="RightLegButton"
MinSize="15 28"
VerticalAlignment="Top"
HorizontalAlignment="Right"
StyleClasses="TargetDollButtonRightLeg">
</TextureButton>
<TextureButton
Name="RightFootButton"
MinSize="20 10"
VerticalAlignment="Bottom"
HorizontalAlignment="Center"
StyleClasses="TargetDollButtonRightFoot">
</TextureButton>
</PanelContainer>
</PanelContainer>
</PanelContainer>
<PanelContainer
SetSize="15 33"
Margin="0 0 4 0"
HorizontalAlignment="Right">
<TextureButton
Name="LeftArmButton"
MinSize="15 25"
StyleClasses="TargetDollButtonLeftArm"
VerticalAlignment="Top">
</TextureButton>
<TextureButton
Name="LeftHandButton"
MinSize="15 15"
VerticalAlignment="Bottom"
StyleClasses="TargetDollButtonLeftHand">
</TextureButton>
</PanelContainer>
</PanelContainer>
</PanelContainer>
<TextureRect Name="NoDataTex"
Access="Public"
SetSize="64 64"
Visible="false"
Stretch="KeepAspectCentered"
TexturePath="/Textures/Interface/Misc/health_analyzer_out_of_range.png"/>
<BoxContainer Margin="5 0 0 0"
Orientation="Vertical"
VerticalAlignment="Top">
<RichTextLabel Name="NameLabel"
SetWidth="150"/>
<Label Name="SpeciesLabel"
VerticalAlignment="Top"
StyleClasses="LabelSubText"/>
<Label Name="PartNameLabel"
VerticalAlignment="Bottom"
StyleClasses="LabelSubText"/>
<BoxContainer Orientation="Horizontal" Margin="0 0 0 5">
<SpriteView OverrideDirection="South" Scale="2 2" Name="SpriteView" Access="Public" SetSize="64 64" />
<TextureRect Name="NoDataTex" Access="Public" SetSize="64 64" Visible="false" Stretch="KeepAspectCentered" TexturePath="/Textures/Interface/Misc/health_analyzer_out_of_range.png"/>
<BoxContainer Margin="5 0 0 0" Orientation="Vertical" VerticalAlignment="Top">
<RichTextLabel Name="NameLabel" SetWidth="150" />
<Label Name="SpeciesLabel" VerticalAlignment="Top" StyleClasses="LabelSubText" />
</BoxContainer>
<Label Margin="0 0 5 0"
HorizontalExpand="True"
HorizontalAlignment="Right"
VerticalExpand="True"
VerticalAlignment="Top"
Name="ScanModeLabel"
Text="{Loc 'health-analyzer-window-entity-unknown-text'}"/>
<Label Margin="0 0 5 0" HorizontalExpand="True" HorizontalAlignment="Right" VerticalExpand="True"
VerticalAlignment="Top" Name="ScanModeLabel"
Text="{Loc 'health-analyzer-window-entity-unknown-text'}" />
</BoxContainer>

<PanelContainer StyleClasses="LowDivider"/>
<PanelContainer StyleClasses="LowDivider" />

<GridContainer Margin="0 5 0 0"
Columns="2">
<Label Text="{Loc 'health-analyzer-window-entity-status-text'}"/>
<Label Name="StatusLabel"/>
<Label Text="{Loc 'health-analyzer-window-entity-temperature-text'}"/>
<Label Name="TemperatureLabel"/>
<Label Text="{Loc 'health-analyzer-window-entity-blood-level-text'}"/>
<Label Name="BloodLabel"/>
<Label Text="{Loc 'health-analyzer-window-entity-damage-total-text'}"/>
<Label Name="DamageLabel"/>
<GridContainer Margin="0 5 0 0" Columns="2">
<Label Text="{Loc 'health-analyzer-window-entity-status-text'}" />
<Label Name="StatusLabel" />
<Label Text="{Loc 'health-analyzer-window-entity-temperature-text'}" />
<Label Name="TemperatureLabel" />
<Label Text="{Loc 'health-analyzer-window-entity-blood-level-text'}" />
<Label Name="BloodLabel" />
<Label Text="{Loc 'health-analyzer-window-entity-damage-total-text'}" />
<Label Name="DamageLabel" />
</GridContainer>
</BoxContainer>

<PanelContainer Name="AlertsDivider"
Visible="False"
StyleClasses="LowDivider"/>
<PanelContainer Name="AlertsDivider" Visible="False" StyleClasses="LowDivider" />

<BoxContainer Name="AlertsContainer"
Visible="False"
Margin="0 5"
Orientation="Vertical"
HorizontalAlignment="Center">
<BoxContainer Name="AlertsContainer" Visible="False" Margin="0 5" Orientation="Vertical" HorizontalAlignment="Center">

</BoxContainer>

<PanelContainer StyleClasses="LowDivider"/>
<PanelContainer StyleClasses="LowDivider" />

<BoxContainer
Name="GroupsContainer"
Expand Down
Loading
Loading