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

NewMed, Implementing Medical Gameplay into SS14 #19383

Draft
wants to merge 160 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
160 commits
Select commit Hold shift + click to select a range
ada43fb
Started work on rewrite/cleaned up version of woundmed
Jezithyr Jan 31, 2024
c8974f9
started working on gibing system
Jezithyr Jan 31, 2024
c0e90de
Implementing gibing system
Jezithyr Feb 1, 2024
ab1aae6
Made gibbing system alot more simple to use
Jezithyr Feb 1, 2024
82b6a9e
Converted bodysystem gibbing to use new system
Jezithyr Feb 1, 2024
53bc599
Updated gibbing system
Jezithyr Feb 1, 2024
a23bfb9
Finished updating gibbing
Jezithyr Feb 6, 2024
e4663b5
update rt
Jezithyr Feb 6, 2024
d3380ba
Moving Gibbing rework out from medrefactor into it's own PR
Jezithyr Feb 6, 2024
2a9fbe1
Re-enabled warning for missing gibbable on TryGibEntity
Jezithyr Feb 6, 2024
cfe7f9a
Implemented better logic for gibbing failover and better logging
Jezithyr Feb 6, 2024
1dd0889
Merge branch 'gibbing-refactor' into MedicalRefactorV2
Jezithyr Feb 6, 2024
1cb9209
Implemented part gibbing and wound removal
Jezithyr Feb 6, 2024
0000af7
Implemented force logic for cancelable events and added cancelling fo…
Jezithyr Feb 6, 2024
b1c9a72
Started implementing healing
Jezithyr Feb 10, 2024
8c7a4e4
Merge branch 'space-wizards:master' into MedicalRefactorV2
Jezithyr Feb 10, 2024
b5eb4ea
Merge branch 'space-wizards:master' into gibbing-refactor
Jezithyr Feb 10, 2024
31aa5cd
Allowing audio params and drop scattering customization per component…
Jezithyr Feb 10, 2024
040cb81
Merge branch 'gibbing-refactor' into MedicalRefactorV2
Jezithyr Feb 10, 2024
d4f15c7
Merge branch 'MedicalRefactorV2' of https://github.com/Jezithyr/space…
Jezithyr Feb 10, 2024
923b37a
clean up signatures to use Entity<T> instead of old method
Jezithyr Feb 10, 2024
41b55f5
removed unused init func
Jezithyr Feb 10, 2024
b6ef619
Update Content.Shared/Body/Systems/SharedBodySystem.Body.cs
Jezithyr Feb 10, 2024
6e7e4fd
Event cleanup, updating a few signatures, setup api for setting key w…
Jezithyr Feb 10, 2024
648d7c7
Added event raised when attempting to gib contained entities to allow…
Jezithyr Feb 10, 2024
efa6134
Merge branch 'gibbing-refactor' into MedicalRefactorV2
Jezithyr Feb 10, 2024
a1b8515
Removing audio params because it's included in soundSpecifier
Jezithyr Feb 10, 2024
d45fe7a
removing audioParams var from component (sound specifier includes it)
Jezithyr Feb 10, 2024
66a8326
Merge branch 'gibbing-refactor' into MedicalRefactorV2
Jezithyr Feb 10, 2024
adea949
Fixing signature
Jezithyr Feb 10, 2024
edc9168
Merge branch 'gibbing-refactor' into MedicalRefactorV2
Jezithyr Feb 10, 2024
103ad82
Merge branch 'master' into MedicalRefactorV2
Jezithyr Feb 11, 2024
5dd38ee
Separated wound/woundable events into separate files
Jezithyr Feb 11, 2024
d4e205a
Finished Implementing consciousness system
Jezithyr Feb 11, 2024
c9b7e66
Merge branch 'space-wizards:master' into MedicalRefactorV2
Jezithyr Feb 11, 2024
d51dfa6
Merge branch 'space-wizards:master' into MedicalRefactor
Jezithyr Feb 12, 2024
c681384
Merge branch 'space-wizards:master' into MedicalRefactor
Jezithyr Feb 12, 2024
4fb5a7f
Created healthCondition and pain systems.
Jezithyr Feb 12, 2024
fdf9263
Merge branch 'space-wizards:master' into MedicalRefactor
Jezithyr Feb 12, 2024
df67254
Preventing condition severity desync issues
Jezithyr Feb 13, 2024
5132b80
Merge branch 'space-wizards:master' into MedicalRefactor
Jezithyr Feb 14, 2024
bdd6eb5
removing hardcoded pain conditions
Jezithyr Feb 15, 2024
03d78b0
Merge branch 'space-wizards:master' into MedicalRefactor
Jezithyr Feb 15, 2024
2516517
fixing state generation and dict serialization
Jezithyr Feb 29, 2024
ae6cc96
Merge branch 'space-wizards:master' into MedicalRefactor
Jezithyr Feb 29, 2024
6c73414
Updated Nymphs to use new organ events
Jezithyr Feb 29, 2024
fe71a3c
Merge branch 'space-wizards:master' into MedicalRefactor
Jezithyr Mar 14, 2024
f0be8c3
Fix duplicate event subscription and removed generated constructor fr…
Jezithyr Mar 14, 2024
1532672
Started work on MedInspector UI
Jezithyr Mar 14, 2024
1c3c225
Fix too many children error
ShadowCommander Mar 14, 2024
383227a
Right align Overview Tab
ShadowCommander Mar 14, 2024
2588b1f
Merge branch 'space-wizards:master' into MedicalRefactor
Jezithyr Mar 14, 2024
8f3cc58
fixing medMenu
Jezithyr Mar 15, 2024
960f271
Setup wound prototypes
Jezithyr Mar 15, 2024
2340f55
Merge branch 'space-wizards:master' into MedicalRefactor
Jezithyr Mar 15, 2024
72dc59c
Setup woundpools
Jezithyr Mar 16, 2024
ae5267f
Merge branch 'space-wizards:master' into MedicalRefactor
Jezithyr Mar 18, 2024
e3e2e1b
Setup wound propagation and fixed an issue where wounds were not bein…
Jezithyr Mar 19, 2024
9e27be1
Rewrote wounding logic to separate out wound affects into "Traumas" a…
Jezithyr Mar 19, 2024
c4bfbdc
Fixed wound debug print and debug wound print action. Fixed exception…
Jezithyr Mar 20, 2024
b196330
Woundable damage relaying implemented and fixed. Stub for part gibbin…
Jezithyr Mar 20, 2024
55a7fb0
Switched species to use consciousness instead of mobthresholds, addin…
Jezithyr Mar 22, 2024
e04504d
Implemented pain and consciousness
Jezithyr Mar 24, 2024
c47abc3
Added support for multiple consciousness providers (brains) to affect…
Jezithyr Mar 24, 2024
4a369dc
Fixing some prediction issues
Jezithyr Mar 24, 2024
87830c9
Renamed delta to decrease in traumas to make it more easy to understa…
Jezithyr Mar 24, 2024
f996393
Fixed issue with bodyparts not having bodypartadded/removed events no…
Jezithyr Mar 24, 2024
df46158
converted comp inits to map inits to not get ass-blasted by tests.
Jezithyr Mar 26, 2024
2855f67
fix gen error
Jezithyr Mar 26, 2024
780b749
Commented out most uses of bloodstream in preparation for refactoring…
Jezithyr Mar 27, 2024
e7a7900
Temporarily removed required from datafields on bloodstream, added au…
Jezithyr Mar 27, 2024
ed9bd6b
Created Bleed Pool component to handle non-body-sim bleeding logic.
Jezithyr Mar 27, 2024
fc5b591
Merge remote-tracking branch 'origin/master' into MedicalRefactor
Jezithyr Mar 28, 2024
32e1e94
Fix bodycleanup conflicts pt1
Jezithyr Mar 28, 2024
962abd2
Fix submodule
Jezithyr Mar 28, 2024
6cb9182
Fix merge conflicts part 2
Jezithyr Mar 28, 2024
7d7c33d
Removed body init event because it isn't needed.
Jezithyr Mar 30, 2024
d535d43
Setup humanoid blood
Jezithyr Mar 30, 2024
761837a
pre-rewrite
Jezithyr Mar 31, 2024
c4cbc84
Renamed bleedpool back to bloodstream to prevent compatibility issues…
Jezithyr Mar 31, 2024
77d3aca
Fixed some confusing naming on bloodstreamComponent
Jezithyr Mar 31, 2024
66db5c6
Fixed namespaces and created metabolism stubs
Jezithyr Mar 31, 2024
1c5b950
update RT
Jezithyr Apr 4, 2024
9986efa
Merge branch 'master' into MedicalRefactor
Jezithyr Apr 4, 2024
4866ebf
fix errors after merge
Jezithyr Apr 4, 2024
ce13102
started work on absorption system which is a more generic replacement…
Jezithyr Apr 4, 2024
4bef37e
Created Absorption system
Jezithyr Apr 6, 2024
d95edf1
Created solutionEvents
Jezithyr Apr 6, 2024
e4dc2d4
Fix sandbox violation (System.debug my beloved)
Jezithyr Apr 6, 2024
e3253ff
Moved absorptions to run AFTER reactions on UpdateChemicals
Jezithyr Apr 6, 2024
a8e1964
Metabolism Stubs
Jezithyr Apr 6, 2024
da0cd32
Removing unneeded include
Jezithyr Apr 12, 2024
c36d642
Merge branch 'master' into MedicalRefactor
Jezithyr Apr 12, 2024
d0cb974
Added Organ and part efficiency
Jezithyr Apr 12, 2024
2dd4cd1
Fixing issue with SuitSensors requiring mobthresholds. Disabled this …
Jezithyr Apr 12, 2024
fa8734e
Started implementing digestion (replacement for stomach component)
Jezithyr Apr 12, 2024
3dce335
disabling old bodysim
Jezithyr Apr 20, 2024
ad6f4cb
Merge branch 'master' into MedicalRefactor
Jezithyr Apr 20, 2024
f25c408
created files for respiration
Jezithyr Apr 20, 2024
535137a
Started implementing respiration
Jezithyr Apr 20, 2024
9f10b56
implemented breathing system
Jezithyr Apr 25, 2024
438480f
Fixed issue with bloodData, added dissolvedReagentSolution to bloodst…
Jezithyr Apr 26, 2024
01fb36c
Renamed ReagentData to ReagentDiscriminator
Jezithyr Apr 26, 2024
ecd2d39
Renaming bloodReagentData
Jezithyr Apr 26, 2024
195f199
Fixing name again
Jezithyr Apr 26, 2024
d542cb4
I can't fucking spell apparently
Jezithyr Apr 26, 2024
6855caa
more missed name changes
Jezithyr Apr 26, 2024
6ef4058
RiderIsAFunctionalIdeRiderIsAFunctionalIdeRiderIsAFunctionalIdeRiderI…
Jezithyr Apr 26, 2024
28cc884
Added concentration utility methods to bloodstream, added helpers for…
Jezithyr Apr 26, 2024
53a3f45
Added warning to tryGetSolution, moved SolutionContainer code to shared
Jezithyr Apr 29, 2024
a652a18
Merge branch 'refs/heads/master' into MedicalRefactor
Jezithyr Apr 29, 2024
ce5baba
Merge branch 'refs/heads/master' into MedicalRefactor
Jezithyr Apr 29, 2024
50a4883
fixbuild
Jezithyr Apr 29, 2024
83873f4
fix test, idk why this was missing thanks rider
Jezithyr Apr 29, 2024
ac85308
Moved GasMixture to shared
Jezithyr Apr 29, 2024
effe765
Temp Fix for sandbox violation, idk why Array.Resize isn't working pr…
Jezithyr Apr 29, 2024
0bb7af2
Merge branch 'space-wizards:master' into MedicalRefactor
Jezithyr Apr 29, 2024
37047ba
Merge remote-tracking branch 'refs/remotes/origin/SharedGasMixture' i…
Jezithyr Apr 29, 2024
34ece71
Merge remote-tracking branch 'refs/remotes/origin/chemsolutionFixes' …
Jezithyr Apr 29, 2024
d19466a
Fixes for required PR merges
Jezithyr Apr 29, 2024
1e3139f
Update SharedSolutionContainerSystem.cs
Jezithyr Apr 29, 2024
96bc94e
Added helper ensure methods
Jezithyr Apr 29, 2024
9acb630
Update SharedSolutionContainerSystem.cs
Jezithyr Apr 29, 2024
0d9eaa0
Update SolutionContainerSystem.cs
Jezithyr Apr 29, 2024
8b445da
Updated EnsureSolutionEntity
Jezithyr Apr 29, 2024
6844b8c
Update SharedSolutionContainerSystem.cs
Jezithyr Apr 29, 2024
a8549a5
another usability update
Jezithyr Apr 29, 2024
6814021
oops lol
Jezithyr Apr 29, 2024
b622c70
Converting bloodstream to use new ensures and cached entity values
Jezithyr Apr 29, 2024
ab7854d
fix conflict
Jezithyr Apr 30, 2024
b69dde4
Merge remote-tracking branch 'refs/remotes/origin/master' into Medica…
Jezithyr Apr 30, 2024
b8bd9df
Fix conflict
Jezithyr Apr 30, 2024
f8cd3c6
Merge branch 'space-wizards:master' into chemsolutionFixes
Jezithyr May 1, 2024
90959ed
Fixing ensuring chem solutions always returning false on client
Jezithyr May 1, 2024
28e4306
Merge branch 'refs/heads/chemsolutionFixes' into MedicalRefactor
Jezithyr May 3, 2024
6f4376c
moved gasmix to lungsComp in shared
Jezithyr May 3, 2024
0ec2804
Add Unique wounds for woundables.
nikthechampiongr May 5, 2024
ca8d054
Remove outdated comment.
nikthechampiongr May 5, 2024
c148cd0
Merge pull request #4 from nikthechampiongr/singleton_wounds
Jezithyr May 6, 2024
06ee750
Merge branch 'refs/heads/master' into MedicalRefactor
Jezithyr May 7, 2024
fab64d0
fix merge conflicts
Jezithyr May 7, 2024
8347b1c
Merge branch 'refs/heads/master' into MedicalRefactor
Jezithyr May 7, 2024
e5a1e3d
Implemented new metabolism/respiration system, cleaned up lungs a bit
Jezithyr May 8, 2024
4a8f053
remove empty func
Jezithyr May 8, 2024
c39eeae
fixing comp being abstract, added metabolism to organs
Jezithyr May 8, 2024
27b4562
Changing reptilian's to use human organs because why the hell were th…
Jezithyr May 9, 2024
ce40026
rewrote breathing logic to handle target ranges for metabolism instea…
Jezithyr May 9, 2024
cb1baad
Merge branch 'refs/heads/master' into MedicalRefactor
Jezithyr May 11, 2024
77f9440
Merge branch 'refs/heads/master' into MedicalRefactor
Jezithyr May 14, 2024
35f42ea
Fix lung absorption not updating fast enough
Jezithyr May 15, 2024
1d6edc3
Renamed metabolismComp to metabolizerComp, started implementing calor…
Jezithyr May 15, 2024
f6c9b95
WIP metabolism part of digestion
Jezithyr May 15, 2024
e070173
Merge branch 'refs/heads/master' into MedicalRefactor
Jezithyr May 19, 2024
e60cb7a
Started work on rewriting digestion
Jezithyr May 23, 2024
5d7d3df
Merge branch 'space-wizards:master' into MedicalRefactor
Jezithyr May 23, 2024
99e8909
Created placeholder rate reaction code and continued working on diges…
Jezithyr May 23, 2024
a1ff70c
Implemented digestion reactions
Jezithyr May 23, 2024
85bc095
fix missing serializable
Jezithyr May 31, 2024
9a28ca6
Merge branch 'master' into MedicalRefactor
AJCM-git Jun 23, 2024
af36da5
Make it actually run
AJCM-git Jun 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Content.Client/Content.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
</ItemGroup>
<ItemGroup>
<Folder Include="Spawners\" />
<Folder Include="UserInterface\Systems\MedicalMenu\Widgets\" />
</ItemGroup>
<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
<Import Project="..\RobustToolbox\MSBuild\XamlIL.targets" />
Expand Down
82 changes: 82 additions & 0 deletions Content.Client/Medical/MedicalMenuSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
using System.Linq;
using Content.Client.Administration.Managers;
using Content.Client.Interactable;
using Content.Client.UserInterface.Systems.MedicalMenu;
using Content.Shared.Administration;
using Content.Shared.FixedPoint;
using Content.Shared.Medical.Wounding.Components;
using Content.Shared.Verbs;
using Robust.Client.Console;
using Robust.Client.GameObjects;
using Robust.Client.UserInterface;
using Robust.Shared.Console;
using Robust.Shared.Containers;
using Robust.Shared.Player;
using Robust.Shared.Toolshed;
using Robust.Shared.Utility;

