diff --git a/Content.Server/Body/Components/BloodstreamComponent.cs b/Content.Server/Body/Components/BloodstreamComponent.cs index 9368b3bf9b..a7786cb8b9 100644 --- a/Content.Server/Body/Components/BloodstreamComponent.cs +++ b/Content.Server/Body/Components/BloodstreamComponent.cs @@ -35,7 +35,7 @@ namespace Content.Server.Body.Components /// How much should bleeding should be reduced every update interval? /// [DataField("bleedReductionAmount")] - public float BleedReductionAmount = 1.0f; + public float BleedReductionAmount = 0.5f; /// /// How high can go? diff --git a/Content.Server/Body/Systems/BloodstreamSystem.cs b/Content.Server/Body/Systems/BloodstreamSystem.cs index 0f37aa9fce..f152c6b088 100644 --- a/Content.Server/Body/Systems/BloodstreamSystem.cs +++ b/Content.Server/Body/Systems/BloodstreamSystem.cs @@ -101,7 +101,9 @@ public sealed class BloodstreamSystem : EntitySystem // as well as stop their bleeding to a certain extent. if (bloodstream.BleedAmount > 0) { - TryModifyBloodLevel(uid, (-bloodstream.BleedAmount) / 20, bloodstream); + // Blood is removed from the bloodstream at a 1-1 rate with the bleed amount + TryModifyBloodLevel(uid, (-bloodstream.BleedAmount), bloodstream); + // Bleed rate is reduced by the bleed reduction amount in the bloodstream component. TryModifyBleedAmount(uid, -bloodstream.BleedReductionAmount, bloodstream); } @@ -160,19 +162,26 @@ public sealed class BloodstreamSystem : EntitySystem if (bloodloss.Empty) return; + // Does the calculation of how much bleed rate should be added/removed, then applies it var oldBleedAmount = component.BleedAmount; var total = bloodloss.Total; var totalFloat = total.Float(); TryModifyBleedAmount(uid, totalFloat, component); - var prob = Math.Clamp(totalFloat / 50, 0, 1); - var healPopupProb = Math.Clamp(Math.Abs(totalFloat) / 25, 0, 1); + /// + /// Critical hit. Causes target to lose blood, using the bleed rate modifier of the weapon, currently divided by 5 + /// The crit chance is currently the bleed rate modifier divided by 25. + /// Higher damage weapons have a higher chance to crit! + /// + var prob = Math.Clamp(totalFloat / 25, 0, 1); if (totalFloat > 0 && _robustRandom.Prob(prob)) { TryModifyBloodLevel(uid, (-total) / 5, component); _audio.PlayPvs(component.InstantBloodSound, uid); } - else if (totalFloat < 0 && oldBleedAmount > 0 && _robustRandom.Prob(healPopupProb)) + + // Heat damage will cauterize, causing the bleed rate to be reduced. + else if (totalFloat < 0 && oldBleedAmount > 0) { // Magically, this damage has healed some bleeding, likely // because it's burn damage that cauterized their wounds. @@ -183,20 +192,25 @@ public sealed class BloodstreamSystem : EntitySystem uid, PopupType.Medium); } } - + /// + /// Shows text on health examine, based on bleed rate and blood level. + /// private void OnHealthBeingExamined(EntityUid uid, BloodstreamComponent component, HealthBeingExaminedEvent args) { - if (component.BleedAmount > 10) + // Shows profusely bleeding at half the max bleed rate. + if (component.BleedAmount > component.MaxBleedAmount / 2) { args.Message.PushNewline(); args.Message.AddMarkup(Loc.GetString("bloodstream-component-profusely-bleeding", ("target", Identity.Entity(uid, EntityManager)))); } + // Shows bleeding message when bleeding, but less than profusely. else if (component.BleedAmount > 0) { args.Message.PushNewline(); args.Message.AddMarkup(Loc.GetString("bloodstream-component-bleeding", ("target", Identity.Entity(uid, EntityManager)))); } + // If the mob's blood level is below the damage threshhold, the pale message is added. if (GetBloodLevelPercentage(uid, component) < component.BloodlossThreshold) { args.Message.PushNewline(); diff --git a/Content.Server/Medical/Components/HealingComponent.cs b/Content.Server/Medical/Components/HealingComponent.cs index adb5857b32..439f2eb5d8 100644 --- a/Content.Server/Medical/Components/HealingComponent.cs +++ b/Content.Server/Medical/Components/HealingComponent.cs @@ -24,6 +24,13 @@ namespace Content.Server.Medical.Components [ViewVariables(VVAccess.ReadWrite)] public float BloodlossModifier = 0.0f; + /// + /// Restore missing blood. + /// + [DataField("ModifyBloodLevel")] + [ViewVariables(VVAccess.ReadWrite)] + public float ModifyBloodLevel = 0.0f; + /// /// The supported damage types are specified using a s. For a /// HealingComponent this filters what damage container type this component should work on. If null, diff --git a/Content.Server/Medical/HealingSystem.cs b/Content.Server/Medical/HealingSystem.cs index d4382848f0..7f442e8ec8 100644 --- a/Content.Server/Medical/HealingSystem.cs +++ b/Content.Server/Medical/HealingSystem.cs @@ -54,6 +54,10 @@ public sealed class HealingSystem : EntitySystem if (healing.BloodlossModifier != 0) _bloodstreamSystem.TryModifyBleedAmount(uid, healing.BloodlossModifier); + // Restores missing blood + if (healing.ModifyBloodLevel != 0) + _bloodstreamSystem.TryModifyBloodLevel(uid, healing.ModifyBloodLevel); + var healed = _damageable.TryChangeDamage(uid, healing.Damage, true, origin: args.Args.User); if (healed == null && healing.BloodlossModifier != 0) diff --git a/Resources/Prototypes/Catalog/Cargo/cargo_vending.yml b/Resources/Prototypes/Catalog/Cargo/cargo_vending.yml index eaa8ae34cb..fa89e873df 100644 --- a/Resources/Prototypes/Catalog/Cargo/cargo_vending.yml +++ b/Resources/Prototypes/Catalog/Cargo/cargo_vending.yml @@ -72,7 +72,7 @@ sprite: Objects/Specific/Service/vending_machine_restock.rsi state: base product: CrateVendingMachineRestockMedicalFilled - cost: 1500 + cost: 1750 category: Medical group: market diff --git a/Resources/Prototypes/Catalog/Fills/Crates/medical.yml b/Resources/Prototypes/Catalog/Fills/Crates/medical.yml index 345e036dbe..969002c286 100644 --- a/Resources/Prototypes/Catalog/Fills/Crates/medical.yml +++ b/Resources/Prototypes/Catalog/Fills/Crates/medical.yml @@ -17,6 +17,8 @@ amount: 2 - id: Gauze amount: 2 + - id: Bloodpack + amount: 2 - id: BoxLatexGloves amount: 1 - id: BoxSterileMask diff --git a/Resources/Prototypes/Catalog/Fills/Items/belt.yml b/Resources/Prototypes/Catalog/Fills/Items/belt.yml index 1310e4155c..55bce72aac 100644 --- a/Resources/Prototypes/Catalog/Fills/Items/belt.yml +++ b/Resources/Prototypes/Catalog/Fills/Items/belt.yml @@ -59,9 +59,13 @@ - type: StorageFill contents: - id: Brutepack - amount: 3 + amount: 2 - id: Ointment - amount: 3 + amount: 2 + - id: Bloodpack + amount: 2 + - id: Gauze + amount: 1 - id: EmergencyMedipen #You never know what people are going to latejoin into - type: entity diff --git a/Resources/Prototypes/Catalog/Fills/Items/firstaidkits.yml b/Resources/Prototypes/Catalog/Fills/Items/firstaidkits.yml index 7b057a36df..a96cb28b4a 100644 --- a/Resources/Prototypes/Catalog/Fills/Items/firstaidkits.yml +++ b/Resources/Prototypes/Catalog/Fills/Items/firstaidkits.yml @@ -10,10 +10,10 @@ amount: 1 - id: Brutepack amount: 2 - - id: Gauze - amount: 1 - id: Ointment amount: 2 + - id: PillTricordrazine + amount: 3 # see https://github.com/tgstation/blob/master/code/game/objects/items/storage/firstaid.dm for example contents - type: entity @@ -24,11 +24,9 @@ - type: StorageFill contents: - id: Ointment - amount: 2 + amount: 4 - id: PillKelotane amount: 3 - - id: SyringeInaprovaline - amount: 1 - type: entity id: MedkitBruteFilled @@ -42,7 +40,11 @@ - id: PillIron amount: 2 - id: Gauze - amount: 2 + amount: 1 + - id: Bloodpack + amount: 1 + - id: SyringeTranexamicAcid + amount: 1 - type: entity id: MedkitToxinFilled @@ -57,6 +59,8 @@ amount: 1 - id: PillDylovene amount: 3 + - id: AntiPoisonMedipen + amount: 1 - type: entity id: MedkitOxygenFilled @@ -70,7 +74,7 @@ - id: PillDexalin amount: 3 - id: SyringeInaprovaline - amount: 1 + amount: 2 - type: entity id: MedkitRadiationFilled @@ -93,16 +97,14 @@ components: - type: StorageFill contents: - - id: HandheldHealthAnalyzer - amount: 1 - id: Brutepack - amount: 3 # TO DO: Advanced fills - - id: SyringeTranexamicAcid + amount: 2 # TO DO: Advanced fills + - id: Gauze amount: 1 - - id: PillTricordrazine - amount: 1 - - id: AntiPoisonMedipen + - id: Ointment amount: 1 + - id: Bloodpack + amount: 2 - type: entity id: MedkitCombatFilled @@ -117,10 +119,10 @@ amount: 1 # TO DO: More combat meds - id: SyringeTranexamicAcid amount: 1 - - id: PillTricordrazine - amount: 1 - id: AntiPoisonMedipen amount: 1 + - id: Bloodpack + amount: 2 - type: entity id: StimkitFilled diff --git a/Resources/Prototypes/Catalog/Fills/Lockers/medical.yml b/Resources/Prototypes/Catalog/Fills/Lockers/medical.yml index 249561ffda..db079b78dd 100644 --- a/Resources/Prototypes/Catalog/Fills/Lockers/medical.yml +++ b/Resources/Prototypes/Catalog/Fills/Lockers/medical.yml @@ -15,6 +15,8 @@ amount: 2 - id: Ointment amount: 2 + - id: Bloodpack + amount: 2 - type: entity id: LockerWallMedicalFilled @@ -34,6 +36,8 @@ amount: 2 - id: Ointment amount: 2 + - id: Bloodpack + amount: 2 - type: entity @@ -85,7 +89,10 @@ - type: StorageFill contents: - id: BoxSyringe + amount: 1 - id: BoxBeaker + amount: 1 - id: BoxPillCanister + amount: 1 - id: BoxBottle - - id: BoxBottle + amount: 2 diff --git a/Resources/Prototypes/Catalog/VendingMachines/Inventories/medical.yml b/Resources/Prototypes/Catalog/VendingMachines/Inventories/medical.yml index 00c1044e91..43e7cf7c94 100644 --- a/Resources/Prototypes/Catalog/VendingMachines/Inventories/medical.yml +++ b/Resources/Prototypes/Catalog/VendingMachines/Inventories/medical.yml @@ -4,5 +4,6 @@ HandheldHealthAnalyzer: 3 Brutepack: 5 Ointment: 5 + Bloodpack: 5 EpinephrineChemistryBottle: 3 Syringe: 5 diff --git a/Resources/Prototypes/Catalog/VendingMachines/Inventories/wallmed.yml b/Resources/Prototypes/Catalog/VendingMachines/Inventories/wallmed.yml index 5023e703c9..405e2eff56 100644 --- a/Resources/Prototypes/Catalog/VendingMachines/Inventories/wallmed.yml +++ b/Resources/Prototypes/Catalog/VendingMachines/Inventories/wallmed.yml @@ -1,7 +1,8 @@ - type: vendingMachineInventory id: NanoMedInventory startingInventory: - Brutepack: 5 - Ointment: 5 + Brutepack: 3 + Ointment: 3 + Bloodpack: 3 EpinephrineChemistryBottle: 3 - Syringe: 5 + Syringe: 3 diff --git a/Resources/Prototypes/Damage/modifier_sets.yml b/Resources/Prototypes/Damage/modifier_sets.yml index d6e01b21b2..c8e220c3ed 100644 --- a/Resources/Prototypes/Damage/modifier_sets.yml +++ b/Resources/Prototypes/Damage/modifier_sets.yml @@ -147,16 +147,16 @@ Blunt: 5 # Represents which damage types should be modified -# in relation to how they cause bloodloss damage. +# in relation to how they cause bleed rate. - type: damageModifierSet id: BloodlossHuman coefficients: - Blunt: 0.8 - Slash: 2.5 - Piercing: 2.0 + Blunt: 0.08 + Slash: 0.25 + Piercing: 0.2 Shock: 0.0 Cold: 0.0 - Heat: -0.25 # heat damage cauterizes wounds! + Heat: -1 # heat damage cauterizes wounds, but will still hurt obviously. Poison: 0.0 Radiation: 0.0 Asphyxiation: 0.0 diff --git a/Resources/Prototypes/Entities/Clothing/Belt/belts.yml b/Resources/Prototypes/Entities/Clothing/Belt/belts.yml index db43843d4f..ce19e85a93 100644 --- a/Resources/Prototypes/Entities/Clothing/Belt/belts.yml +++ b/Resources/Prototypes/Entities/Clothing/Belt/belts.yml @@ -237,6 +237,7 @@ - Bottle - Spray - Brutepack + - Bloodpack - Gauze - Ointment - CigPack diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml index 6c0f63e6a3..abc35d8300 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml @@ -1647,14 +1647,6 @@ gender: epicene - type: Bloodstream bloodReagent: DemonsBlood - bloodlossDamage: - types: - Bloodloss: - 1 - bloodlossHealDamage: - types: - Bloodloss: - -0.25 - type: Damageable damageContainer: Biological damageModifierSet: Infernal diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/silicon.yml b/Resources/Prototypes/Entities/Mobs/NPCs/silicon.yml index 9267be8d23..e708eb9d9b 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/silicon.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/silicon.yml @@ -19,7 +19,7 @@ bloodlossHealDamage: types: Bloodloss: - -0.25 + -1 - type: InteractionOutline - type: Fixtures fixtures: diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml b/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml index ac38c18fe4..e5e7efcf2c 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml @@ -67,7 +67,7 @@ bloodlossHealDamage: types: Bloodloss: - -0.25 + -1 - type: Damageable damageContainer: Biological - type: RadiationReceiver diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml b/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml index c4638f9ad0..783d286e17 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml @@ -65,14 +65,6 @@ excess: 200 - type: Bloodstream bloodReagent: FluorosulfuricAcid - bloodlossDamage: - types: - Bloodloss: - 1 - bloodlossHealDamage: - types: - Bloodloss: - -0.25 - type: MeleeWeapon hidden: true angle: 0 diff --git a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml index 9283281398..8c7181b00c 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml @@ -26,7 +26,7 @@ bloodlossHealDamage: types: Bloodloss: - -0.25 + -1 - type: InteractionOutline - type: Fixtures fixtures: diff --git a/Resources/Prototypes/Entities/Mobs/Species/base.yml b/Resources/Prototypes/Entities/Mobs/Species/base.yml index 3c9b8eb85f..d49205a2a3 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/base.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/base.yml @@ -65,7 +65,7 @@ bloodlossHealDamage: types: Bloodloss: - -0.25 + -1 - type: Stamina - type: StatusEffects allowed: diff --git a/Resources/Prototypes/Entities/Mobs/Species/diona.yml b/Resources/Prototypes/Entities/Mobs/Species/diona.yml index 7b71d861b1..fb5840889a 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/diona.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/diona.yml @@ -26,14 +26,6 @@ amount: 5 - type: Bloodstream bloodReagent: Water - bloodlossDamage: - types: - Bloodloss: - 1 - bloodlossHealDamage: - types: - Bloodloss: - -0.25 - type: Fixtures fixtures: - shape: diff --git a/Resources/Prototypes/Entities/Mobs/Species/slime.yml b/Resources/Prototypes/Entities/Mobs/Species/slime.yml index 4ec2278655..55ef658df4 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/slime.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/slime.yml @@ -21,14 +21,6 @@ damageModifierSet: Slime - type: Bloodstream bloodReagent: Slime # TODO Color slime blood based on their slime color or smth - bloodlossDamage: - types: - Bloodloss: - 1 - bloodlossHealDamage: - types: - Bloodloss: - -0.25 - type: Barotrauma damage: types: diff --git a/Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml b/Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml index 349095fa0d..47a3cab318 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml @@ -59,7 +59,6 @@ damage: groups: Brute: -15 # 5 for each type in the group - bloodlossModifier: -3 # a little bit of bloodloss healing. healingBeginSound: path: "/Audio/Items/Medical/brutepack_begin.ogg" healingEndSound: @@ -70,6 +69,33 @@ - type: StackPrice price: 10 +- type: entity + name: blood pack + description: Contains a groundbreaking universal blood replacement created by Nanotrasen's advanced medical science. + parent: BaseHealingItem + id: Bloodpack + components: + - type: Tag + tags: + - Bloodpack + - type: Sprite + state: bloodpack + - type: Healing + damageContainer: Biological + damage: + types: + bloodloss: -0.5 #for whatever godforsaken reason I cannot touch blood level without healing one of these, so fuck it, bleed rate healing + ModifyBloodLevel: 10 + healingBeginSound: + path: "/Audio/Items/Medical/brutepack_begin.ogg" + healingEndSound: + path: "/Audio/Items/Medical/brutepack_end.ogg" + - type: Stack + stackType: Bloodpack + count: 10 + - type: StackPrice + price: 10 + - type: entity name: roll of gauze description: Some sterile gauze to wrap around bloody stumps. diff --git a/Resources/Prototypes/Entities/Objects/Specific/Medical/surgery.yml b/Resources/Prototypes/Entities/Objects/Specific/Medical/surgery.yml index 36628a83e4..e456541ff4 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Medical/surgery.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Medical/surgery.yml @@ -24,6 +24,12 @@ - type: Item sprite: Objects/Specific/Medical/Surgery/cautery.rsi - type: ItemCooldown + - type: MeleeWeapon + damage: + types: + Heat: 5 + soundHit: + path: /Audio/Effects/lightburn.ogg # Drill diff --git a/Resources/Prototypes/Reagents/elements.yml b/Resources/Prototypes/Reagents/elements.yml index f510bfce74..3c5529b400 100644 --- a/Resources/Prototypes/Reagents/elements.yml +++ b/Resources/Prototypes/Reagents/elements.yml @@ -118,7 +118,7 @@ Medicine: effects: - !type:ModifyBloodLevel - amount: 2 + amount: 4 - type: reagent id: Lithium diff --git a/Resources/Prototypes/Stacks/medical_stacks.yml b/Resources/Prototypes/Stacks/medical_stacks.yml index 93fee77109..c01937d733 100644 --- a/Resources/Prototypes/Stacks/medical_stacks.yml +++ b/Resources/Prototypes/Stacks/medical_stacks.yml @@ -1,4 +1,4 @@ -- type: stack +- type: stack id: Ointment name: ointment icon: { sprite: "/Textures/Objects/Specific/Medical/medical.rsi", state: ointment } @@ -25,3 +25,10 @@ icon: { sprite: "/Textures/Objects/Specific/Medical/medical.rsi", state: gauze } spawn: Brutepack maxCount: 10 + +- type: stack + id: Bloodpack + name: bloodpack + icon: { sprite: "/Textures/Objects/Specific/Medical/medical.rsi", state: bloodpack } + spawn: Bloodpack + maxCount: 10 diff --git a/Resources/Prototypes/tags.yml b/Resources/Prototypes/tags.yml index a96535136d..bfb69b2448 100644 --- a/Resources/Prototypes/tags.yml +++ b/Resources/Prototypes/tags.yml @@ -22,6 +22,9 @@ - type: Tag id: BikeHorn +- type: Tag + id: Bloodpack + - type: Tag id: BodyBag diff --git a/Resources/Textures/Objects/Specific/Medical/medical.rsi/bloodpack.png b/Resources/Textures/Objects/Specific/Medical/medical.rsi/bloodpack.png new file mode 100644 index 0000000000..e960ca6213 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Medical/medical.rsi/bloodpack.png differ diff --git a/Resources/Textures/Objects/Specific/Medical/medical.rsi/meta.json b/Resources/Textures/Objects/Specific/Medical/medical.rsi/meta.json index 93b7ea8ad7..7519973cb8 100644 --- a/Resources/Textures/Objects/Specific/Medical/medical.rsi/meta.json +++ b/Resources/Textures/Objects/Specific/Medical/medical.rsi/meta.json @@ -1,7 +1,7 @@ { "version": 1, "license": "CC-BY-SA-3.0", - "copyright": "Taken from cev-eris at https://github.com/discordia-space/CEV-Eris/commit/740ff31a81313086cf16761f3677cf1e2ab46c93", + "copyright": "Taken from cev-eris at https://github.com/discordia-space/CEV-Eris/commit/740ff31a81313086cf16761f3677cf1e2ab46c93 and Taken from tgstation at https://github.com/tgstation/tgstation/blob/623290915c2292b56da11048deb62d758e1e3fb4/icons/obj/bloodpack.dmi", "size": { "x": 32, "y": 32 @@ -37,6 +37,9 @@ { "name": "ointment-inhand-right", "directions": 4 + }, + { + "name": "bloodpack" } ] }