diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 8257261251..eeef55941f 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -1,4 +1,5 @@
GLOBAL_DATUM_INIT(fire_overlay, /mutable_appearance, mutable_appearance('icons/effects/fire.dmi', "fire"))
+GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons/effects/welding_effect.dmi', "welding_sparks", GASFIRE_LAYER, ABOVE_LIGHTING_PLANE))
GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
// if true, everyone item when created will have its name changed to be
diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm
index f17e6502c4..db398725b5 100644
--- a/code/game/objects/items/tools/weldingtool.dm
+++ b/code/game/objects/items/tools/weldingtool.dm
@@ -121,6 +121,11 @@
dyn_explosion(T, plasmaAmount/5)//20 plasma in a standard welder has a 4 power explosion. no breaches, but enough to kill/dismember holder
qdel(src)
+/obj/item/weldingtool/use_tool(atom/target, mob/living/user, delay, amount, volume, datum/callback/extra_checks, skill_gain_mult)
+ target.add_overlay(GLOB.welding_sparks)
+ . = ..()
+ target.cut_overlay(GLOB.welding_sparks)
+
/obj/item/weldingtool/attack(mob/living/carbon/human/H, mob/user)
if(!istype(H))
return ..()
diff --git a/code/modules/mob/living/blood.dm b/code/modules/mob/living/blood.dm
index b9fea7dd38..a0584759f1 100644
--- a/code/modules/mob/living/blood.dm
+++ b/code/modules/mob/living/blood.dm
@@ -39,71 +39,72 @@
return
if(bodytemperature >= TCRYO && !(HAS_TRAIT(src, TRAIT_HUSK))) //cryosleep or husked people do not pump the blood.
- if(integrating_blood > 0)
- var/blood_integrated = max(integrating_blood - 1, 0)
- var/blood_diff = integrating_blood - blood_integrated
- integrating_blood = blood_integrated
- if(blood_volume < BLOOD_VOLUME_MAXIMUM)
- blood_volume += blood_diff
- if(blood_volume < BLOOD_VOLUME_NORMAL)
- var/nutrition_ratio = 0
- if(!HAS_TRAIT(src, TRAIT_NOHUNGER))
- switch(nutrition)
- if(0 to NUTRITION_LEVEL_STARVING)
- nutrition_ratio = 0.2
- if(NUTRITION_LEVEL_STARVING to NUTRITION_LEVEL_HUNGRY)
- nutrition_ratio = 0.4
- if(NUTRITION_LEVEL_HUNGRY to NUTRITION_LEVEL_FED)
- nutrition_ratio = 0.6
- if(NUTRITION_LEVEL_FED to NUTRITION_LEVEL_WELL_FED)
- nutrition_ratio = 0.8
- else
- nutrition_ratio = 1
- if(satiety > 80)
- nutrition_ratio *= 1.25
- adjust_nutrition(-nutrition_ratio * HUNGER_FACTOR)
- blood_volume = min(BLOOD_VOLUME_NORMAL, blood_volume + 0.5 * nutrition_ratio)
- var/thirst_ratio = 0
- if(!HAS_TRAIT(src, TRAIT_NOTHIRST))
- switch(thirst)
- if(0 to THIRST_LEVEL_PARCHED)
- thirst_ratio = 0.2
- if(THIRST_LEVEL_PARCHED to THIRST_LEVEL_THIRSTY)
- thirst_ratio = 0.4
- if(THIRST_LEVEL_THIRSTY to THIRST_LEVEL_BIT_THIRSTY)
- thirst_ratio = 0.6
- if(THIRST_LEVEL_BIT_THIRSTY to THIRST_LEVEL_QUENCHED)
- thirst_ratio = 0.8
- else
- thirst_ratio = 1
- adjust_thirst(-thirst_ratio * THIRST_FACTOR)
- blood_volume = min(BLOOD_VOLUME_NORMAL, blood_volume + 0.5 * thirst_ratio)
+ if(dna.species.handle_blood()) // if this returns TRUE, then the species is not handling blood itself and we can control everything
+ if(integrating_blood > 0)
+ var/blood_integrated = max(integrating_blood - 1, 0)
+ var/blood_diff = integrating_blood - blood_integrated
+ integrating_blood = blood_integrated
+ if(blood_volume < BLOOD_VOLUME_MAXIMUM)
+ blood_volume += blood_diff
+ if(blood_volume < BLOOD_VOLUME_NORMAL)
+ var/nutrition_ratio = 0
+ if(!HAS_TRAIT(src, TRAIT_NOHUNGER))
+ switch(nutrition)
+ if(0 to NUTRITION_LEVEL_STARVING)
+ nutrition_ratio = 0.2
+ if(NUTRITION_LEVEL_STARVING to NUTRITION_LEVEL_HUNGRY)
+ nutrition_ratio = 0.4
+ if(NUTRITION_LEVEL_HUNGRY to NUTRITION_LEVEL_FED)
+ nutrition_ratio = 0.6
+ if(NUTRITION_LEVEL_FED to NUTRITION_LEVEL_WELL_FED)
+ nutrition_ratio = 0.8
+ else
+ nutrition_ratio = 1
+ if(satiety > 80)
+ nutrition_ratio *= 1.25
+ adjust_nutrition(-nutrition_ratio * HUNGER_FACTOR)
+ blood_volume = min(BLOOD_VOLUME_NORMAL, blood_volume + 0.5 * nutrition_ratio)
+ var/thirst_ratio = 0
+ if(!HAS_TRAIT(src, TRAIT_NOTHIRST))
+ switch(thirst)
+ if(0 to THIRST_LEVEL_PARCHED)
+ thirst_ratio = 0.2
+ if(THIRST_LEVEL_PARCHED to THIRST_LEVEL_THIRSTY)
+ thirst_ratio = 0.4
+ if(THIRST_LEVEL_THIRSTY to THIRST_LEVEL_BIT_THIRSTY)
+ thirst_ratio = 0.6
+ if(THIRST_LEVEL_BIT_THIRSTY to THIRST_LEVEL_QUENCHED)
+ thirst_ratio = 0.8
+ else
+ thirst_ratio = 1
+ adjust_thirst(-thirst_ratio * THIRST_FACTOR)
+ blood_volume = min(BLOOD_VOLUME_NORMAL, blood_volume + 0.5 * thirst_ratio)
- //Effects of bloodloss
- if(!HAS_TRAIT(src, TRAIT_ROBOTIC_ORGANISM)) //Synths are immune to direct consequences of bloodloss, instead suffering penalties to heat exchange.
- var/word = pick("dizzy","woozy","faint")
- var/blood_effect_volume = blood_volume + integrating_blood
- switch(blood_effect_volume)
- if(BLOOD_VOLUME_MAXIMUM to BLOOD_VOLUME_EXCESS)
- if(prob(10))
- to_chat(src, "You feel terribly bloated.")
- if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE)
- if(prob(5))
- to_chat(src, "You feel [word].")
- adjustOxyLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.01, 1))
- if(BLOOD_VOLUME_BAD to BLOOD_VOLUME_OKAY)
- adjustOxyLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.02, 1))
- if(prob(5))
- blur_eyes(6)
- to_chat(src, "You feel very [word].")
- if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_BAD)
- adjustOxyLoss(5)
- if(prob(15))
- Unconscious(rand(20,60))
- to_chat(src, "You feel extremely [word].")
- if(-INFINITY to BLOOD_VOLUME_SURVIVE)
- if(!HAS_TRAIT(src, TRAIT_NODEATH))
- death()
+ //Effects of bloodloss
+ if(!HAS_TRAIT(src, TRAIT_ROBOTIC_ORGANISM)) //Synths are immune to direct consequences of bloodloss, instead suffering penalties to heat exchange.
+ var/word = pick("dizzy","woozy","faint")
+ var/blood_effect_volume = blood_volume + integrating_blood
+ switch(blood_effect_volume)
+ if(BLOOD_VOLUME_MAXIMUM to BLOOD_VOLUME_EXCESS)
+ if(prob(10))
+ to_chat(src, "You feel terribly bloated.")
+ if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE)
+ if(prob(5))
+ to_chat(src, "You feel [word].")
+ adjustOxyLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.01, 1))
+ if(BLOOD_VOLUME_BAD to BLOOD_VOLUME_OKAY)
+ adjustOxyLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.02, 1))
+ if(prob(5))
+ blur_eyes(6)
+ to_chat(src, "You feel very [word].")
+ if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_BAD)
+ adjustOxyLoss(5)
+ if(prob(15))
+ Unconscious(rand(20,60))
+ to_chat(src, "You feel extremely [word].")
+ if(-INFINITY to BLOOD_VOLUME_SURVIVE)
+ if(!HAS_TRAIT(src, TRAIT_NODEATH))
+ death()
var/temp_bleed = 0
//Bleeding out
diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm
index 5790a02832..f2cbf239db 100644
--- a/code/modules/mob/living/carbon/damage_procs.dm
+++ b/code/modules/mob/living/carbon/damage_procs.dm
@@ -92,10 +92,12 @@
/mob/living/carbon/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE, toxins_type = TOX_DEFAULT)
if(!forced && HAS_TRAIT(src, TRAIT_TOXINLOVER) && toxins_type != TOX_SYSCORRUPT) //damage becomes healing and healing becomes damage
amount = -amount
+ // don't allow toxinlover to push blood levels past BLOOD_VOLUME_MAXIMUM, but also don't set it back down to this if it's higher from something else
+ var/blood_cap = blood_volume > BLOOD_VOLUME_MAXIMUM ? blood_volume : BLOOD_VOLUME_MAXIMUM
if(amount > 0)
- blood_volume -= 3 * amount //5x was too much, this is punishing enough.
+ blood_volume = min((blood_volume - (3 * amount)), blood_cap) //5x was too much, this is punishing enough.
else
- blood_volume -= amount
+ blood_volume = min((blood_volume - amount), blood_cap)
return ..()
/mob/living/carbon/getStaminaLoss()
diff --git a/code/modules/mob/living/carbon/human/innate_abilities/limb_regeneration.dm b/code/modules/mob/living/carbon/human/innate_abilities/limb_regeneration.dm
index ce36397c91..672b6f5b7a 100644
--- a/code/modules/mob/living/carbon/human/innate_abilities/limb_regeneration.dm
+++ b/code/modules/mob/living/carbon/human/innate_abilities/limb_regeneration.dm
@@ -22,28 +22,24 @@
return FALSE
return 0
-/datum/action/innate/ability/limb_regrowth/Activate()
+/datum/action/innate/limb_regrowth/Activate()
var/mob/living/carbon/human/H = owner
var/list/limbs_to_heal = H.get_missing_limbs()
- if(limbs_to_heal.len < 1)
- to_chat(H, "You feel intact enough as it is.")
+ if(!length(limbs_to_heal))
+ to_chat(H, span_notice("You feel intact enough as it is."))
return
- to_chat(H, "You focus intently on your missing [limbs_to_heal.len >= 2 ? "limbs" : "limb"]...")
- var/mode = H.get_ability_property(INNATE_ABILITY_LIMB_REGROWTH, PROPERTY_LIMB_REGROWTH_USAGE_TYPE)
- switch(mode)
- if(REGROWTH_USES_BLOOD)
- if(H.blood_volume >= 40*limbs_to_heal.len+(BLOOD_VOLUME_OKAY*H.blood_ratio))
- H.regenerate_limbs()
- H.blood_volume -= 40*limbs_to_heal.len
- to_chat(H, "...and after a moment you finish reforming!")
- return
- else if(H.blood_volume >= 40)//We can partially heal some limbs
- while(H.blood_volume >= (BLOOD_VOLUME_OKAY*H.blood_ratio)+40)
- var/healed_limb = pick(limbs_to_heal)
- H.regenerate_limb(healed_limb)
- limbs_to_heal -= healed_limb
- H.blood_volume -= 40
- to_chat(H, "...but there is not enough of you to fix everything! You must attain more mass to heal completely!")
- return
- to_chat(H, "...but there is not enough of you to go around! You must attain more mass to heal!")
-
+ to_chat(H, span_notice("You focus intently on your missing [length(limbs_to_heal) >= 2 ? "limbs" : "limb"]..."))
+ if(H.blood_volume >= 40*length(limbs_to_heal)+BLOOD_VOLUME_OKAY)
+ H.regenerate_limbs()
+ H.blood_volume -= 40*length(limbs_to_heal)
+ to_chat(H, span_notice("...and after a moment you finish reforming!"))
+ return
+ else if(H.blood_volume >= 40)//We can partially heal some limbs
+ while(H.blood_volume >= BLOOD_VOLUME_OKAY+40)
+ var/healed_limb = pick(limbs_to_heal)
+ H.regenerate_limb(healed_limb)
+ limbs_to_heal -= healed_limb
+ H.blood_volume -= 40
+ to_chat(H, span_warning("...but there is not enough of you to fix everything! You must attain more mass to heal completely!"))
+ return
+ to_chat(H, span_warning("...but there is not enough of you to go around! You must attain more mass to heal!"))
diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm
index e1dad7154a..8e9a4ec60b 100644
--- a/code/modules/mob/living/carbon/human/species.dm
+++ b/code/modules/mob/living/carbon/human/species.dm
@@ -2605,6 +2605,13 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
return TRUE
return FALSE
+////////////////
+//Blood Stuff///
+////////////////
+// true = handle blood normally, false = do not (and then handle blood in this proc instead please!!)
+/datum/species/proc/handle_blood()
+ return TRUE
+
////////////////
//Tail Wagging//
////////////////
diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
index ff69d760d0..d4a8150c29 100644
--- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
@@ -56,38 +56,46 @@
//update blood color to body color
exotic_blood_color = "#" + H.dna.features["mcolor"]
-/datum/species/jelly/spec_life(mob/living/carbon/human/H)
- if(H.stat == DEAD || HAS_TRAIT(H, TRAIT_NOMARROW)) //can't farm slime jelly from a dead slime/jelly person indefinitely, and no regeneration for bloodsuckers
- return
- if(!H.blood_volume)
- H.adjust_integration_blood(5)
- H.adjustBruteLoss(5)
- to_chat(H, "You feel empty!")
+/datum/species/jelly/handle_blood(mob/living/carbon/human/H, delta_time, times_fired)
+ if(H.stat == DEAD) //can't farm slime jelly from a dead slime/jelly person indefinitely
+ return TRUE // we dont handle blood when dead
- if(H.blood_volume < (BLOOD_VOLUME_NORMAL * H.blood_ratio))
+ if(H.blood_volume <= 0)
+ H.blood_volume += 2.5 * delta_time
+ H.adjustBruteLoss(2.5 * delta_time)
+ to_chat(H, span_danger("You feel empty!"))
+
+ if(H.blood_volume < BLOOD_VOLUME_NORMAL)
if(H.nutrition >= NUTRITION_LEVEL_STARVING)
- H.adjust_integration_blood(3)
- H.nutrition -= 2.5
- if(H.blood_volume < (BLOOD_VOLUME_OKAY*H.blood_ratio))
- if(prob(5))
- to_chat(H, "You feel drained!")
- if(H.blood_volume < (BLOOD_VOLUME_BAD*H.blood_ratio))
+ H.blood_volume += 1.5 * delta_time
+ H.adjust_nutrition(-1.25 * delta_time)
+
+ if(H.blood_volume < BLOOD_VOLUME_OKAY)
+ if(DT_PROB(2.5, delta_time))
+ to_chat(H, span_danger("You feel drained!"))
+
+ if(H.blood_volume < BLOOD_VOLUME_BAD)
Cannibalize_Body(H)
- ..()
+
+ var/datum/action/innate/ability/regrowth = H.ability_actions[INNATE_ABILITY_LIMB_REGROWTH]
+ if(regrowth)
+ regrowth.UpdateButtonIcon()
+
+ return FALSE // to let living/handle_blood know that the species is handling blood instead
/datum/species/jelly/proc/Cannibalize_Body(mob/living/carbon/human/H)
var/list/limbs_to_consume = list(BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_R_LEG, BODY_ZONE_L_LEG) - H.get_missing_limbs()
var/obj/item/bodypart/consumed_limb
- if(!limbs_to_consume.len)
+ if(!length(limbs_to_consume))
H.losebreath++
return
if(H.get_num_legs(FALSE)) //Legs go before arms
limbs_to_consume -= list(BODY_ZONE_R_ARM, BODY_ZONE_L_ARM)
consumed_limb = H.get_bodypart(pick(limbs_to_consume))
consumed_limb.drop_limb()
- to_chat(H, "Your [consumed_limb] is drawn back into your body, unable to maintain its shape!")
+ to_chat(H, span_userdanger("Your [consumed_limb] is drawn back into your body, unable to maintain its shape!"))
qdel(consumed_limb)
- H.adjust_integration_blood(20)
+ H.blood_volume += 20
////////////////////////////////////////////////////////SLIMEPEOPLE///////////////////////////////////////////////////////////////////
diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm
index 15acd40172..bb7b21596f 100644
--- a/code/modules/projectiles/guns/energy/special.dm
+++ b/code/modules/projectiles/guns/energy/special.dm
@@ -167,6 +167,11 @@
/obj/item/gun/energy/plasmacutter/use(amount)
return cell.use(amount * 100)
+/obj/item/gun/energy/plasmacutter/use_tool(atom/target, mob/living/user, delay, amount, volume, datum/callback/extra_checks, skill_gain_mult)
+ target.add_overlay(GLOB.welding_sparks)
+ . = ..()
+ target.cut_overlay(GLOB.welding_sparks)
+
/obj/item/gun/energy/plasmacutter/adv
name = "advanced plasma cutter"
icon_state = "adv_plasmacutter"
diff --git a/html/changelogs/archive/2022-07.yml b/html/changelogs/archive/2022-07.yml
index 2b34ee65a1..d19794a4fe 100644
--- a/html/changelogs/archive/2022-07.yml
+++ b/html/changelogs/archive/2022-07.yml
@@ -31,3 +31,29 @@
2022-07-08:
WoolyAypa:
- rscadd: Added a new dullahan-exclusive option in the Character Appearance tab.
+ Bhijn & Myr:
+ - code_imp: Barks can now be intercepted via component signals. Both bark queuing
+ and individual barks can be intercepted via signals!
+ - rscadd: The "Brassy" bark has been added, using the cog installation sound as
+ a sample! This works surprisingly well as a bark
+ - rscadd: 'Genetics can now give people goose1.ogg tweak: If new barks are queued
+ before the current barks are finished, this will interrupt all ongoing barks
+ tweak: Yelling no longer cuts the minimum bark time variance down to half, as
+ this proved to sound pretty awful with most barks. tweak: Chitter now uses a
+ completely unique audio sample, which is based on the original ratchet.ogg it
+ used to be. This new sample is shorter, and has significantly less harsh noise
+ on the higher frequencies, making it much easier on the ears. Additionally,
+ the minimum speed for chitter has been reduced from 6 to 4. tweak: Setting vocal_bark
+ to a file should now automatically turn it into a sound datum (in theory, at
+ least! as of writing i haven''t tested this at all)'
+ - bugfix: Barks and other DNA features after the first mob color now work exactly
+ as you'd expect. This was the cause for horrid eldritch bark sounds when the
+ wrong part of DNA gets hit. The first mob color has lost some genetics resolution
+ as an indirect result of this (the higher resolution is what caused this bug)
+ UDaV73rus, Tokoriso, dragomagol:
+ - rscadd: welding now has an animation!
+ timothyteakettle:
+ - rscadd: slimes no longer die from having no blood, properly consume limbs when
+ at low blood, and suffer brute damage and oxygen loss for having no blood and
+ no limbs left to consume respectably, they cannot go past BLOOD_VOLUME_MAXIMUM
+ from consuming toxin
diff --git a/icons/effects/welding_effect.dmi b/icons/effects/welding_effect.dmi
new file mode 100644
index 0000000000..8b8db2dcae
Binary files /dev/null and b/icons/effects/welding_effect.dmi differ