namespace Content.Client.Medical;

public sealed class MedicalMenuSystem : EntitySystem
{
[Dependency] private readonly InteractionSystem _interaction = default!;
[Dependency] private readonly SharedContainerSystem _containerSystem = default!;
[Dependency] private readonly ISharedPlayerManager _player = default!;
[Dependency] private readonly IUserInterfaceManager _uiManager = default!;
[Dependency] private readonly IClientAdminManager _adminManager = default!;
[Dependency] private readonly IConsoleHost _console = default!;
[Dependency] private readonly EntityManager _entityManager = default!;

private MedicalMenuUIController _medMenuController = default!;

//TODO: make this a CVAR
private readonly float MaxMedInspectRange = 15f;

public override void Initialize()
{
_medMenuController = _uiManager.GetUIController<MedicalMenuUIController>();
SubscribeLocalEvent<MedicalDataComponent, GetVerbsEvent<Verb>>(SetupMedicalUI);

}

private void SetupMedicalUI(EntityUid uid, MedicalDataComponent medData, GetVerbsEvent<Verb> args)
{
if (!args.CanInteract
|| !_containerSystem.IsInSameOrParentContainer(args.User, args.Target)
|| !_interaction.InRangeUnobstructed(args.User, args.Target, MaxMedInspectRange))
return;

args.Verbs.Add(new Verb()
{
Text = "Open Medical Menu", //TODO localize
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/plus.svg.192dpi.png")),
Act = () => { OpenUI(args.Target);},
ClientExclusive = true
});

// View variables verbs
if (_adminManager.HasFlag(AdminFlags.Debug) && _player.LocalSession != null)
{
var verb = new VvVerb()
{
Text = Loc.GetString("Print All Wounds"),
Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/vv.svg.192dpi.png")),
Act = () => _console.RemoteExecuteCommand(_player.LocalSession, $"PrintAllWounds \"{_entityManager.GetNetEntity(args.Target)}\""),
ClientExclusive = true // opening VV window is client-side. Don't ask server to run this verb.
};
args.Verbs.Add(verb);
}
}

private void OpenUI(EntityUid target)
{
if (!_medMenuController.IsOpen)
{
//Opens a window and sets target
_medMenuController.OpenWindow(target);
return;
}
//updates our target if the window is open already
_medMenuController.SetTarget(target);
}
}
7 changes: 7 additions & 0 deletions Content.Client/Medical/Respiration/LungsSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using Content.Shared.Medical.Respiration.Systems;

