-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Description Fixes several bugs in the lobotomy procedure. The lobotomy effect is now stored in the brain instead of the body, so transferring a lobotomized brain will still give the lobotomy effects, and a brain transplant to a body where a lobotomy occurred no longer applies the lobotomy effects. The "Mend brain tissue" procedure to reverse a lobotomy has been unlocked after a bug prevented it from showing in the surgery UI. Lobotomies now add the `ClumsyComponent`, which makes the lobotomized target as clumsy as clowns. ## Technical Details This deletes [SurgeryComponentConditionComponent.cs](https://github.com/Simple-Station/Einstein-Engines/compare/master...angelofallars:Einstein-Engines:fix-lobotomy?expand=1#diff-3786e2be1879fd877a8b501352bbd92baa3a17aecfa4a62827ad41497deb0fd7) which was only used for the lobotomy procedures (incorrectly, it was checking for `OhioAccentComponent` in the body part) in favor of [SurgeryPartComponentConditionComponent.cs](https://github.com/Simple-Station/Einstein-Engines/compare/master...angelofallars:Einstein-Engines:fix-lobotomy?expand=1#diff-7e180742b3a6f00b9f867d3ee4e8891dd00587dc4a2da8ad5e199180a387d18d) and [SurgeryBodyComponentConditionComponent.cs](https://github.com/Simple-Station/Einstein-Engines/compare/master...angelofallars:Einstein-Engines:fix-lobotomy?expand=1#diff-249e5a937ba929ffc76f85e8a43f17918afc9ba866e81f4ea4eba2c90fd0c408). These two components are currently unused as the lobotomy procedures use a new condition component checking for the brain's `OrganComponent.OnAdd` field, but they provide a way to check for components on the body part and on the body, respectively. ## Media **Lobotomy** ![image](https://github.com/user-attachments/assets/4deb80a8-30d1-4a01-9caa-bc288a88ba95) **Mend brain tissue** ![image](https://github.com/user-attachments/assets/44403092-cac1-4d12-bd25-ebb7f3f1bc53) **Remove organ step picture** ![image](https://github.com/user-attachments/assets/85d6960a-1f54-4525-ad53-84b039c91fda) ## Changelog <!-- You can add an author after the `:cl:` to change the name that appears in the changelog (ex: `:cl: Death`) Leaving it blank will default to your GitHub display name This includes all available types for the changelog --> :cl: Skubman - add: The lobotomy procedure makes the target clumsy like the clown. This makes them bonk when climbing tables and makes guns they're shooting blow up on their face. - tweak: The lobotomy step now requires a scalpel instead of a drill. - fix: Enabled the "Mend brain tissue" surgical procedure on a lobotomized target. - fix: The lobotomized effect is now stored in the brain instead of the body. The same brain stays lobotomized throughout brain transplants, and transferring a normal brain to a body where a lobotomy occurred no longer applies the lobotomized effect. - fix: The lobotomy procedure now shows the proper popup during the lobotomization step. - fix: Removed the ability to perform lobotomies on bodies without a brain. - fix: The "Remove organ" surgery step on the UI now properly shows the retractor sprite instead of the hemostat. --------- Co-authored-by: sleepyyapril <[email protected]>
- Loading branch information
1 parent
114ecde
commit 1895f3a
Showing
11 changed files
with
280 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
Content.Shared/Medical/Surgery/Conditions/SurgeryBodyComponentConditionComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Content.Shared.Body.Part; | ||
using Robust.Shared.GameStates; | ||
using Robust.Shared.Prototypes; | ||
|
||
namespace Content.Shared.Medical.Surgery.Conditions; | ||
|
||
// <summary> | ||
// What components are necessary in the body for the surgery to be valid. | ||
// </summary> | ||
[RegisterComponent, NetworkedComponent] | ||
public sealed partial class SurgeryBodyComponentConditionComponent : Component | ||
{ | ||
// <summary> | ||
// The components to check for. | ||
// </summary> | ||
[DataField(required: true)] | ||
public ComponentRegistry Components; | ||
|
||
// <summary> | ||
// If true, the lack of these components will instead make the surgery valid. | ||
// </summary> | ||
[DataField] | ||
public bool Inverse = false; | ||
} |
16 changes: 0 additions & 16 deletions
16
Content.Shared/Medical/Surgery/Conditions/SurgeryComponentConditionComponent.cs
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
Content.Shared/Medical/Surgery/Conditions/SurgeryOrganOnAddConditionComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Content.Shared.Body.Part; | ||
using Robust.Shared.GameStates; | ||
using Robust.Shared.Prototypes; | ||
|
||
namespace Content.Shared.Medical.Surgery.Conditions; | ||
|
||
// <summary> | ||
// What components are necessary in the part's organs' OnAdd fields for the surgery to be valid. | ||
// | ||
// Not all components need to be present (or missing for Inverse = true). At least one component matching (or missing) can make the surgery valid. | ||
// </summary> | ||
[RegisterComponent, NetworkedComponent] | ||
public sealed partial class SurgeryOrganOnAddConditionComponent : Component | ||
{ | ||
// <summary> | ||
// The components to check for on each organ, with the key being the organ's SlotId. | ||
// </summary> | ||
[DataField(required: true)] | ||
public Dictionary<string, ComponentRegistry> Components; | ||
|
||
// <summary> | ||
// If true, the lack of these components will instead make the surgery valid. | ||
// </summary> | ||
[DataField] | ||
public bool Inverse = false; | ||
} |
24 changes: 24 additions & 0 deletions
24
Content.Shared/Medical/Surgery/Conditions/SurgeryPartComponentConditionComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Content.Shared.Body.Part; | ||
using Robust.Shared.GameStates; | ||
using Robust.Shared.Prototypes; | ||
|
||
namespace Content.Shared.Medical.Surgery.Conditions; | ||
|
||
// <summary> | ||
// What components are necessary in the targeted body part for the surgery to be valid. | ||
// </summary> | ||
[RegisterComponent, NetworkedComponent] | ||
public sealed partial class SurgeryPartComponentConditionComponent : Component | ||
{ | ||
// <summary> | ||
// The components to check for. | ||
// </summary> | ||
[DataField(required: true)] | ||
public ComponentRegistry Components; | ||
|
||
// <summary> | ||
// If true, the lack of these components will instead make the surgery valid. | ||
// </summary> | ||
[DataField] | ||
public bool Inverse = false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.