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

Adds in Disemboweling, Piercing and Slashes. #6643

Merged
merged 33 commits into from
Jun 13, 2021

Conversation

MaxIsJoe
Copy link
Contributor

@MaxIsJoe MaxIsJoe commented May 29, 2021

Purpose

part of #6270 and #6272

Cuts, External Bleeding and disemboweling

Attacking your foes now causes them to receive grievous wounds that open their insides and damage their internal organs.
Your organs now have a very slim chance of escaping your body when it receives a big enough wound but they have a greater chance to receive internal damage which causes you to bleed from the inside out.
Lungs and hearts have custom Internal bleeding damage behaviors where bleeding lungs causes you to drown in your own blood from inside while hearts cause a heart attack.
There is no way to heal internal damage currently but it's going to be added later in another PR.

Some weapons are more likely to cause "Slash" and "Piecing" damage, with both of them contributing to how likely you're cuts are going to size.
Slash and Pierce cause external bleeding, with both of them having tier levels of damage that can be recovered on their own depending on their tier. Explained more in #6272 .
There is no way to currently heal Pierce and Slash damage but an item has been added to stop external bleeding, The Gauze.

Changelog:

CL: [New] - Players' organs can now have internal bleeding. Dying slowly from the inside.
CL: [New] - Lungs that are bleeding will cause players to cough up blood regularly.
CL: [New] - Hearts that suffer from internal damage can heart attack.
CL: [New] - Added Disemboweling.
CL: [New] - Adds in Slash and Piercing damage.
CL: [New] - Players can bleed to death now if they don't treat external bleeding.
CL: [New] - Added in the Gauze healing item, stops external bleeding.
CL: [New] - Slash and Pierce damage will go on their own as long as the player doesn't receive a higher damage of level of these new damages.
CL: [Improvement] - Gauzes now stop limb loss bleeding, disabled that logic on brute packs as they were place holders a few PRs ago.
CL: [Fix] - Losing a heart is an instant death from now on.
CL: [Fix] - Players no longer need a harm intention to heal themselves.
CL: [Fix] - clicking yourself with non-lethal object will no longer spawn blood on the ground. reported in #6586
CL: [Fix] - You can no longer roleplay as an Asian mother by doing extreme damage to limbs with just a shoe.

@corp-0 corp-0 added Status: Awaiting Review for PRs that are awaiting reviews/rereviews Status: Awaiting Testing for PRs that that should be tested before merging labels May 29, 2021
@MaxIsJoe
Copy link
Contributor Author

After some discussion on discord, I've added in some improvements and tweaks.
Firstly, Internal damage logic is now handled by BodyPartModifers and Lungs are now less deadly compared to their previous state.
Hearts will now not damage the torso when they've reached their maximum internal damage threshold, but they'll instead cause a heart attack to the player.
Added some chat messages to indicate the damage that's going on.
Internal bleeding will no longer build up after it's reached it's maximum value.
Added a debug context menu for the BodyPart component to quickly test out Internal Damage/bleeding logic without having to spawn a weapon then attempt to murder yourself multiple times.

In the next few PRs after this one and the bleeding one gets added in, I'll add in ways to heal internal damage and start fixing some issues related to customization floating on empty body parts and several other minor issues found on staging.

@corp-0 corp-0 added Status: Awaiting Changes Something about this PR should be / was requested to be changed before merging and removed Status: Awaiting Review for PRs that are awaiting reviews/rereviews Status: Awaiting Testing for PRs that that should be tested before merging labels Jun 1, 2021
@Bod9001
Copy link
Member

Bod9001 commented Jun 5, 2021

When will this be ready to merge?

@MaxIsJoe
Copy link
Contributor Author

MaxIsJoe commented Jun 5, 2021

When will this be ready to merge?

After our last discussion on discord with Jack, Disemboweling might be held on hold for a while as I'm going be working on #6272 which will be put both these into a single system.
I'd ask Jack if it's okay to merge this so people can test it on staging while I finish working on dismemberment first.

@Bod9001
Copy link
Member

Bod9001 commented Jun 5, 2021

From the code reviewers, it's been suggested to have a separate list that you add the body parts you want to remove, that you check after every time the player takes damage

@MaxIsJoe
Copy link
Contributor Author

MaxIsJoe commented Jun 5, 2021

From the code reviewers, it's been suggested to have a separate list that you add the body parts you want to remove, that you check after every time the player takes damage

who suggested this and for what exactly? and I've already explained why during discussions on #6625 why adding separate lists for anything is terrible and I'll never do it unless it's the only way to go about it. for any reason.

@Bod9001
Copy link
Member

Bod9001 commented Jun 5, 2021

well the code review team as a whole, also it's the only way without changing index and getting flaky behaviour

@MaxIsJoe
Copy link
Contributor Author

MaxIsJoe commented Jun 5, 2021

well the code review team as a whole, also it's the only way without changing index and getting flaky behaviour

again, for what?

@github-actions github-actions bot added the Status: Merge Conflicts No one likes conflicts, solve them! label Jun 6, 2021
@MaxIsJoe MaxIsJoe marked this pull request as draft June 6, 2021 21:14
@MaxIsJoe MaxIsJoe changed the title Adds in Disemboweling Adds in Disemboweling, Piercing and Slashes. Jun 7, 2021
@MaxIsJoe
Copy link
Contributor Author

MaxIsJoe commented Jun 8, 2021

Why is this throwing an error when everything compiles fine on my end?

@ThatDan123
Copy link
Contributor

ThatDan123 commented Jun 8, 2021

Gauze has null item trait. Remove empty index from list or add an item trait to indexat Tests.ComponentTests.ItemTraitTest

-Check the item traits in the item attributes of the Gauze prefab

Gauze (UnityEngine.GameObject) needs to be in the spawnPrefabs list and has been added. Since the list has been updated you NEED to commit the changed NetworkManager Prefab file Gauze (UnityEngine.GameObject) needs to be in the allSpawnablePrefabs list and has been added. Since the list has been updated you NEED to commit the changed NetworkManager Prefab fileat Tests.Asset.NetworkManagerTests.SpawnableListTest () [0x00172] in /github/workspace/UnityProject/Assets/Tests/Asset/NetworkManagerTests.cs:68SendMessage cannot be called during Awake, CheckConsistency, or OnValidate

-And then you need to open the network manager, press the manually fill list button and then commit the network manager

@MaxIsJoe
Copy link
Contributor Author

MaxIsJoe commented Jun 8, 2021

Yep, fixed now. Hopefully.

@MaxIsJoe
Copy link
Contributor Author

MaxIsJoe commented Jun 8, 2021

well fuck you Codacy

@corp-0
Copy link
Member

corp-0 commented Jun 8, 2021

oi oi oi, no don't bully codacy

@MaxIsJoe
Copy link
Contributor Author

MaxIsJoe commented Jun 8, 2021

no, i will bully the codacy >:(
stinky bot

@corp-0 corp-0 removed the Status: Merge Conflicts No one likes conflicts, solve them! label Jun 9, 2021
@MaxIsJoe
Copy link
Contributor Author

MaxIsJoe commented Jun 9, 2021

what changes are still being awaited for this PR?
It's no longer in a draft and needs a review.

@Bod9001 Bod9001 merged commit 6c6d197 into unitystation:develop Jun 13, 2021
@jamessimo jamessimo mentioned this pull request Jun 25, 2021
2 tasks
@waffielz
Copy link

seppuku gaming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lol Status: Awaiting Changes Something about this PR should be / was requested to be changed before merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants