Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
blackdragonTOW committed Aug 11, 2023
2 parents 0d899d0 + c9f6d6c commit 2ce6399
Show file tree
Hide file tree
Showing 14 changed files with 170 additions and 116 deletions.
1 change: 1 addition & 0 deletions code/game/machinery/vending/vendor_types/engineering.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
list("EQUIPMENT", -1, null, null),
list("Utility Tool Belt", round(scale * 4), /obj/item/storage/belt/utility, VENDOR_ITEM_REGULAR),
list("Cable Coil", round(scale * 4), /obj/item/stack/cable_coil/random, VENDOR_ITEM_REGULAR),
list("Welding Goggles", round(scale * 2), /obj/item/clothing/glasses/welding, VENDOR_ITEM_REGULAR),
list("Toolkit", round(scale * 12), /obj/item/storage/firstaid/toolkit/empty, VENDOR_ITEM_REGULAR),

list("TOOLS", -1, null, null),
Expand Down
179 changes: 104 additions & 75 deletions code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm

Large diffs are not rendered by default.

18 changes: 14 additions & 4 deletions code/game/objects/items/devices/defibrillator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
w_class = SIZE_MEDIUM

var/blocked_by_suit = TRUE
var/heart_damage_to_deal = 5
/// Min damage defib deals to victims' heart
var/min_heart_damage_dealt = 3
/// Max damage defib deals to victims' heart
var/max_heart_damage_dealt = 5
var/ready = 0
var/damage_heal_threshold = 12 //This is the maximum non-oxy damage the defibrillator will heal to get a patient above -100, in all categories
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread
Expand Down Expand Up @@ -191,8 +194,11 @@
shock_cooldown = world.time + 10 //1 second cooldown before you can shock again

var/datum/internal_organ/heart/heart = H.internal_organs_by_name["heart"]
/// Has the defib already caused the chance of heart damage, to not potentially double up later
var/heart_already_damaged = FALSE
if(heart && prob(25))
heart.take_damage(heart_damage_to_deal, TRUE) //Allow the defibrillator to possibly worsen heart damage. Still rare enough to just be the "clone damage" of the defib
heart.take_damage(rand(min_heart_damage_dealt, max_heart_damage_dealt), TRUE) // Make death and revival leave lasting consequences
heart_already_damaged = TRUE

if(!H.is_revivable())
playsound(get_turf(src), 'sound/items/defib_failed.ogg', 25, 0)
Expand Down Expand Up @@ -230,6 +236,9 @@
user.track_life_saved(user.job)
user.life_revives_total++
H.handle_revive()
if(heart && !heart_already_damaged)
heart.take_damage(rand(min_heart_damage_dealt, max_heart_damage_dealt), TRUE) // Make death and revival leave lasting consequences

to_chat(H, SPAN_NOTICE("You suddenly feel a spark and your consciousness returns, dragging you back to the mortal plane."))
if(H.client?.prefs.toggles_flashing & FLASH_CORPSEREVIVE)
window_flash(H.client)
Expand All @@ -239,13 +248,14 @@

/obj/item/device/defibrillator/compact_adv
name = "advanced compact defibrillator"
desc = "An advanced compact defibrillator that trades capacity for strong immediate power. Ignores armor and heals strongly and quickly, at the cost of very low charge."
desc = "An advanced compact defibrillator that trades capacity for strong immediate power. Ignores armor and heals strongly and quickly, at the cost of very low charge. It does not damage the heart."
icon = 'icons/obj/items/experimental_tools.dmi'
icon_state = "compact_defib"
item_state = "defib"
w_class = SIZE_MEDIUM
blocked_by_suit = FALSE
heart_damage_to_deal = 0
min_heart_damage_dealt = 0
max_heart_damage_dealt = 0
damage_heal_threshold = 40
charge_cost = 198

Expand Down
5 changes: 3 additions & 2 deletions code/modules/cm_tech/implements/medical_czsp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,11 @@
/obj/item/device/defibrillator/upgraded
name = "upgraded emergency defibrillator"
icon_state = "adv_defib"
desc = "An advanced rechargeable defibrillator using induction to deliver shocks through metallic objects, such as armor, and does so with much greater efficiency than the standard variant."
desc = "An advanced rechargeable defibrillator using induction to deliver shocks through metallic objects, such as armor, and does so with much greater efficiency than the standard variant, not damaging the heart."

blocked_by_suit = FALSE
heart_damage_to_deal = 0
min_heart_damage_dealt = 0
max_heart_damage_dealt = 0
damage_heal_threshold = 35

/obj/item/ammo_magazine/internal/pillgun
Expand Down
39 changes: 20 additions & 19 deletions code/modules/mob/living/blood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,43 @@
b_volume = 0
else if(chem_effect_flags & CHEM_EFFECT_ORGAN_STASIS)
b_volume *= 1
else if(heart.damage > 1 && heart.damage < heart.min_bruised_damage)
b_volume *= 0.8
else if(heart.damage >= heart.min_bruised_damage && heart.damage < heart.min_broken_damage)
b_volume *= 0.6
else if(heart.damage >= heart.min_broken_damage && heart.damage < INFINITY)
b_volume *= 0.3
else if(heart.damage >= heart.organ_status >= ORGAN_BRUISED)
b_volume *= Clamp(100 - (2 * heart.damage), 30, 100) / 100

//Effects of bloodloss
if(b_volume <= BLOOD_VOLUME_SAFE)
/// The blood volume turned into a %, with BLOOD_VOLUME_NORMAL being 100%
var/blood_percentage = b_volume / (BLOOD_VOLUME_NORMAL / 100)
/// How much oxyloss will there be from the next time blood processes
var/additional_oxyloss = (100 - blood_percentage) / 5
/// The limit of the oxyloss gained, ignoring oxyloss from the switch statement
var/maximum_oxyloss = Clamp((100 - blood_percentage) / 2, oxyloss, 100)
if(oxyloss < maximum_oxyloss)
oxyloss += max(additional_oxyloss, 0)

