[MODULAR] Fixes synth burn wounds not applying scars, rewrites synth wounds to be better (#26366)

init
This commit is contained in:
nikothedude
2024-02-09 00:08:55 +01:00
committed by GitHub
parent 2d6c1e7247
commit 1fe6b473ea
2 changed files with 52 additions and 15 deletions
@@ -89,13 +89,50 @@
/// The glow we have attached to our victim, to simulate our limb glowing.
var/obj/effect/dummy/lighting_obj/moblight/mob_glow
/// A bad system I'm using to track the worst scar we earned (since we can demote, we want the biggest our wound has been, not what it was when it was cured (probably moderate))
var/datum/scar/highest_scar
/datum/wound/burn/robotic/overheat/New(temperature)
chassis_temperature = (isnull(temperature) ? get_random_starting_temperature() : temperature)
return ..()
/datum/wound/burn/robotic/overheat/wound_injury(datum/wound/old_wound, attack_direction)
. = ..()
if (old_wound && old_wound.severity > severity && istype(old_wound, /datum/wound/burn/robotic/overheat))
var/datum/wound/burn/robotic/overheat/overheat_wound = old_wound
if (overheat_wound.highest_scar)
set_highest_scar(overheat_wound.highest_scar)
overheat_wound.clear_highest_scar()
if (!highest_scar && can_scar)
var/datum/scar/new_scar = new
set_highest_scar(new_scar)
new_scar.generate(limb, src, add_to_scars = FALSE)
/datum/wound/burn/robotic/overheat/proc/set_highest_scar(datum/scar/new_scar)
if (highest_scar)
UnregisterSignal(highest_scar, COMSIG_QDELETING)
if (new_scar)
RegisterSignal(new_scar, COMSIG_QDELETING, PROC_REF(clear_highest_scar))
highest_scar = new_scar
/datum/wound/burn/robotic/overheat/proc/clear_highest_scar(datum/source)
SIGNAL_HANDLER
set_highest_scar(null)
/datum/wound/burn/robotic/overheat/remove_wound(ignore_limb, replaced)
if (!replaced && highest_scar)
already_scarred = TRUE
highest_scar.lazy_attach(limb)
return ..()
/datum/wound/burn/robotic/overheat/Destroy()
QDEL_NULL(mob_glow)
highest_scar = null
return ..()
/datum/wound/burn/robotic/overheat/set_victim(mob/living/new_victim)
@@ -219,7 +256,7 @@
var/clamped_new_temperature
var/heat_adjustment_used
if(temp_delta > 0)
if (temp_delta > 0)
clamped_new_temperature = min(min(chassis_temperature + max(temp_delta, 1), temperature), heating_threshold)
heat_adjustment_used = (clamped_new_temperature / unclamped_new_temperature)
else
+14 -14
View File
@@ -7,7 +7,7 @@
"bluntsevere": [
"an area of slightly crumpled metal",
"some faded cracks on some screws"
"some misaligned plates"
],
"bluntcritical": [
@@ -21,30 +21,30 @@
],
"slashsevere": [
"a pair of soldered, straight cracks",
"an area of freshly replaced metal",
"has some deep welded scratches on the metal"
"a pair of soldered cracks",
"an line of freshly replaced metal",
"some deep welds on the metal"
],
"slashcritical": [
"a matrix of desperately soldered wide cracks",
"a matrix of desperately soldered cracks",
"some gruesome welding lines",
"a series of deep and wide welded gashes"
],
"piercemoderate": [
"a dot of hardened solder",
"a dot of fresh metal in a small hole"
"a dot of fresh metal"
],
"piercesevere": [
"a wad of hardened solder",
"a small patch of fresh metal in a small hole"
"a large wad of hardened solder",
"a few cracks originating from a small hole"
],
"piercecritical": [
"a large splot of hardened solder",
"an inward caving hole leading to fresh metal"
"a spiderweb of cracks crawling from a sealed hole"
],
"burnsevere": [
@@ -54,14 +54,14 @@
],
"burncritical": [
"lots of polychromatic metal on it",
"some heat-warped plating",
"melting marks"
"streaks of polychromatic metal",
"gruesomely heat-warped plating",
"huge melting marks"
],
"dismember": [
"has some fresh metal around various joints",
"has fresh metal around various joints",
"has some solder marks securing various joints",
"has clear re-seating welding marks"
"has clear re-seating marks"
]
}