namespace Content.Client.Medical.Respiration;

public sealed class LungsSystem : SharedLungsSystem
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<med:BodyPartStatusControl
xmlns="https://spacestation14.io"
xmlns:med="clr-namespace:Content.Client.UserInterface.Systems.MedicalMenu.Controls"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch"
HorizontalExpand="True"
Orientation="Vertical"
MinSize="150 10">
<ContainerButton MinHeight="35"
ToggleMode="True"
HorizontalExpand="True">
<BoxContainer
Orientation="Horizontal"
HorizontalAlignment="Stretch"
HorizontalExpand="True">
<TextureRect
Name="Chevron"
Access="Private"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Margin="2 0"
SizeFlagsStretchRatio="1" />
<Label
Text="UnknownBodyPart"
Access="Private"
Name="BodyPartLabel"
SizeFlagsStretchRatio="1" />
<controls:VSpacer
Spacing="30"
HorizontalExpand="True"
HorizontalAlignment="Stretch"
SizeFlagsStretchRatio="1" />
<Label
Text="Unknown"
Access="Private"
Name="BodyPartStatusLabel" />
</BoxContainer>
</ContainerButton>
<CollapsibleBody>
<PanelContainer
Name="ContentsPanel"
Access="Private">
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat
BackgroundColor="#252525"
/>
</PanelContainer.PanelOverride>