//Bloodloss effects on nutrition
if(nutrition >= 300)
nutrition -= 10
else if(nutrition >= 200)
nutrition -= 3

switch(b_volume)
if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE)
if(prob(1))
var/word = pick("dizzy","woozy","faint")
to_chat(src, SPAN_DANGER("You feel [word]."))
if(oxyloss < 20)
oxyloss += 3
if(BLOOD_VOLUME_BAD to BLOOD_VOLUME_OKAY)
if(eye_blurry < 50)
AdjustEyeBlur(6)
if(oxyloss < 50)
oxyloss += 10
oxyloss += 2
oxyloss += 3
if(prob(15))
apply_effect(rand(1,3), PARALYZE)
var/word = pick("dizzy","woozy","faint")
to_chat(src, SPAN_DANGER("You feel very [word]."))
if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_BAD)
if(eye_blurry < 50)
AdjustEyeBlur(6)
oxyloss += 5
oxyloss += 8
toxloss += 3
if(prob(15))
apply_effect(rand(1,3), PARALYZE)
Expand All @@ -66,13 +74,6 @@
if(0 to BLOOD_VOLUME_SURVIVE)
death(create_cause_data("blood loss"))

// Without enough blood you slowly go hungry.
if(blood_volume < BLOOD_VOLUME_SAFE)
if(nutrition >= 300)
nutrition -= 10
else if(nutrition >= 200)
nutrition -= 3

// Xeno blood regeneration
/mob/living/carbon/xenomorph/handle_blood()
if(stat != DEAD) //Only living xenos regenerate blood
Expand Down
4 changes: 1 addition & 3 deletions code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@
accuracy_mult_unwielded = BASE_ACCURACY_MULT
scatter = SCATTER_AMOUNT_TIER_6
burst_scatter_mult = SCATTER_AMOUNT_TIER_7
set_burst_amount(BURST_AMOUNT_TIER_5)
set_burst_amount(BURST_AMOUNT_TIER_1)
scatter_unwielded = SCATTER_AMOUNT_TIER_6
damage_mult = BASE_BULLET_DAMAGE_MULT
damage_falloff_mult = DAMAGE_FALLOFF_TIER_10
Expand Down Expand Up @@ -1775,13 +1775,11 @@ not all weapons use normal magazines etc. load_into_chamber() itself is designed
/obj/item/weapon/gun/proc/set_burst_amount(value, mob/user)
burst_amount = value
SEND_SIGNAL(src, COMSIG_GUN_BURST_SHOTS_TO_FIRE_MODIFIED, burst_amount)
setup_firemodes()

/// adder for burst_amount
/obj/item/weapon/gun/proc/modify_burst_amount(value, mob/user)
burst_amount += value
SEND_SIGNAL(src, COMSIG_GUN_BURST_SHOTS_TO_FIRE_MODIFIED, burst_amount)
setup_firemodes()

/// Adder for burst_delay
/obj/item/weapon/gun/proc/modify_burst_delay(value, mob/user)
Expand Down
7 changes: 7 additions & 0 deletions html/changelogs/AutoChangeLog-pr-4065.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
author: "Huffie56"
delete-after: True
changes:
- code_imp: "added welding google to the com tech tool vendor."
- code_imp: "added scaling based on round population to the ColMarTech Surplus Uniform like the other vendors."
- code_imp: "Move every clothing items from ColMarTech Automated Armaments Squad Vendor to ColMarTech Surplus Uniform Vendor."
- code_imp: "rename ColMarTech Automated Armaments Squad Vendor to ColMarTech Automated Utilities Squad Vendor and add in tools food and other utilities."
6 changes: 6 additions & 0 deletions html/changelogs/AutoChangeLog-pr-4137.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
author: "BeagleGaming1"
delete-after: True
changes:
- balance: "Defibrillators are guaranteed to deal heart damage on successful revives"
- balance: "Blood volume now scales with heart damage rather than being a hardcoded multiplier"
- balance: "Blood volume oxyloss now scales rather than being a hardcoded loss amount"
4 changes: 0 additions & 4 deletions html/changelogs/AutoChangeLog-pr-4144.yml

This file was deleted.

5 changes: 0 additions & 5 deletions html/changelogs/AutoChangeLog-pr-4145.yml

This file was deleted.

4 changes: 0 additions & 4 deletions html/changelogs/AutoChangeLog-pr-4146.yml

This file was deleted.

4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-4147.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "Steelpoint"
delete-after: True
changes:
- bugfix: "Synthetic Breaching Hammer will now properly appear on the user's back when holstered."
10 changes: 10 additions & 0 deletions html/changelogs/archive/2023-08.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,13 @@
Support Officer jobs
Zonespace27:
- rscadd: Combisticks now use a proper chain instead of an invisible magic one.
2023-08-11:
Drathek:
- bugfix: Fixed runtimes with hijack not calculating roles correctly for hijack
larva surge
- bugfix: Fix IV Drip machines not displaying the IV line correctly when adding/removing
a bag when already attached
- code_imp: Fixes a lingering reference to the mob when a IV drip machine is destroyed.
Zonespace27:
- bugfix: A pile of guns no longer have burst fire (who weren't meant to)
- bugfix: The combichain can now be yanked back if droppeed.
Binary file modified icons/mob/humans/onmob/back.dmi
Binary file not shown.

0 comments on commit 2ce6399

Please sign in to comment.