<BoxContainer
Orientation="Vertical">

<BoxContainer
Orientation="Vertical"
HorizontalExpand="True"
VerticalExpand="True">
<controls:Placeholder
PlaceholderText="STUFF GOES HERE" />
<controls:HLine />
<BoxContainer
Name="Contents"
Access="Private"
Orientation="Vertical"
HorizontalExpand="True"
VerticalExpand="True"
Margin="20 0 0 0" />
</BoxContainer>
</BoxContainer>
</PanelContainer>
</CollapsibleBody>
</med:BodyPartStatusControl>
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
using Content.Shared.Body.Part;
using Content.Shared.FixedPoint;
using Content.Shared.Medical.Common;
using Content.Shared.Medical.Wounding.Components;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;

namespace Content.Client.UserInterface.Systems.MedicalMenu.Controls;

[GenerateTypedNameReferences]
public sealed partial class BodyPartStatusControl : Collapsible
{

private string _partName = "UnknownBodyPart";
public string PartName
{
get => _partName;
set
{
_partName = value;
BodyPartLabel.Text = value;
}
}

private Entity<BodyPartComponent,WoundableComponent>? _part = null;
public Entity<BodyPartComponent,WoundableComponent>? LinkedPart => _part;


private static readonly Color Healthy = Color.DarkGreen;
private static readonly Color Unhealthy = Color.DarkRed;

public BodyPartStatusControl()
{
RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);

//setup chevron
Chevron.AddStyleClass(OptionButton.StyleClassOptionTriangle);
}

public void SetPartCondition(FixedPoint2 conditionPercentage)
{
BodyPartStatusLabel.Text = SeverityHelper.GetVisibleConditionString(conditionPercentage);
BodyPartStatusLabel.FontColorOverride = Color.InterpolateBetween( Unhealthy, Healthy,
FixedPoint2.Clamp(conditionPercentage, 0, 1).Float());
}

public void LinkPart(Entity<BodyPartComponent,WoundableComponent>? newPart)
{
_part = newPart;
if (newPart == null)
{
SetPartCondition(0);
return;
}
SetPartCondition(newPart.Value.Comp2.HitPointPercent);
}

public void AddChildPart(BodyPartStatusControl childPart)
{
Contents.AddChild(childPart);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<med:OverviewPage
xmlns="https://spacestation14.io"
xmlns:med="clr-namespace:Content.Client.UserInterface.Systems.MedicalMenu.Controls"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Orientation="Vertical"
HorizontalExpand="True"
VerticalExpand="True"
>
<BoxContainer
Orientation="Horizontal"
HorizontalExpand="True"
VerticalExpand="True"
>
<med:TargetBodyStatus
Name="TargetStatus"
Access="Internal"
/>
<ScrollContainer HorizontalExpand="True"
VerticalExpand="True"
HorizontalAlignment="Right"
MinSize="300 200"
>
<BoxContainer
Name="Contents"
Access="Private"
Orientation="Vertical"
HorizontalExpand="True"
>
<!-- This is in case we are targeting an entity without a root -->
<Label
Text="No Body Parts Found!"
Name="NoPartErrorText"
Access="Private"
SizeFlagsStretchRatio="1"
/>
</BoxContainer>
</ScrollContainer>
</BoxContainer>
</med:OverviewPage>
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;

namespace Content.Client.UserInterface.Systems.MedicalMenu.Controls;

[GenerateTypedNameReferences]
public sealed partial class OverviewPage : BoxContainer
{
public OverviewPage()
{
RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);
Contents.OnChildRemoved += OnChildPartRemoved;
}

private void OnChildPartRemoved(Control obj)
{
if (ChildCount == 0)
NoPartErrorText.Visible = true;
}

public void ClearChildParts()
{
Contents.RemoveAllChildren();
}

public void AddChildPart(BodyPartStatusControl child)
{
Contents.AddChild(child);
NoPartErrorText.Visible = false;
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<med:SurgeryPage
xmlns="https://spacestation14.io"
xmlns:med="clr-namespace:Content.Client.UserInterface.Systems.MedicalMenu.Controls"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Orientation="Vertical"
HorizontalExpand="True"
VerticalExpand="True"
>

</med:SurgeryPage>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;

namespace Content.Client.UserInterface.Systems.MedicalMenu.Controls;

[GenerateTypedNameReferences]
public sealed partial class SurgeryPage : BoxContainer
{
public SurgeryPage()
{
RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<med:TargetBodyStatus
xmlns="https://spacestation14.io"
xmlns:med="clr-namespace:Content.Client.UserInterface.Systems.MedicalMenu.Controls"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Orientation="Vertical"
>
<BoxContainer
Orientation="Horizontal">
<Label Text="Target: "/>
<Label
Name="TargetName"
Access="Private"
Text="No Target"
/>
</BoxContainer>
<controls:Placeholder
PlaceholderText="Target Info Goes here"
/>
</med:TargetBodyStatus>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;

namespace Content.Client.UserInterface.Systems.MedicalMenu.Controls;

[GenerateTypedNameReferences]
public sealed partial class TargetBodyStatus : BoxContainer
{

private const string UnknownTargetText = "Unknown Target";

public TargetBodyStatus()
{
RobustXamlLoader.Load(this);
}

public void SetTarget(string? targetName)
{
TargetName.Text = targetName ?? UnknownTargetText;
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<med:TriagePage
xmlns="https://spacestation14.io"
xmlns:med="clr-namespace:Content.Client.UserInterface.Systems.MedicalMenu.Controls"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Orientation="Vertical"
HorizontalExpand="True"
VerticalExpand="True"
>
</med:TriagePage>
Loading