All camelCase (Brute|Burn|Fire|Tox|Oxy|Organ|Stamina)(Loss) procs now use snake_case. UNDERSCORES RULE! (#94111)

## About The Pull Request
It's just a partial cleanup of
anti-[STYLE](https://github.com/tgstation/tgstation/blob/master/.github/guides/STYLE.md)
code from /tg/'s ancient history. I compiled & tested with my helpful
assistant and damage is still working.

<img width="1920" height="1040" alt="image"
src="https://github.com/user-attachments/assets/26dabc17-088f-4008-b299-3ff4c27142c3"
/>


I'll upload the .cs script I used to do it shortly.

## Why It's Good For The Game
Just minor code cleanup.

Script used is located at https://metek.tech/camelTo-Snake.7z

EDIT 11/23/25: Updated the script to use multithreading and sequential
scan so it works a hell of a lot faster
```
/*
//
Copyright 2025 Joshua 'Joan Metekillot' Kidder

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
//
*/
using System.Text.RegularExpressions;
class Program
{
    static async Task Main(string[] args)
    {
        var readFile = new FileStreamOptions
        {
            Access = FileAccess.Read,
            Share = FileShare.ReadWrite,
            Options = FileOptions.Asynchronous | FileOptions.SequentialScan
        };
        FileStreamOptions writeFile = new FileStreamOptions
        {
            Share = FileShare.ReadWrite,
            Access = FileAccess.ReadWrite,
            Mode = FileMode.Truncate,
            Options = FileOptions.Asynchronous
        };
        RegexOptions regexOptions = RegexOptions.Multiline | RegexOptions.Compiled;
        Dictionary<string, int> changedProcs = new();
        string regexPattern = @"(?<=\P{L})([a-z]+)([A-Z]{1,2}[a-z]+)*(Brute|Burn|Fire|Tox|Oxy|Organ|Stamina)(Loss)([A-Z]{1,2}[a-z]+)*";
        Regex camelCaseProcRegex = new(regexPattern, regexOptions);

        string snakeify(Match matchingRegex)
        {
            var vals =
            matchingRegex.Groups.Cast<Group>().SelectMany(_ => _.Captures).Select(_ => _.Value).ToArray();
            var newVal = string.Join("_", vals.Skip(1).ToArray()).ToLower();
            string logString = $"{vals[0]} => {newVal}";
            if (changedProcs.TryGetValue(logString, out int value))
            {
                changedProcs[logString] = value + 1;
            }
            else
            {
                changedProcs.Add(logString, 1);
            }
            return newVal;
        }
        var dmFiles = Directory.EnumerateFiles(".", "*.dm", SearchOption.AllDirectories).ToAsyncEnumerable<string>();

        // uses default ParallelOptions
        // https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.paralleloptions?view=net-10.0#main
        await Parallel.ForEachAsync(dmFiles, async (filePath, UnusedCancellationToken) =>
        {
            var reader = new StreamReader(filePath, readFile);
            string oldContent = await reader.ReadToEndAsync();
            string newContent = camelCaseProcRegex.Replace(oldContent, new MatchEvaluator((Func<Match, string>)snakeify));
            if (oldContent != newContent)
            {
                var writer = new StreamWriter(filePath, writeFile);
                await writer.WriteAsync(newContent);
                await writer.DisposeAsync();
            }
            reader.Dispose();
        });
        var logToList = changedProcs.Cast<KeyValuePair<string, int>>().ToList();
        foreach (var pair in logToList)
        {
            Console.WriteLine($"{pair.Key}: {pair.Value} locations");
        }
    }
}

```

## Changelog
🆑 Bisar
code: All (Brute|Burn|Fire|Tox|Oxy|Organ|Stamina)(Loss) procs now use
snake_case, in-line with the STYLE guide. Underscores rule!
/🆑
This commit is contained in:
Joshua Kidder
2025-11-27 15:50:23 -05:00
committed by GitHub
parent 0079462f05
commit 7a3ad79506
410 changed files with 1695 additions and 1695 deletions
+1 -1
View File
@@ -104,7 +104,7 @@
span_notice("You attempt to do a flip while still off balance from the last flip and fall down!")
)
if(prob(fall_over_prob/2))
flippy_mcgee.adjustBruteLoss(1)
flippy_mcgee.adjust_brute_loss(1)
else
flippy_mcgee.visible_message(
span_notice("[flippy_mcgee] stumbles a bit after their flip."),
+1 -1
View File
@@ -166,7 +166,7 @@
/mob/living/basic/Life(seconds_per_tick = SSMOBS_DT, times_fired)
. = ..()
if(staminaloss > 0)
adjustStaminaLoss(-stamina_recovery * seconds_per_tick, forced = TRUE)
adjust_stamina_loss(-stamina_recovery * seconds_per_tick, forced = TRUE)
/mob/living/basic/get_default_say_verb()
return length(speak_emote) ? pick(speak_emote) : ..()
+4 -4
View File
@@ -74,7 +74,7 @@
qdel(victim.get_organ_slot(ORGAN_SLOT_LUNGS))
qdel(victim.get_organ_slot(ORGAN_SLOT_HEART))
qdel(victim.get_organ_slot(ORGAN_SLOT_LIVER))
victim.adjustBruteLoss(500)
victim.adjust_brute_loss(500)
victim.death() //make sure they die
victim.apply_status_effect(/datum/status_effect/gutted)
return TRUE
@@ -87,12 +87,12 @@
/mob/living/basic/boss/ex_act(severity, target)
switch (severity)
if (EXPLODE_DEVASTATE)
adjustBruteLoss(250)
adjust_brute_loss(250)
if (EXPLODE_HEAVY)
adjustBruteLoss(100)
adjust_brute_loss(100)
if (EXPLODE_LIGHT)
adjustBruteLoss(50)
adjust_brute_loss(50)
return TRUE
+1 -1
View File
@@ -771,7 +771,7 @@ GLOBAL_LIST_INIT(command_strings, list(
update_appearance()
/mob/living/basic/bot/rust_heretic_act()
adjustBruteLoss(400)
adjust_brute_loss(400)
/mob/living/basic/bot/proc/attempt_access(mob/bot, obj/door_attempt)
SIGNAL_HANDLER
+2 -2
View File
@@ -470,10 +470,10 @@
health += 10
if(istype(eaten_atom, /obj/item/food/grown/banana))
var/obj/item/food/grown/banana/banana_morsel = eaten_atom
adjustBruteLoss(-(banana_morsel.seed.potency / 100 ) * maxHealth * 0.2)
adjust_brute_loss(-(banana_morsel.seed.potency / 100 ) * maxHealth * 0.2)
prank_pouch += banana_morsel.generate_trash(src)
else
adjustBruteLoss(-maxHealth * 0.1)
adjust_brute_loss(-maxHealth * 0.1)
qdel(eaten_atom)
playsound(loc,'sound/items/eatfood.ogg', rand(30,50), TRUE)
@@ -258,7 +258,7 @@
Stun(70)
to_chat(src, span_danger("<b>ER@%R: MME^RY CO#RU9T!</b> R&$b@0tin)..."))
if(severity == 1)
adjustBruteLoss(heavy_emp_damage)
adjust_brute_loss(heavy_emp_damage)
to_chat(src, span_userdanger("HeAV% DA%^MMA+G TO I/O CIR!%UUT!"))
/mob/living/basic/drone/proc/alarm_triggered(datum/source, alarm_type, area/source_area)
@@ -16,7 +16,7 @@
drone.visible_message(span_notice("[drone] begins to cannibalize parts from [src]."), span_notice("You begin to cannibalize parts from [src]..."))
if(do_after(drone, 6 SECONDS, 0, target = src))
drone.visible_message(span_notice("[drone] repairs itself using [src]'s remains!"), span_notice("You repair yourself using [src]'s remains."))
drone.adjustBruteLoss(-src.maxHealth)
drone.adjust_brute_loss(-src.maxHealth)
new /obj/effect/decal/cleanable/blood/splatter/oil(get_turf(src))
ghostize(can_reenter_corpse = FALSE)
qdel(src)
@@ -93,7 +93,7 @@
to_chat(user, span_warning("You need to remain still to tighten [src]'s screws!"))
return ITEM_INTERACT_SUCCESS
adjustBruteLoss(-getBruteLoss())
adjust_brute_loss(-get_brute_loss())
visible_message(span_notice("[user] tightens [src == user ? "[user.p_their()]" : "[src]'s"] loose screws!"), span_notice("[src == user ? "You tighten" : "[user] tightens"] your loose screws."))
return ITEM_INTERACT_SUCCESS
@@ -72,7 +72,7 @@
if(!(living_target.mob_biotypes & MOB_PLANT))
return
living_target.adjustBruteLoss(20)
living_target.adjust_brute_loss(20)
playsound(src, 'sound/items/eatfood.ogg', rand(30, 50), TRUE)
var/obj/item/bodypart/edible_bodypart
@@ -191,9 +191,9 @@
gib()
return TRUE
if (EXPLODE_HEAVY)
adjustBruteLoss(60)
adjust_brute_loss(60)
if (EXPLODE_LIGHT)
adjustBruteLoss(30)
adjust_brute_loss(30)
return TRUE
@@ -294,7 +294,7 @@
summoner.visible_message(span_bolddanger("Blood sprays from [summoner] as [src] takes damage!"))
if(summoner.stat == UNCONSCIOUS || summoner.stat == HARD_CRIT)
to_chat(summoner, span_bolddanger("Your head pounds, you can't take the strain of sustaining [src] in this condition!"))
summoner.adjustOrganLoss(ORGAN_SLOT_BRAIN, amount * 0.5)
summoner.adjust_organ_loss(ORGAN_SLOT_BRAIN, amount * 0.5)
/// When our owner is deleted, we go too.
/mob/living/basic/guardian/proc/on_summoner_deletion(mob/living/source)
@@ -34,7 +34,7 @@
/mob/living/basic/guardian/protector/ex_act(severity)
if(severity >= EXPLODE_DEVASTATE)
adjustBruteLoss(400) //if in protector mode, will do 20 damage and not actually necessarily kill the summoner
adjust_brute_loss(400) //if in protector mode, will do 20 damage and not actually necessarily kill the summoner
return TRUE
return ..()
@@ -23,7 +23,7 @@
return modifier * damage_coeff[damage_type]
return modifier
/mob/living/basic/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
/mob/living/basic/adjust_brute_loss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
if(!can_adjust_brute_loss(amount, forced, required_bodytype))
return 0
if(forced)
@@ -31,7 +31,7 @@
else if(damage_coeff[BRUTE])
. = adjust_health(amount * damage_coeff[BRUTE] * CONFIG_GET(number/damage_multiplier), updating_health, forced)
/mob/living/basic/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
/mob/living/basic/adjust_fire_loss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
if(!can_adjust_fire_loss(amount, forced, required_bodytype))
return 0
if(forced)
@@ -39,7 +39,7 @@
else if(damage_coeff[BURN])
. = adjust_health(amount * damage_coeff[BURN] * CONFIG_GET(number/damage_multiplier), updating_health, forced)
/mob/living/basic/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype, required_respiration_type)
/mob/living/basic/adjust_oxy_loss(amount, updating_health = TRUE, forced = FALSE, required_biotype, required_respiration_type)
if(!can_adjust_oxy_loss(amount, forced, required_biotype, required_respiration_type))
return 0
if(forced)
@@ -47,7 +47,7 @@
else if(damage_coeff[OXY])
. = adjust_health(amount * damage_coeff[OXY] * CONFIG_GET(number/damage_multiplier), updating_health, forced)
/mob/living/basic/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
/mob/living/basic/adjust_tox_loss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
if(!can_adjust_tox_loss(amount, forced, required_biotype))
return 0
if(forced)
@@ -55,7 +55,7 @@
else if(damage_coeff[TOX])
. = adjust_health(amount * damage_coeff[TOX] * CONFIG_GET(number/damage_multiplier), updating_health, forced)
/mob/living/basic/adjustStaminaLoss(amount, updating_stamina = TRUE, forced = FALSE, required_biotype)
/mob/living/basic/adjust_stamina_loss(amount, updating_stamina = TRUE, forced = FALSE, required_biotype)
if(!can_adjust_stamina_loss(amount, forced, required_biotype))
return 0
. = staminaloss
@@ -23,4 +23,4 @@
/mob/living/basic/heretic_summon/ash_spirit/Life(seconds_per_tick, times_fired)
. = ..()
adjustBruteLoss(-3) // 3 health passively healing
adjust_brute_loss(-3) // 3 health passively healing
@@ -111,8 +111,8 @@
back.on_arm_eaten()
return
adjustBruteLoss(-maxHealth * 0.5, FALSE)
adjustFireLoss(-maxHealth * 0.5, FALSE)
adjust_brute_loss(-maxHealth * 0.5, FALSE)
adjust_fire_loss(-maxHealth * 0.5, FALSE)
if(health < maxHealth * 0.8)
return
@@ -44,7 +44,7 @@
return
var/turf/our_turf = get_turf(src)
if(HAS_TRAIT(our_turf, TRAIT_RUSTY))
adjustBruteLoss(-3 * seconds_per_tick)
adjust_brute_loss(-3 * seconds_per_tick)
return ..()
@@ -87,7 +87,7 @@
if(!do_after(src, 5 SECONDS, target))
return
target.gib(DROP_ALL_REMAINS)
adjustBruteLoss(-1 * heal_on_cannibalize)
adjust_brute_loss(-1 * heal_on_cannibalize)
///Ash whelp, the "lava" variant of ice whelps.
/mob/living/basic/mining/ice_whelp/ash
@@ -66,7 +66,7 @@
. = ..()
if(volume <= 5)
return
if(poisoned_mob.adjustToxLoss(2.5 * REM * seconds_per_tick, updating_health = FALSE))
if(poisoned_mob.adjust_tox_loss(2.5 * REM * seconds_per_tick, updating_health = FALSE))
return UPDATE_MOB_HEALTH
// bubble ability structure
@@ -336,7 +336,7 @@
var/mob/living/living_target = target_atom
living_target.adjust_fire_stacks(0.2)
living_target.ignite_mob()
living_target.adjustFireLoss(30)
living_target.adjust_fire_loss(30)
playsound(target_turf, 'sound/effects/magic/lightningbolt.ogg', 50, TRUE)
if(!is_seedling)
@@ -110,7 +110,7 @@
if(isliving(AM))
var/mob/living/L = AM
if(!isvineimmune(L))
L.adjustBruteLoss(5)
L.adjust_brute_loss(5)
to_chat(L, span_alert("You cut yourself on the thorny vines."))
/**
@@ -197,7 +197,7 @@
else if(vines_in_range)
alert_shown = FALSE
adjustBruteLoss(vines_in_range ? -weed_heal : no_weed_damage) //every life tick take 20 damage if not near vines or heal 10 if near vines, 5 times out of weeds = u ded
adjust_brute_loss(vines_in_range ? -weed_heal : no_weed_damage) //every life tick take 20 damage if not near vines or heal 10 if near vines, 5 times out of weeds = u ded
/datum/action/cooldown/mob_cooldown/projectile_attack/vine_tangle
name = "Tangle"
@@ -47,7 +47,7 @@
continue
balloon_alert(victim, "grabbed")
visible_message(span_danger("[src] grabs hold of [victim]!"))
victim.adjustBruteLoss(rand(min_damage, max_damage))
victim.adjust_brute_loss(rand(min_damage, max_damage))
if (victim.apply_status_effect(/datum/status_effect/incapacitating/stun/goliath_tentacled, grapple_time, src))
buckle_mob(victim, TRUE)
SEND_SIGNAL(victim, COMSIG_GOLIATH_TENTACLED_GRABBED)
@@ -240,8 +240,8 @@
grown.tamed()
for(var/friend in ai_controller?.blackboard?[BB_FRIENDS_LIST])
grown.befriend(friend)
grown.setBruteLoss(getBruteLoss())
grown.setFireLoss(getFireLoss())
grown.set_brute_loss(get_brute_loss())
grown.set_fire_loss(get_fire_loss())
qdel(src) //We called change_mob_type without 'delete_old_mob = TRUE' since we had to pass down friends and damage
/mob/living/basic/mining/lobstrosity/juvenile/lava
@@ -119,7 +119,7 @@
user.balloon_alert(user, "at full integrity!")
return TRUE
if(welder.use_tool(src, user, 0, volume=40))
adjustBruteLoss(-15)
adjust_brute_loss(-15)
user.balloon_alert(user, "successfully repaired!")
return TRUE
@@ -517,7 +517,7 @@
visible_message(span_warning("[src] arises again, revived by the dark magicks!"), \
span_cult_large("RISE"))
revive(ADMIN_HEAL_ALL) //also means that a dead Nars-Ian can consume a pet and revive
adjustBruteLoss(-maxHealth)
adjust_brute_loss(-maxHealth)
//LISA! SQUEEEEEEEEE~
/mob/living/basic/pet/dog/corgi/lisa
@@ -125,7 +125,7 @@
return
if(health < maxHealth)
adjustBruteLoss(-4 * seconds_per_tick) //Fast life regen
adjust_brute_loss(-4 * seconds_per_tick) //Fast life regen
for(var/mob/living/carbon/humanoid_entities in view(3, src)) //Mood aura which stay as long you do not wear Sanallite as hat or carry(I will try to make it work with hat someday(obviously weaker than normal one))
humanoid_entities.add_mood_event("kobun", /datum/mood_event/kobun)
@@ -350,7 +350,7 @@ GLOBAL_LIST_INIT(strippable_parrot_items, create_strippable_list(list(
return TRUE // we still ate it
if(health < maxHealth)
adjustBruteLoss(-10)
adjust_brute_loss(-10)
speech_probability_rate *= 1.27
speech_shuffle_rate += 10
update_speech_blackboards()
@@ -288,7 +288,7 @@ GLOBAL_LIST_INIT(animatable_blacklist, typecacheof(list(
if(!.) //dead or deleted
return
if(idledamage && !ckey && !ai_controller?.blackboard[BB_BASIC_MOB_CURRENT_TARGET]) //Objects eventually revert to normal if no one is around to terrorize
adjustBruteLoss(0.5 * seconds_per_tick)
adjust_brute_loss(0.5 * seconds_per_tick)
for(var/mob/living/victim in contents) //a fix for animated statues from the flesh to stone spell
death()
return
@@ -103,7 +103,7 @@
///Handles the adverse effects of water on slimes
/mob/living/basic/slime/proc/apply_water()
adjustBruteLoss(rand(15,20))
adjust_brute_loss(rand(15,20))
discipline_slime()
///Stops the slime from feeding, and might remove rabidity and targets
+1 -1
View File
@@ -59,7 +59,7 @@
if(nutrition == 0) //adjust nutrition ensures it can't go below 0
if(SPT_PROB(50, seconds_per_tick))
adjustBruteLoss(rand(0,5))
adjust_brute_loss(rand(0,5))
return
if (SLIME_GROW_NUTRITION <= nutrition)
+1 -1
View File
@@ -345,7 +345,7 @@
target_slime.adjust_nutrition(-stolen_nutrition)
our_slime.adjust_nutrition(stolen_nutrition)
if(target_slime.health > 0)
our_slime.adjustBruteLoss(is_adult_slime ? -20 : -10)
our_slime.adjust_brute_loss(is_adult_slime ? -20 : -10)
///Spawns a crossed slimecore item
@@ -158,9 +158,9 @@
investigate_log("has died from a devastating explosion.", INVESTIGATE_DEATHS)
death()
if(EXPLODE_HEAVY)
adjustBruteLoss(60)
adjust_brute_loss(60)
if(EXPLODE_LIGHT)
adjustBruteLoss(30)
adjust_brute_loss(30)
return TRUE
@@ -72,7 +72,7 @@
return
if(istype(attack_target, /obj/item/food/grown/carrot))
adjustBruteLoss(-5)
adjust_brute_loss(-5)
to_chat(src, span_warning("You eat [attack_target]! It restores some health!"))
qdel(attack_target)
return TRUE
@@ -101,7 +101,7 @@
if (!(heal_biotypes & target.mob_biotypes))
return FALSE
if (!iscarbon(target))
return target.getBruteLoss() > 0 || target.getFireLoss() > 0
return target.get_brute_loss() > 0 || target.get_fire_loss() > 0
var/mob/living/carbon/carbon_target = target
for (var/obj/item/bodypart/part in carbon_target.bodyparts)
if (!part.brute_dam && !part.burn_dam)
@@ -110,7 +110,7 @@
var/level_gain = (consumed.powerlevel - powerlevel)
if(level_gain >= 0 && !ckey && !consumed.bruised)//Player shrooms can't level up to become robust gods.
consumed.level_up(level_gain)
adjustBruteLoss(-consumed.maxHealth)
adjust_brute_loss(-consumed.maxHealth)
qdel(consumed)
/mob/living/basic/mushroom/revive(full_heal_flags = NONE, excess_healing = 0, force_grab_ghost = FALSE)
@@ -144,11 +144,11 @@
if(stat == DEAD)
revive(HEAL_ALL)
else
adjustBruteLoss(-5)
adjust_brute_loss(-5)
COOLDOWN_START(src, recovery_cooldown, 5 MINUTES)
/mob/living/basic/mushroom/proc/level_up(level_gain)
adjustBruteLoss(-maxHealth) //They'll always heal, even if they don't gain a level
adjust_brute_loss(-maxHealth) //They'll always heal, even if they don't gain a level
if(powerlevel > 9)
return
if(level_gain == 0)
@@ -123,7 +123,7 @@
SIGNAL_HANDLER
if(!(attack_flags & (ATTACKER_STAMINA_ATTACK|ATTACKER_SHOVING)))
attacker.adjustBruteLoss(20)
attacker.adjust_brute_loss(20)
to_chat(attacker, span_warning("The clone casts a spell to damage you before he dies!"))
@@ -277,7 +277,7 @@
if(mob.reagents)
mob.reagents.add_reagent(/datum/reagent/toxin/plasma, 5)
else
mob.adjustToxLoss(5)
mob.adjust_tox_loss(5)
for(var/obj/structure/spacevine/vine in victim) //Fucking with botanists, the ability.
vine.add_atom_colour("#823abb", TEMPORARY_COLOUR_PRIORITY)
new /obj/effect/temp_visual/revenant(vine.loc)
@@ -303,7 +303,7 @@
if (severity != EXPLODE_DEVASTATE)
return
var/damage_coefficient = rand(devastation_damage_min_percentage, devastation_damage_max_percentage)
adjustBruteLoss(initial(maxHealth)*damage_coefficient)
adjust_brute_loss(initial(maxHealth)*damage_coefficient)
return COMPONENT_CANCEL_EX_ACT // we handled it
/// Subtype used by the midround/event
@@ -155,8 +155,8 @@
grown.faction = faction.Copy()
grown.directive = directive
grown.set_name()
grown.setBruteLoss(getBruteLoss())
grown.setFireLoss(getFireLoss())
grown.set_brute_loss(get_brute_loss())
grown.set_fire_loss(get_fire_loss())
qdel(src)
/**
+10 -10
View File
@@ -171,9 +171,9 @@
if(prob(50))
to_chat(src, span_danger("You feel [word]. It's getting a bit hard to breathe."))
losebreath += 0.5 * determined_mod * seconds_per_tick
else if(getStaminaLoss() < 25 * determined_mod)
else if(get_stamina_loss() < 25 * determined_mod)
to_chat(src, span_danger("You feel [word]. It's getting a bit hard to focus."))
adjustStaminaLoss(10 * determined_mod * REM * seconds_per_tick)
adjust_stamina_loss(10 * determined_mod * REM * seconds_per_tick)
// Pretty low blood, getting dangerous!
if(BLOOD_VOLUME_RISKY to BLOOD_VOLUME_OKAY)
if(SPT_PROB(5, seconds_per_tick))
@@ -182,9 +182,9 @@
if(prob(50))
to_chat(src, span_bolddanger("You feel very [word]. It's getting hard to breathe!"))
losebreath += 1 * determined_mod * seconds_per_tick
else if(getStaminaLoss() < 40 * determined_mod)
else if(get_stamina_loss() < 40 * determined_mod)
to_chat(src, span_bolddanger("You feel very [word]. It's getting hard to stay awake!"))
adjustStaminaLoss(15 * determined_mod * REM * seconds_per_tick)
adjust_stamina_loss(15 * determined_mod * REM * seconds_per_tick)
// Very low blood, danger!!
if(BLOOD_VOLUME_BAD to BLOOD_VOLUME_RISKY)
if(SPT_PROB(5, seconds_per_tick))
@@ -193,9 +193,9 @@
if(prob(50))
to_chat(src, span_userdanger("You feel extremely [word]! It's getting very hard to breathe!"))
losebreath += 1.5 * determined_mod * seconds_per_tick
else if(getStaminaLoss() < 80 * determined_mod)
else if(get_stamina_loss() < 80 * determined_mod)
to_chat(src, span_userdanger("You feel extremely [word]! It's getting very hard to stay awake!"))
adjustStaminaLoss(20 * determined_mod * REM * seconds_per_tick)
adjust_stamina_loss(20 * determined_mod * REM * seconds_per_tick)
// Critically low blood, death is near! Adrenaline won't help you here.
if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_BAD)
if(SPT_PROB(7.5, seconds_per_tick))
@@ -214,10 +214,10 @@
// If your ratio is less than one (you're missing any blood) and your oxyloss is under missing blood %, start getting oxy damage.
// This damage accrues faster the less blood you have.
// If the damage surpasses the KO threshold for oxyloss, then we'll always tick up so you die eventually
if(target_oxyloss > 0 && (getOxyLoss() < target_oxyloss || (target_oxyloss >= OXYLOSS_PASSOUT_THRESHOLD && stat >= UNCONSCIOUS)))
if(target_oxyloss > 0 && (get_oxy_loss() < target_oxyloss || (target_oxyloss >= OXYLOSS_PASSOUT_THRESHOLD && stat >= UNCONSCIOUS)))
// At roughly half blood this equals to 3 oxyloss per tick. At 90% blood it's close to 0.5
var/rounded_oxyloss = round(0.01 * (BLOOD_VOLUME_NORMAL - modified_blood_volume), 0.25) * seconds_per_tick
adjustOxyLoss(rounded_oxyloss, updating_health = TRUE)
adjust_oxy_loss(rounded_oxyloss, updating_health = TRUE)
/// Has each bodypart update its bleed/wound overlay icon states
/mob/living/carbon/proc/update_bodypart_bleed_overlays()
@@ -625,7 +625,7 @@
return
var/base_bleed_rate = get_bleed_rate()
var/base_brute = getBruteLoss()
var/base_brute = get_brute_loss()
var/brute_ratio = round(base_brute / (maxHealth * 4), 0.1)
var/bleeding_rate = round(base_bleed_rate / 4, 0.1)
@@ -743,7 +743,7 @@
/// Returns how much blood we're losing from being dragged a tile, from [/mob/living/proc/make_blood_trail]
/mob/living/proc/bleed_drag_amount()
var/brute_ratio = round(getBruteLoss() / maxHealth, 0.1)
var/brute_ratio = round(get_brute_loss() / maxHealth, 0.1)
return max(1, brute_ratio * 2)
/mob/living/carbon/bleed_drag_amount()
@@ -4,7 +4,7 @@
. = ..()
if(!.)
return
adjustBruteLoss(15)
adjust_brute_loss(15)
var/hitverb = "hit"
if(mob_size < MOB_SIZE_LARGE)
safe_throw_at(get_edge_target_turf(src, get_dir(user, src)), 2, 1, user)
@@ -8,7 +8,7 @@
if(stat == DEAD)
//If we mostly took damage from fire
if(getFireLoss() > 125)
if(get_fire_loss() > 125)
icon_state = "alien[caste]_husked"
else
icon_state = "alien[caste]_dead"
@@ -31,7 +31,7 @@ In all, this is a lot like the monkey code. /N
visible_message(span_danger("[user.name] bites [src]!"), \
span_userdanger("[user.name] bites you!"), span_hear("You hear a chomp!"), COMBAT_MESSAGE_RANGE, user)
to_chat(user, span_danger("You bite [src]!"))
adjustBruteLoss(1)
adjust_brute_loss(1)
log_combat(user, src, "attacked")
else
to_chat(user, span_warning("[name] is too injured for that."))
@@ -1,15 +1,15 @@
///alien immune to tox damage
/mob/living/carbon/alien/getToxLoss()
/mob/living/carbon/alien/get_tox_loss()
return FALSE
///alien immune to tox damage
/mob/living/carbon/alien/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
/mob/living/carbon/alien/adjust_tox_loss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
return FALSE
///aliens are immune to stamina damage.
/mob/living/carbon/alien/adjustStaminaLoss(amount, updating_stamina = 1, forced = FALSE, required_biotype)
/mob/living/carbon/alien/adjust_stamina_loss(amount, updating_stamina = 1, forced = FALSE, required_biotype)
return FALSE
///aliens are immune to stamina damage.
/mob/living/carbon/alien/setStaminaLoss(amount, updating_stamina = 1, forced = FALSE, required_biotype)
/mob/living/carbon/alien/set_stamina_loss(amount, updating_stamina = 1, forced = FALSE, required_biotype)
return FALSE
+1 -1
View File
@@ -13,7 +13,7 @@
return 0
if(health <= HEALTH_THRESHOLD_CRIT)
adjustOxyLoss(2)
adjust_oxy_loss(2)
var/plasma_used = 0
var/plas_detect_threshold = 0.02
@@ -62,9 +62,9 @@
if(!isalien(owner))
heal_amt *= 0.2
owner.adjustPlasma(0.5 * plasma_rate * delta_time_capped)
owner.adjustBruteLoss(-heal_amt * delta_time_capped)
owner.adjustFireLoss(-heal_amt * delta_time_capped)
owner.adjustOxyLoss(-heal_amt * delta_time_capped)
owner.adjust_brute_loss(-heal_amt * delta_time_capped)
owner.adjust_fire_loss(-heal_amt * delta_time_capped)
owner.adjust_oxy_loss(-heal_amt * delta_time_capped)
else
owner.adjustPlasma(0.1 * plasma_rate * delta_time)
@@ -52,10 +52,10 @@
if(SPT_PROB(2, seconds_per_tick))
to_chat(owner, span_danger("Your stomach hurts."))
if(prob(20))
owner.adjustToxLoss(1)
owner.adjust_tox_loss(1)
if(6)
to_chat(owner, span_danger("You feel something tearing its way out of your chest..."))
owner.adjustToxLoss(5 * seconds_per_tick) // Why is this [TOX]?
owner.adjust_tox_loss(5 * seconds_per_tick) // Why is this [TOX]?
/// Controls Xenomorph Embryo growth. If embryo is fully grown (or overgrown), stop the proc. If not, increase the stage by one and if it's not fully grown (stage 6), add a timer to do this proc again after however long the growth time variable is.
/obj/item/organ/body_egg/alien_embryo/proc/advance_embryo_stage()
@@ -143,7 +143,7 @@
else
new_xeno.visible_message(span_danger("[new_xeno] wriggles out of [owner]!"), span_userdanger("You exit [owner], your previous host."))
owner.log_message("had an alien larva within them escape (without being gibbed).", LOG_ATTACK, log_globally = FALSE)
owner.adjustBruteLoss(40)
owner.adjust_brute_loss(40)
owner.cut_overlay(overlay)
qdel(src)
+6 -6
View File
@@ -334,14 +334,14 @@
var/turf/location = get_turf(src)
if(!blood)
adjust_nutrition(-lost_nutrition)
need_mob_update += adjustToxLoss(-3, updating_health = FALSE)
need_mob_update += adjust_tox_loss(-3, updating_health = FALSE)
for(var/i = 0 to distance)
if(blood)
if(location)
add_splatter_floor(location)
if(vomit_flags & MOB_VOMIT_HARM)
need_mob_update += adjustBruteLoss(3, updating_health = FALSE)
need_mob_update += adjust_brute_loss(3, updating_health = FALSE)
else
if(location)
location.add_vomit_floor(src, vomit_type, vomit_flags, purge_ratio) // call purge when doing detoxicfication to pump more chems out of the stomach.
@@ -413,7 +413,7 @@
var/obj/item/bodypart/BP = X
total_brute += (BP.brute_dam * BP.body_damage_coeff)
total_burn += (BP.burn_dam * BP.body_damage_coeff)
set_health(round(maxHealth - getOxyLoss() - getToxLoss() - total_burn - total_brute, DAMAGE_PRECISION))
set_health(round(maxHealth - get_oxy_loss() - get_tox_loss() - total_burn - total_brute, DAMAGE_PRECISION))
update_stat()
update_stamina()
@@ -595,7 +595,7 @@
clear_fullscreen("oxy")
//Fire and Brute damage overlay (BSSR)
var/hurtdamage = getBruteLoss() + getFireLoss() + damageoverlaytemp
var/hurtdamage = get_brute_loss() + get_fire_loss() + damageoverlaytemp
if(hurtdamage && !HAS_TRAIT(src, TRAIT_NO_DAMAGE_OVERLAY))
var/severity = 0
switch(hurtdamage)
@@ -661,7 +661,7 @@
else
if(shown_stamina_loss == null)
shown_stamina_loss = getStaminaLoss()
shown_stamina_loss = get_stamina_loss()
if(shown_stamina_loss >= stam_crit_threshold)
hud_used.stamina.icon_state = "stamina_crit"
@@ -822,7 +822,7 @@
if (HAS_TRAIT(src, TRAIT_DEFIB_BLACKLISTED))
return DEFIB_FAIL_BLACKLISTED
if ((getBruteLoss() >= MAX_REVIVE_BRUTE_DAMAGE) || (getFireLoss() >= MAX_REVIVE_FIRE_DAMAGE))
if ((get_brute_loss() >= MAX_REVIVE_BRUTE_DAMAGE) || (get_fire_loss() >= MAX_REVIVE_FIRE_DAMAGE))
return DEFIB_FAIL_TISSUE_DAMAGE
var/heart_status = can_defib_heart(get_organ_by_type(/obj/item/organ/heart))
@@ -253,7 +253,7 @@
return
else
show_message(span_userdanger("The blob attacks!"))
adjustBruteLoss(10)
adjust_brute_loss(10)
///Adds to the parent by also adding functionality to propagate shocks through pulling and doing some fluff effects.
/mob/living/carbon/electrocute_act(shock_damage, source, siemens_coeff = 1, flags = NONE, jitter_time = 20 SECONDS, stutter_time = 4 SECONDS, stun_duration = 4 SECONDS)
@@ -537,7 +537,7 @@
. = FALSE
/mob/living/carbon/adjustOxyLoss(amount, updating_health = TRUE, forced, required_biotype, required_respiration_type)
/mob/living/carbon/adjust_oxy_loss(amount, updating_health = TRUE, forced, required_biotype, required_respiration_type)
if(!forced && HAS_TRAIT(src, TRAIT_NOBREATH))
amount = min(amount, 0) //Prevents oxy damage but not healing
@@ -549,7 +549,7 @@
if(!limb)
return
/mob/living/carbon/setOxyLoss(amount, updating_health = TRUE, forced, required_biotype, required_respiration_type)
/mob/living/carbon/set_oxy_loss(amount, updating_health = TRUE, forced, required_biotype, required_respiration_type)
. = ..()
check_passout()
@@ -557,7 +557,7 @@
* Check to see if we should be passed out from oxyloss
*/
/mob/living/carbon/proc/check_passout()
var/mob_oxyloss = getOxyLoss()
var/mob_oxyloss = get_oxy_loss()
if(mob_oxyloss >= OXYLOSS_PASSOUT_THRESHOLD)
if(!HAS_TRAIT_FROM(src, TRAIT_KNOCKEDOUT, OXYLOSS_TRAIT))
ADD_TRAIT(src, TRAIT_KNOCKEDOUT, OXYLOSS_TRAIT)
+17 -17
View File
@@ -82,13 +82,13 @@
return final_mod
//These procs fetch a cumulative total damage from all bodyparts
/mob/living/carbon/getBruteLoss()
/mob/living/carbon/get_brute_loss()
var/amount = 0
for(var/obj/item/bodypart/bodypart as anything in bodyparts)
amount += bodypart.brute_dam
return round(amount, DAMAGE_PRECISION)
/mob/living/carbon/getFireLoss()
/mob/living/carbon/get_fire_loss()
var/amount = 0
for(var/obj/item/bodypart/bodypart as anything in bodyparts)
amount += bodypart.burn_dam
@@ -102,7 +102,7 @@
* Arguments:
* * required_bodytype - The bodytype(s) to match against.
*/
/mob/living/carbon/proc/getBruteLossForType(required_bodytype = ALL)
/mob/living/carbon/proc/get_brute_loss_for_type(required_bodytype = ALL)
var/amount = 0
for(var/obj/item/bodypart/bodypart as anything in bodyparts)
if(!(bodypart.bodytype & required_bodytype))
@@ -117,7 +117,7 @@
* Arguments:
* * required_bodytype - The bodytype(s) to match against.
*/
/mob/living/carbon/proc/getFireLossForType(required_bodytype = ALL)
/mob/living/carbon/proc/get_fire_loss_for_type(required_bodytype = ALL)
var/amount = 0
for(var/obj/item/bodypart/bodypart as anything in bodyparts)
if(!(bodypart.bodytype & required_bodytype))
@@ -125,7 +125,7 @@
amount += bodypart.burn_dam
return round(amount, DAMAGE_PRECISION)
/mob/living/carbon/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
/mob/living/carbon/adjust_brute_loss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
if(!can_adjust_brute_loss(amount, forced, required_bodytype))
return 0
if(amount > 0)
@@ -133,16 +133,16 @@
else
. = heal_overall_damage(brute = abs(amount), required_bodytype = required_bodytype, updating_health = updating_health, forced = forced)
/mob/living/carbon/setBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
/mob/living/carbon/set_brute_loss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
if(!forced && HAS_TRAIT(src, TRAIT_GODMODE))
return FALSE
var/current = getBruteLoss()
var/current = get_brute_loss()
var/diff = amount - current
if(!diff)
return FALSE
return adjustBruteLoss(diff, updating_health, forced, required_bodytype)
return adjust_brute_loss(diff, updating_health, forced, required_bodytype)
/mob/living/carbon/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
/mob/living/carbon/adjust_fire_loss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
if(!can_adjust_fire_loss(amount, forced, required_bodytype))
return 0
if(amount > 0)
@@ -150,16 +150,16 @@
else
. = heal_overall_damage(burn = abs(amount), required_bodytype = required_bodytype, updating_health = updating_health, forced = forced)
/mob/living/carbon/setFireLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
/mob/living/carbon/set_fire_loss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
if(!forced && HAS_TRAIT(src, TRAIT_GODMODE))
return FALSE
var/current = getFireLoss()
var/current = get_fire_loss()
var/diff = amount - current
if(!diff)
return FALSE
return adjustFireLoss(diff, updating_health, forced, required_bodytype)
return adjust_fire_loss(diff, updating_health, forced, required_bodytype)
/mob/living/carbon/human/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype = ALL)
/mob/living/carbon/human/adjust_tox_loss(amount, updating_health = TRUE, forced = FALSE, required_biotype = ALL)
. = ..()
if(. >= 0) // 0 = no damage, + values = healed damage
return .
@@ -167,7 +167,7 @@
if(AT_TOXIN_VOMIT_THRESHOLD(src))
apply_status_effect(/datum/status_effect/tox_vomit)
/mob/living/carbon/human/setToxLoss(amount, updating_health, forced, required_biotype)
/mob/living/carbon/human/set_tox_loss(amount, updating_health, forced, required_biotype)
. = ..()
if(. >= 0)
return .
@@ -191,7 +191,7 @@
*
* Returns: The net change in damage from apply_organ_damage()
*/
/mob/living/carbon/adjustOrganLoss(slot, amount, maximum, required_organ_flag = NONE)
/mob/living/carbon/adjust_organ_loss(slot, amount, maximum, required_organ_flag = NONE)
var/obj/item/organ/affected_organ = get_organ_slot(slot)
if(!affected_organ || HAS_TRAIT(src, TRAIT_GODMODE))
return FALSE
@@ -201,7 +201,7 @@
/**
* If an organ exists in the slot requested, and we are capable of taking damage (we don't have TRAIT_GODMODE), call the set damage proc on that organ, which can
* set or clear the failing variable on that organ, making it either cease or start functions again, unlike adjustOrganLoss.
* set or clear the failing variable on that organ, making it either cease or start functions again, unlike adjust_organ_loss.
*
* Arguments:
* * slot - organ slot, like [ORGAN_SLOT_HEART]
@@ -210,7 +210,7 @@
*
* Returns: The net change in damage from set_organ_damage()
*/
/mob/living/carbon/setOrganLoss(slot, amount, required_organ_flag = NONE)
/mob/living/carbon/set_organ_loss(slot, amount, required_organ_flag = NONE)
var/obj/item/organ/affected_organ = get_organ_slot(slot)
if(!affected_organ || HAS_TRAIT(src, TRAIT_GODMODE))
return FALSE
+2 -2
View File
@@ -106,7 +106,7 @@
if(user == src && has_status_effect(/datum/status_effect/grouped/screwy_hud/fake_crit))//fake damage
temp = 50
else
temp = getBruteLoss()
temp = get_brute_loss()
var/list/damage_desc = get_majority_bodypart_damage_desc()
if(temp)
if(temp < 25)
@@ -116,7 +116,7 @@
else
. += span_bolddanger("[t_He] [t_has] severe [damage_desc[BRUTE]]!")
temp = getFireLoss()
temp = get_fire_loss()
if(temp)
if(temp < 25)
. += span_danger("[t_He] [t_has] minor [damage_desc[BURN]].")
@@ -135,7 +135,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
var/list/inherent_traits = list()
/// List of biotypes the mob belongs to. Used by diseases.
var/inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID
/// The type of respiration the mob is capable of doing. Used by adjustOxyLoss.
/// The type of respiration the mob is capable of doing. Used by adjust_oxy_loss.
var/inherent_respiration_type = RESPIRATION_OXYGEN
///List of factions the mob gain upon gaining this species.
var/list/inherent_factions
@@ -541,7 +541,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
/datum/species/proc/spec_life(mob/living/carbon/human/H, seconds_per_tick, times_fired)
SHOULD_CALL_PARENT(TRUE)
if(HAS_TRAIT(H, TRAIT_NOBREATH) && (H.health < H.crit_threshold) && !HAS_TRAIT(H, TRAIT_NOCRITDAMAGE))
H.adjustBruteLoss(0.5 * seconds_per_tick)
H.adjust_brute_loss(0.5 * seconds_per_tick)
/datum/species/proc/can_equip(obj/item/I, slot, disable_warning, mob/living/carbon/human/H, bypass_equip_delay_self = FALSE, ignore_equipped = FALSE, indirect_action = FALSE)
if(no_equip_flags & slot)
@@ -828,10 +828,10 @@ GLOBAL_LIST_EMPTY(features_by_species)
limb_accuracy = floor(limb_accuracy * pummel_bonus)
//Get our puncher's combined brute and burn damage.
var/puncher_brute_and_burn = (user.getFireLoss() + user.getBruteLoss())
var/puncher_brute_and_burn = (user.get_fire_loss() + user.get_brute_loss())
//Get our targets combined brute and burn damage.
var/target_brute_and_burn = (target.getFireLoss() + target.getBruteLoss())
var/target_brute_and_burn = (target.get_fire_loss() + target.get_brute_loss())
// In a brawl, drunkenness can make you swing more wildly and with more force, and thus catch your opponent off guard, but it could also totally throw you off if you're too intoxicated
// But god is it going to make you sick moving too much while drunk
@@ -1233,7 +1233,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
humi.apply_damage(burn_damage, BURN, spread_damage = TRUE, wound_clothing = FALSE)
// For cold damage, we cap at the threshold if you're dead
if(humi.getFireLoss() >= abs(HEALTH_THRESHOLD_DEAD) && humi.stat == DEAD)
if(humi.get_fire_loss() >= abs(HEALTH_THRESHOLD_DEAD) && humi.stat == DEAD)
return
// Apply some burn / brute damage to the body (Dependent if the person is hulk or not)
@@ -1314,7 +1314,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
H.clear_alert(ALERT_PRESSURE)
else
var/pressure_damage = min(((adjusted_pressure / HAZARD_HIGH_PRESSURE) - 1) * PRESSURE_DAMAGE_COEFFICIENT, MAX_HIGH_PRESSURE_DAMAGE) * H.physiology.pressure_mod * H.physiology.brute_mod * seconds_per_tick
H.adjustBruteLoss(pressure_damage, required_bodytype = BODYTYPE_ORGANIC)
H.adjust_brute_loss(pressure_damage, required_bodytype = BODYTYPE_ORGANIC)
H.throw_alert(ALERT_PRESSURE, /atom/movable/screen/alert/highpressure, 2)
// High pressure, show an alert
@@ -1340,7 +1340,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
H.clear_alert(ALERT_PRESSURE)
else
var/pressure_damage = LOW_PRESSURE_DAMAGE * H.physiology.pressure_mod * H.physiology.brute_mod * seconds_per_tick
H.adjustBruteLoss(pressure_damage, required_bodytype = BODYTYPE_ORGANIC)
H.adjust_brute_loss(pressure_damage, required_bodytype = BODYTYPE_ORGANIC)
H.throw_alert(ALERT_PRESSURE, /atom/movable/screen/alert/lowpressure, 2)
/**
@@ -29,10 +29,10 @@ GLOBAL_LIST_EMPTY(dead_players_during_shift)
if(SSticker.HasRoundStarted())
SSblackbox.ReportDeath(src)
log_message("has died (BRUTE: [src.getBruteLoss()], BURN: [src.getFireLoss()], TOX: [src.getToxLoss()], OXY: [src.getOxyLoss()]", LOG_ATTACK)
log_message("has died (BRUTE: [src.get_brute_loss()], BURN: [src.get_fire_loss()], TOX: [src.get_tox_loss()], OXY: [src.get_oxy_loss()]", LOG_ATTACK)
if(key) // Prevents log spamming of keyless mob deaths (like xenobio monkeys)
investigate_log("has died at [loc_name(src)].<br>\
BRUTE: [src.getBruteLoss()] BURN: [src.getFireLoss()] TOX: [src.getToxLoss()] OXY: [src.getOxyLoss()] STAM: [src.getStaminaLoss()]<br>\
BRUTE: [src.get_brute_loss()] BURN: [src.get_fire_loss()] TOX: [src.get_tox_loss()] OXY: [src.get_oxy_loss()] STAM: [src.get_stamina_loss()]<br>\
<b>Brain damage</b>: [src.get_organ_loss(ORGAN_SLOT_BRAIN) || "0"]<br>\
<b>[get_bloodtype()?.get_blood_name() || "Blood"] volume</b>: [src.get_blood_volume(apply_modifiers = TRUE)]cl ([round((src.get_blood_volume(apply_modifiers = TRUE) / BLOOD_VOLUME_NORMAL) * 100, 0.1)]%)<br>\
<b>Reagents</b>:<br>[reagents_readout()]", INVESTIGATE_DEATHS)
@@ -183,12 +183,12 @@
if(!HAS_TRAIT(human_user, TRAIT_MEDICAL_HUD))
return
if(href_list["evaluation"])
if(!getBruteLoss() && !getFireLoss() && !getOxyLoss() && getToxLoss() < 20)
if(!get_brute_loss() && !get_fire_loss() && !get_oxy_loss() && get_tox_loss() < 20)
to_chat(human_user, "[span_notice("No external injuries detected.")]<br>")
return
var/span = "notice"
var/status = ""
if(getBruteLoss())
if(get_brute_loss())
to_chat(human_user, "<b>Physical trauma analysis:</b>")
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
@@ -204,7 +204,7 @@
span = "userdanger"
if(brutedamage)
to_chat(human_user, "<span class='[span]'>[BP] appears to have [status]</span>")
if(getFireLoss())
if(get_fire_loss())
to_chat(human_user, "<b>Analysis of skin burns:</b>")
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
@@ -220,9 +220,9 @@
span = "userdanger"
if(burndamage)
to_chat(human_user, "<span class='[span]'>[BP] appears to have [status]</span>")
if(getOxyLoss())
if(get_oxy_loss())
to_chat(human_user, span_danger("Patient has signs of suffocation, emergency treatment may be required!"))
if(getToxLoss() > 20)
if(get_tox_loss() > 20)
to_chat(human_user, span_danger("Gathered data is inconsistent with the analysis, possible cause: poisoning."))
if(!human_user.wear_id) //You require access from here on out.
to_chat(human_user, span_warning("ERROR: Invalid access"))
@@ -560,7 +560,7 @@
else if (!target.get_organ_slot(ORGAN_SLOT_LUNGS))
to_chat(target, span_unconscious("You feel a breath of fresh air... but you don't feel any better..."))
else
target.adjustOxyLoss(-min(target.getOxyLoss(), 7))
target.adjust_oxy_loss(-min(target.get_oxy_loss(), 7))
to_chat(target, span_unconscious("You feel a breath of fresh air enter your lungs... It feels good..."))
if (target.health <= target.crit_threshold)
@@ -205,7 +205,7 @@
else if(!HAS_TRAIT(src, TRAIT_INCAPACITATED))
playsound(loc, 'sound/items/weapons/pierce.ogg', 25, TRUE, -1)
var/shovetarget = get_edge_target_turf(user, get_dir(user, get_step_away(src, user)))
adjustStaminaLoss(35)
adjust_stamina_loss(35)
throw_at(shovetarget, 4, 2, user, force = MOVE_FORCE_OVERPOWERING)
log_combat(user, src, "shoved")
visible_message(span_danger("[user] tackles [src] down!"), \
@@ -571,7 +571,7 @@
for(var/t in missing)
combined_msg += span_boldannounce("&rdsh; Your [parse_zone(t)] is missing!")
var/tox = getToxLoss() + (disgust / 5) + (HAS_TRAIT(src, TRAIT_SELF_AWARE) ? 0 : (rand(-3, 0) * 5))
var/tox = get_tox_loss() + (disgust / 5) + (HAS_TRAIT(src, TRAIT_SELF_AWARE) ? 0 : (rand(-3, 0) * 5))
switch(tox)
if(10 to 20)
combined_msg += span_danger("You feel sick.")
@@ -581,7 +581,7 @@
combined_msg += span_danger("You feel very unwell!")
var/cached_blood_volume = get_blood_volume(apply_modifiers = TRUE)
var/oxy = getOxyLoss() + (losebreath * 4) + (cached_blood_volume < BLOOD_VOLUME_NORMAL ? ((BLOOD_VOLUME_NORMAL - cached_blood_volume) * 0.1) : 0) + (HAS_TRAIT(src, TRAIT_SELF_AWARE) ? 0 : (rand(-3, 0) * 5))
var/oxy = get_oxy_loss() + (losebreath * 4) + (cached_blood_volume < BLOOD_VOLUME_NORMAL ? ((BLOOD_VOLUME_NORMAL - cached_blood_volume) * 0.1) : 0) + (HAS_TRAIT(src, TRAIT_SELF_AWARE) ? 0 : (rand(-3, 0) * 5))
switch(oxy)
if(10 to 20)
combined_msg += span_danger("You feel lightheaded.")
@@ -590,8 +590,8 @@
if(40 to INFINITY)
combined_msg += span_danger("You feel like you're about to pass out!")
if(getStaminaLoss())
if(getStaminaLoss() > 30)
if(get_stamina_loss())
if(get_stamina_loss() > 30)
combined_msg += span_info("You're completely exhausted.")
else
combined_msg += span_info("You feel fatigued.")
@@ -36,7 +36,7 @@
return ..()
if(damage_type & SHAME)
adjustStaminaLoss(200)
adjust_stamina_loss(200)
set_suicide(FALSE)
add_mood_event("shameful_suicide", /datum/mood_event/shameful_suicide)
return FALSE
+4 -4
View File
@@ -82,9 +82,9 @@
return human_lungs.check_breath(breath, src)
if(health >= crit_threshold)
adjustOxyLoss(HUMAN_MAX_OXYLOSS + 1)
adjust_oxy_loss(HUMAN_MAX_OXYLOSS + 1)
else if(!HAS_TRAIT(src, TRAIT_NOCRITDAMAGE))
adjustOxyLoss(HUMAN_CRIT_MAX_OXYLOSS)
adjust_oxy_loss(HUMAN_CRIT_MAX_OXYLOSS)
failed_last_breath = TRUE
@@ -294,10 +294,10 @@
return
if(we_breath)
adjustOxyLoss(4 * seconds_per_tick)
adjust_oxy_loss(4 * seconds_per_tick)
Unconscious(80)
// Tissues die without blood circulation
adjustBruteLoss(1 * seconds_per_tick)
adjust_brute_loss(1 * seconds_per_tick)
#undef THERMAL_PROTECTION_HEAD
#undef THERMAL_PROTECTION_CHEST
@@ -69,7 +69,7 @@
// Blood regen thresholds use your real amount of blood.
if(slime.get_blood_volume() <= 0)
slime.adjust_blood_volume(JELLY_REGEN_RATE_EMPTY * slime.physiology.blood_regen_mod * seconds_per_tick)
slime.adjustBruteLoss(2.5 * seconds_per_tick)
slime.adjust_brute_loss(2.5 * seconds_per_tick)
to_chat(slime, span_danger("You feel empty!"))
// Same logic applies here.
@@ -52,8 +52,8 @@
if(istype(vampire.loc, /obj/structure/closet/crate/coffin))
var/need_mob_update = FALSE
need_mob_update += vampire.heal_overall_damage(brute = 2 * seconds_per_tick, burn = 2 * seconds_per_tick, updating_health = FALSE, required_bodytype = BODYTYPE_ORGANIC)
need_mob_update += vampire.adjustToxLoss(-2 * seconds_per_tick, updating_health = FALSE,)
need_mob_update += vampire.adjustOxyLoss(-2 * seconds_per_tick, updating_health = FALSE,)
need_mob_update += vampire.adjust_tox_loss(-2 * seconds_per_tick, updating_health = FALSE,)
need_mob_update += vampire.adjust_oxy_loss(-2 * seconds_per_tick, updating_health = FALSE,)
if(need_mob_update)
vampire.updatehealth()
return
@@ -65,7 +65,7 @@
var/area/A = get_area(vampire)
if(istype(A, /area/station/service/chapel))
to_chat(vampire, span_warning("You don't belong here!"))
vampire.adjustFireLoss(10 * seconds_per_tick)
vampire.adjust_fire_loss(10 * seconds_per_tick)
vampire.adjust_fire_stacks(3 * seconds_per_tick)
vampire.ignite_mob()
@@ -1,6 +1,6 @@
/mob/living/carbon/human/proc/delayed_suicide()
suicide_log()
adjustBruteLoss(max(200 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
adjust_brute_loss(max(200 - get_tox_loss() - get_fire_loss() - get_brute_loss() - get_oxy_loss(), 0))
investigate_log("has died from committing suicide.", INVESTIGATE_DEATHS)
death(FALSE)
ghostize(FALSE) // Disallows reentering body and disassociates mind
@@ -64,7 +64,7 @@
/mob/living/carbon/proc/on_nobreath_trait_gain(datum/source)
SIGNAL_HANDLER
setOxyLoss(0, updating_health = TRUE, forced = TRUE)
set_oxy_loss(0, updating_health = TRUE, forced = TRUE)
losebreath = 0
failed_last_breath = FALSE
@@ -119,7 +119,7 @@
/mob/living/carbon/proc/on_toximmune_trait_gain(datum/source)
SIGNAL_HANDLER
setToxLoss(0, updating_health = TRUE, forced = TRUE)
set_tox_loss(0, updating_health = TRUE, forced = TRUE)
/**
* On gain of TRAIT_GENELLESS
+14 -14
View File
@@ -181,7 +181,7 @@
// Simulates breathing zero moles of gas.
has_moles = FALSE
// Extra damage, let God sort em out!
adjustOxyLoss(2)
adjust_oxy_loss(2)
/// Minimum O2 before suffocation.
var/safe_oxygen_min = 16
@@ -232,7 +232,7 @@
failed_last_breath = FALSE
// Vacuum-adapted lungs regenerate oxyloss even when breathing nothing.
if(health >= crit_threshold)
adjustOxyLoss(-5)
adjust_oxy_loss(-5)
else
// Can't breathe! Lungs are missing, and/or breath is empty.
. = FALSE
@@ -266,7 +266,7 @@
oxygen_used = breath_gases[/datum/gas/oxygen][MOLES]
// Heal mob if not in crit.
if(health >= crit_threshold)
adjustOxyLoss(-5)
adjust_oxy_loss(-5)
// Exhale equivalent amount of CO2.
if(o2_pp)
breath_gases[/datum/gas/oxygen][MOLES] -= oxygen_used
@@ -287,10 +287,10 @@
throw_alert(ALERT_TOO_MUCH_CO2, /atom/movable/screen/alert/too_much_co2)
Unconscious(6 SECONDS)
// Lets hurt em a little, let them know we mean business.
adjustOxyLoss(3)
adjust_oxy_loss(3)
// They've been in here 30s now, start to kill them for their own good!
if((world.time - co2overloadtime) > 30 SECONDS)
adjustOxyLoss(8)
adjust_oxy_loss(8)
else
// Reset side-effects.
co2overloadtime = 0
@@ -301,7 +301,7 @@
if(plasma_pp > safe_plas_max)
// Plasma side-effects.
var/ratio = (breath_gases[/datum/gas/plasma][MOLES] / safe_plas_max) * 10
adjustToxLoss(clamp(ratio, MIN_TOXIC_GAS_DAMAGE, MAX_TOXIC_GAS_DAMAGE))
adjust_tox_loss(clamp(ratio, MIN_TOXIC_GAS_DAMAGE, MAX_TOXIC_GAS_DAMAGE))
if(!HAS_TRAIT(src, TRAIT_ANOSMIA))
throw_alert(ALERT_TOO_MUCH_PLASMA, /atom/movable/screen/alert/too_much_plas)
else
@@ -321,7 +321,7 @@
//-- FREON --//
if(freon_pp)
adjustFireLoss(freon_pp * 0.25)
adjust_fire_loss(freon_pp * 0.25)
//-- MIASMA --//
if(!miasma_pp)
@@ -385,9 +385,9 @@
if(nitrium_pp)
var/need_mob_update = FALSE
if(nitrium_pp > 0.5)
need_mob_update += adjustFireLoss(nitrium_pp * 0.15, updating_health = FALSE)
need_mob_update += adjust_fire_loss(nitrium_pp * 0.15, updating_health = FALSE)
if(nitrium_pp > 5)
need_mob_update += adjustToxLoss(nitrium_pp * 0.05, updating_health = FALSE)
need_mob_update += adjust_tox_loss(nitrium_pp * 0.05, updating_health = FALSE)
if(need_mob_update)
updatehealth()
@@ -426,13 +426,13 @@
// Low pressure.
if(breath_pp)
var/ratio = safe_breath_min / breath_pp
adjustOxyLoss(min(5 * ratio, 3))
adjust_oxy_loss(min(5 * ratio, 3))
return true_pp * ratio / 6
// Zero pressure.
if(health >= crit_threshold)
adjustOxyLoss(3)
adjust_oxy_loss(3)
else
adjustOxyLoss(1)
adjust_oxy_loss(1)
/// Fourth and final link in a breath chain
/mob/living/carbon/proc/handle_breath_temperature(datum/gas_mixture/breath)
@@ -770,8 +770,8 @@
if(HAS_TRAIT(src, TRAIT_STABLELIVER) || HAS_TRAIT(src, TRAIT_LIVERLESS_METABOLISM))
return
adjustToxLoss(0.6 * seconds_per_tick, forced = TRUE)
adjustOrganLoss(pick(ORGAN_SLOT_HEART, ORGAN_SLOT_LUNGS, ORGAN_SLOT_STOMACH, ORGAN_SLOT_EYES, ORGAN_SLOT_EARS), 0.5* seconds_per_tick)
adjust_tox_loss(0.6 * seconds_per_tick, forced = TRUE)
adjust_organ_loss(pick(ORGAN_SLOT_HEART, ORGAN_SLOT_LUNGS, ORGAN_SLOT_STOMACH, ORGAN_SLOT_EYES, ORGAN_SLOT_EARS), 0.5* seconds_per_tick)
/mob/living/carbon/proc/undergoing_liver_failure()
var/obj/item/organ/liver/liver = get_organ_slot(ORGAN_SLOT_LIVER)
+44 -44
View File
@@ -64,7 +64,7 @@
update_damage_overlays()
damage_dealt = actual_hit.get_damage() - delta // Unfortunately bodypart receive_damage doesn't return damage dealt so we do it manually
else
damage_dealt = -1 * adjustBruteLoss(damage_amount, forced = forced)
damage_dealt = -1 * adjust_brute_loss(damage_amount, forced = forced)
if(BURN)
if(isbodypart(def_zone))
var/obj/item/bodypart/actual_hit = def_zone
@@ -83,15 +83,15 @@
update_damage_overlays()
damage_dealt = actual_hit.get_damage() - delta // See above
else
damage_dealt = -1 * adjustFireLoss(damage_amount, forced = forced)
damage_dealt = -1 * adjust_fire_loss(damage_amount, forced = forced)
if(TOX)
damage_dealt = -1 * adjustToxLoss(damage_amount, forced = forced)
damage_dealt = -1 * adjust_tox_loss(damage_amount, forced = forced)
if(OXY)
damage_dealt = -1 * adjustOxyLoss(damage_amount, forced = forced)
damage_dealt = -1 * adjust_oxy_loss(damage_amount, forced = forced)
if(STAMINA)
damage_dealt = -1 * adjustStaminaLoss(damage_amount, forced = forced)
damage_dealt = -1 * adjust_stamina_loss(damage_amount, forced = forced)
if(BRAIN)
damage_dealt = -1 * adjustOrganLoss(ORGAN_SLOT_BRAIN, damage_amount)
damage_dealt = -1 * adjust_organ_loss(ORGAN_SLOT_BRAIN, damage_amount)
SEND_SIGNAL(src, COMSIG_MOB_AFTER_APPLY_DAMAGE, damage_dealt, damagetype, def_zone, blocked, wound_bonus, exposed_wound_bonus, sharpness, attack_direction, attacking_item, wound_clothing)
return damage_dealt
@@ -127,15 +127,15 @@
switch(damagetype)
if(BRUTE)
return adjustBruteLoss(heal_amount)
return adjust_brute_loss(heal_amount)
if(BURN)
return adjustFireLoss(heal_amount)
return adjust_fire_loss(heal_amount)
if(TOX)
return adjustToxLoss(heal_amount)
return adjust_tox_loss(heal_amount)
if(OXY)
return adjustOxyLoss(heal_amount)
return adjust_oxy_loss(heal_amount)
if(STAMINA)
return adjustStaminaLoss(heal_amount)
return adjust_stamina_loss(heal_amount)
/// return the damage amount for the type given
/**
@@ -145,19 +145,19 @@
/mob/living/proc/get_current_damage_of_type(damagetype = BRUTE)
switch(damagetype)
if(BRUTE)
return getBruteLoss()
return get_brute_loss()
if(BURN)
return getFireLoss()
return get_fire_loss()
if(TOX)
return getToxLoss()
return get_tox_loss()
if(OXY)
return getOxyLoss()
return get_oxy_loss()
if(STAMINA)
return getStaminaLoss()
return get_stamina_loss()
/// return the total damage of all types which update your health
/mob/living/proc/get_total_damage(precision = DAMAGE_PRECISION)
return round(getBruteLoss() + getFireLoss() + getToxLoss() + getOxyLoss(), precision)
return round(get_brute_loss() + get_fire_loss() + get_tox_loss() + get_oxy_loss(), precision)
/// Applies multiple damages at once via [apply_damage][/mob/living/proc/apply_damage]
/mob/living/proc/apply_damages(
@@ -266,7 +266,7 @@
return HAS_TRAIT(src, TRAIT_TOXIMMUNE) ? 0 : 1
return 1
/mob/living/proc/getBruteLoss()
/mob/living/proc/get_brute_loss()
return bruteloss
/mob/living/proc/can_adjust_brute_loss(amount, forced, required_bodytype)
@@ -276,7 +276,7 @@
return FALSE
return TRUE
/mob/living/proc/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype = ALL)
/mob/living/proc/adjust_brute_loss(amount, updating_health = TRUE, forced = FALSE, required_bodytype = ALL)
if (!can_adjust_brute_loss(amount, forced, required_bodytype))
return 0
. = bruteloss
@@ -288,7 +288,7 @@
updatehealth()
/mob/living/proc/setBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype = ALL)
/mob/living/proc/set_brute_loss(amount, updating_health = TRUE, forced = FALSE, required_bodytype = ALL)
if(!forced && HAS_TRAIT(src, TRAIT_GODMODE))
return FALSE
. = bruteloss
@@ -300,7 +300,7 @@
updatehealth()
. -= bruteloss
/mob/living/proc/getOxyLoss()
/mob/living/proc/get_oxy_loss()
return oxyloss
/mob/living/proc/can_adjust_oxy_loss(amount, forced, required_biotype, required_respiration_type)
@@ -319,7 +319,7 @@
return FALSE
return TRUE
/mob/living/proc/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype = ALL, required_respiration_type = ALL)
/mob/living/proc/adjust_oxy_loss(amount, updating_health = TRUE, forced = FALSE, required_biotype = ALL, required_respiration_type = ALL)
if(!can_adjust_oxy_loss(amount, forced, required_biotype, required_respiration_type))
return 0
. = oxyloss
@@ -330,7 +330,7 @@
if(updating_health)
updatehealth()
/mob/living/proc/setOxyLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype = ALL, required_respiration_type = ALL)
/mob/living/proc/set_oxy_loss(amount, updating_health = TRUE, forced = FALSE, required_biotype = ALL, required_respiration_type = ALL)
if(!forced)
if(HAS_TRAIT(src, TRAIT_GODMODE))
return FALSE
@@ -350,7 +350,7 @@
if(updating_health)
updatehealth()
/mob/living/proc/getToxLoss()
/mob/living/proc/get_tox_loss()
return toxloss
/mob/living/proc/can_adjust_tox_loss(amount, forced, required_biotype = ALL)
@@ -360,7 +360,7 @@
return FALSE
return TRUE
/mob/living/proc/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype = ALL)
/mob/living/proc/adjust_tox_loss(amount, updating_health = TRUE, forced = FALSE, required_biotype = ALL)
if(!can_adjust_tox_loss(amount, forced, required_biotype))
return 0
@@ -387,7 +387,7 @@
updatehealth()
/mob/living/proc/setToxLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype = ALL)
/mob/living/proc/set_tox_loss(amount, updating_health = TRUE, forced = FALSE, required_biotype = ALL)
if(!forced && HAS_TRAIT(src, TRAIT_GODMODE))
return FALSE
if(!forced && !(mob_biotypes & required_biotype))
@@ -400,7 +400,7 @@
if(updating_health)
updatehealth()
/mob/living/proc/getFireLoss()
/mob/living/proc/get_fire_loss()
return fireloss
/mob/living/proc/can_adjust_fire_loss(amount, forced, required_bodytype)
@@ -410,7 +410,7 @@
return FALSE
return TRUE
/mob/living/proc/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype = ALL)
/mob/living/proc/adjust_fire_loss(amount, updating_health = TRUE, forced = FALSE, required_bodytype = ALL)
if(!can_adjust_fire_loss(amount, forced, required_bodytype))
return 0
. = fireloss
@@ -421,7 +421,7 @@
if(updating_health)
updatehealth()
/mob/living/proc/setFireLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype = ALL)
/mob/living/proc/set_fire_loss(amount, updating_health = TRUE, forced = FALSE, required_bodytype = ALL)
if(!forced && HAS_TRAIT(src, TRAIT_GODMODE))
return 0
. = fireloss
@@ -432,16 +432,16 @@
if(updating_health)
updatehealth()
/mob/living/proc/adjustOrganLoss(slot, amount, maximum, required_organ_flag)
/mob/living/proc/adjust_organ_loss(slot, amount, maximum, required_organ_flag)
return
/mob/living/proc/setOrganLoss(slot, amount, maximum, required_organ_flag)
/mob/living/proc/set_organ_loss(slot, amount, maximum, required_organ_flag)
return
/mob/living/proc/get_organ_loss(slot, required_organ_flag)
return
/mob/living/proc/getStaminaLoss()
/mob/living/proc/get_stamina_loss()
return staminaloss
/mob/living/proc/can_adjust_stamina_loss(amount, forced, required_biotype = ALL)
@@ -451,7 +451,7 @@
return FALSE
return TRUE
/mob/living/proc/adjustStaminaLoss(amount, updating_stamina = TRUE, forced = FALSE, required_biotype = ALL)
/mob/living/proc/adjust_stamina_loss(amount, updating_stamina = TRUE, forced = FALSE, required_biotype = ALL)
if(!can_adjust_stamina_loss(amount, forced, required_biotype))
return 0
var/old_amount = staminaloss
@@ -466,7 +466,7 @@
updatehealth()
return delta
/mob/living/proc/setStaminaLoss(amount, updating_stamina = TRUE, forced = FALSE, required_biotype = ALL)
/mob/living/proc/set_stamina_loss(amount, updating_stamina = TRUE, forced = FALSE, required_biotype = ALL)
if(!forced && HAS_TRAIT(src, TRAIT_GODMODE))
return 0
if(!forced && !(mob_biotypes & required_biotype))
@@ -484,12 +484,12 @@
/// The mob has received stamina damage
///
/// - current_level: The mob's current stamina damage amount (to save unnecessary getStaminaLoss() calls)
/// - current_level: The mob's current stamina damage amount (to save unnecessary get_stamina_loss() calls)
/// - amount_actual: The amount of stamina damage received, in actuality
/// For example, if you are taking 50 stamina damage but are at 90, you would actually only receive 30 stamina damage (due to the cap)
/// - amount: The amount of stamina damage received, raw
/mob/living/proc/received_stamina_damage(current_level, amount_actual, amount)
addtimer(CALLBACK(src, PROC_REF(setStaminaLoss), 0, TRUE, TRUE), stamina_regen_time, TIMER_UNIQUE|TIMER_OVERRIDE)
addtimer(CALLBACK(src, PROC_REF(set_stamina_loss), 0, TRUE, TRUE), stamina_regen_time, TIMER_UNIQUE|TIMER_OVERRIDE)
/**
* heal ONE external organ, organ gets randomly selected from damaged ones.
@@ -497,7 +497,7 @@
* returns the net change in damage
*/
/mob/living/proc/heal_bodypart_damage(brute = 0, burn = 0, updating_health = TRUE, required_bodytype = NONE, target_zone = null)
. = (adjustBruteLoss(-abs(brute), updating_health = FALSE) + adjustFireLoss(-abs(burn), updating_health = FALSE))
. = (adjust_brute_loss(-abs(brute), updating_health = FALSE) + adjust_fire_loss(-abs(burn), updating_health = FALSE))
if(!.) // no change, no need to update
return FALSE
if(updating_health)
@@ -505,7 +505,7 @@
/// damage ONE external organ, organ gets randomly selected from damaged ones.
/mob/living/proc/take_bodypart_damage(brute = 0, burn = 0, updating_health = TRUE, required_bodytype, check_armor = FALSE, wound_bonus = 0, exposed_wound_bonus = 0, sharpness = NONE)
. = (adjustBruteLoss(abs(brute), updating_health = FALSE) + adjustFireLoss(abs(burn), updating_health = FALSE))
. = (adjust_brute_loss(abs(brute), updating_health = FALSE) + adjust_fire_loss(abs(burn), updating_health = FALSE))
if(!.) // no change, no need to update
return FALSE
if(updating_health)
@@ -513,9 +513,9 @@
/// heal MANY bodyparts, in random order. note: stamina arg nonfunctional for carbon mobs
/mob/living/proc/heal_overall_damage(brute = 0, burn = 0, stamina = 0, required_bodytype, updating_health = TRUE, forced = FALSE)
. = (adjustBruteLoss(-abs(brute), updating_health = FALSE, forced = forced) + \
adjustFireLoss(-abs(burn), updating_health = FALSE, forced = forced) + \
adjustStaminaLoss(-abs(stamina), updating_stamina = FALSE, forced = forced))
. = (adjust_brute_loss(-abs(brute), updating_health = FALSE, forced = forced) + \
adjust_fire_loss(-abs(burn), updating_health = FALSE, forced = forced) + \
adjust_stamina_loss(-abs(stamina), updating_stamina = FALSE, forced = forced))
if(!.) // no change, no need to update
return FALSE
if(updating_health)
@@ -523,9 +523,9 @@
/// damage MANY bodyparts, in random order. note: stamina arg nonfunctional for carbon mobs
/mob/living/proc/take_overall_damage(brute = 0, burn = 0, stamina = 0, updating_health = TRUE, forced = FALSE, required_bodytype)
. = (adjustBruteLoss(abs(brute), updating_health = FALSE, forced = forced) + \
adjustFireLoss(abs(burn), updating_health = FALSE, forced = forced) + \
adjustStaminaLoss(abs(stamina), updating_stamina = FALSE, forced = forced))
. = (adjust_brute_loss(abs(brute), updating_health = FALSE, forced = forced) + \
adjust_fire_loss(abs(burn), updating_health = FALSE, forced = forced) + \
adjust_stamina_loss(abs(stamina), updating_stamina = FALSE, forced = forced))
if(!.) // no change, no need to update
return FALSE
if(updating_health)
+2 -2
View File
@@ -118,7 +118,7 @@
message_animal_or_basic = custom_message
. = ..()
message_animal_or_basic = initial(message_animal_or_basic)
if(!user.can_speak() || user.getOxyLoss() >= 50)
if(!user.can_speak() || user.get_oxy_loss() >= 50)
return //stop the sound if oxyloss too high/cant speak
var/mob/living/carbon/carbon_user = user
// For masks that give unique death sounds
@@ -364,7 +364,7 @@
TIMER_COOLDOWN_START(src, "point_verb_emote_cooldown", 2 SECONDS)
else
message_param = "[span_userdanger("bumps [user.p_their()] head on the ground")] trying to motion towards %t."
our_carbon.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5)
our_carbon.adjust_organ_loss(ORGAN_SLOT_BRAIN, 5)
playsound(user, 'sound/effects/glass/glassbash.ogg', 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
TIMER_COOLDOWN_START(src, "point_verb_emote_cooldown", 2.5 SECONDS)
return ..()
+1 -1
View File
@@ -141,7 +141,7 @@
return
var/grav_strength = gravity - GRAVITY_DAMAGE_THRESHOLD
adjustBruteLoss(min(GRAVITY_DAMAGE_SCALING * grav_strength, GRAVITY_DAMAGE_MAXIMUM) * seconds_per_tick)
adjust_brute_loss(min(GRAVITY_DAMAGE_SCALING * grav_strength, GRAVITY_DAMAGE_MAXIMUM) * seconds_per_tick)
/// Proc used for custom metabolization of reagents, if any
/mob/living/proc/reagent_tick(datum/reagent/chem, seconds_per_tick, times_fired)
+30 -30
View File
@@ -558,7 +558,7 @@
to_chat(src, span_warning("You are unable to succumb to death! This life continues."), type=MESSAGE_TYPE_INFO)
return
log_message("Has [whispered ? "whispered his final words" : "succumbed to death"] with [round(health, 0.1)] points of health!", LOG_ATTACK)
adjustOxyLoss(health - HEALTH_THRESHOLD_DEAD)
adjust_oxy_loss(health - HEALTH_THRESHOLD_DEAD)
updatehealth()
if(!whispered)
to_chat(src, span_notice("You have given up life and succumbed to death."))
@@ -825,7 +825,7 @@
/mob/living/proc/updatehealth()
if(HAS_TRAIT(src, TRAIT_GODMODE))
return
set_health(maxHealth - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss())
set_health(maxHealth - get_oxy_loss() - get_tox_loss() - get_fire_loss() - get_brute_loss())
update_stat()
med_hud_set_health()
med_hud_set_status()
@@ -883,8 +883,8 @@
// Bro just like, don't ok
return FALSE
if(excess_healing)
adjustOxyLoss(-excess_healing, updating_health = FALSE)
adjustToxLoss(-excess_healing, updating_health = FALSE, forced = TRUE) //slime friendly
adjust_oxy_loss(-excess_healing, updating_health = FALSE)
adjust_tox_loss(-excess_healing, updating_health = FALSE, forced = TRUE) //slime friendly
updatehealth()
grab_ghost(force_grab_ghost)
@@ -928,18 +928,18 @@
/mob/living/proc/heal_and_revive(heal_to = 50, revive_message)
// Heal their brute and burn up to the threshold we're looking for
var/brute_to_heal = heal_to - getBruteLoss()
var/burn_to_heal = heal_to - getFireLoss()
var/oxy_to_heal = heal_to - getOxyLoss()
var/tox_to_heal = heal_to - getToxLoss()
var/brute_to_heal = heal_to - get_brute_loss()
var/burn_to_heal = heal_to - get_fire_loss()
var/oxy_to_heal = heal_to - get_oxy_loss()
var/tox_to_heal = heal_to - get_tox_loss()
if(brute_to_heal < 0)
adjustBruteLoss(brute_to_heal, updating_health = FALSE)
adjust_brute_loss(brute_to_heal, updating_health = FALSE)
if(burn_to_heal < 0)
adjustFireLoss(burn_to_heal, updating_health = FALSE)
adjust_fire_loss(burn_to_heal, updating_health = FALSE)
if(oxy_to_heal < 0)
adjustOxyLoss(oxy_to_heal, updating_health = FALSE)
adjust_oxy_loss(oxy_to_heal, updating_health = FALSE)
if(tox_to_heal < 0)
adjustToxLoss(tox_to_heal, updating_health = FALSE, forced = TRUE)
adjust_tox_loss(tox_to_heal, updating_health = FALSE, forced = TRUE)
// Run updatehealth once to set health for the revival check
updatehealth()
@@ -970,15 +970,15 @@
SHOULD_CALL_PARENT(TRUE)
if(heal_flags & HEAL_TOX)
setToxLoss(0, updating_health = FALSE, forced = TRUE)
set_tox_loss(0, updating_health = FALSE, forced = TRUE)
if(heal_flags & HEAL_OXY)
setOxyLoss(0, updating_health = FALSE, forced = TRUE)
set_oxy_loss(0, updating_health = FALSE, forced = TRUE)
if(heal_flags & HEAL_BRUTE)
setBruteLoss(0, updating_health = FALSE, forced = TRUE)
set_brute_loss(0, updating_health = FALSE, forced = TRUE)
if(heal_flags & HEAL_BURN)
setFireLoss(0, updating_health = FALSE, forced = TRUE)
set_fire_loss(0, updating_health = FALSE, forced = TRUE)
if(heal_flags & HEAL_STAM)
setStaminaLoss(0, updating_stamina = FALSE, forced = TRUE)
set_stamina_loss(0, updating_stamina = FALSE, forced = TRUE)
// I don't really care to keep this under a flag
set_nutrition(NUTRITION_LEVEL_FED + 50)
@@ -1009,16 +1009,16 @@
* It uses the healing amount on brute/fire damage, and then uses the excess healing for revive
*/
/mob/living/proc/do_strange_reagent_revival(healing_amount)
var/brute_loss = getBruteLoss()
var/brute_loss = get_brute_loss()
if(brute_loss)
var/brute_healing = min(healing_amount * 0.5, brute_loss) // 50% of the healing goes to brute
setBruteLoss(round(brute_loss - brute_healing, DAMAGE_PRECISION), updating_health=FALSE, forced=TRUE)
set_brute_loss(round(brute_loss - brute_healing, DAMAGE_PRECISION), updating_health=FALSE, forced=TRUE)
healing_amount = max(0, healing_amount - brute_healing)
var/fire_loss = getFireLoss()
var/fire_loss = get_fire_loss()
if(fire_loss && healing_amount)
var/fire_healing = min(healing_amount, fire_loss) // rest of the healing goes to fire
setFireLoss(round(fire_loss - fire_healing, DAMAGE_PRECISION), updating_health=TRUE, forced=TRUE)
set_fire_loss(round(fire_loss - fire_healing, DAMAGE_PRECISION), updating_health=TRUE, forced=TRUE)
healing_amount = max(0, healing_amount - fire_healing)
revive(NONE, excess_healing=max(healing_amount, 0), force_grab_ghost=FALSE) // and any excess healing is passed along
@@ -1063,7 +1063,7 @@
if(!buckled && !moving_diagonally && loc != old_loc)
var/blood_flow = get_bleed_rate()
var/health_check = body_position == LYING_DOWN && prob(getBruteLoss() * 200 / maxHealth)
var/health_check = body_position == LYING_DOWN && prob(get_brute_loss() * 200 / maxHealth)
var/bleeding_check = blood_flow > 3 && prob(blood_flow * 16)
if(health_check || bleeding_check)
make_blood_trail(newloc, old_loc, old_direction, direct)
@@ -1181,7 +1181,7 @@
if(HAS_TRAIT(src, TRAIT_GRABWEAKNESS)) //If we have grab weakness from some source, treat the grab state as one higher
effective_grab_state++
if(get_timed_status_effect_duration(/datum/status_effect/staggered) && (getFireLoss() + getBruteLoss()) >= 40) //If we are staggered, and we have at least 40 damage, treat the grab state as one higher.
if(get_timed_status_effect_duration(/datum/status_effect/staggered) && (get_fire_loss() + get_brute_loss()) >= 40) //If we are staggered, and we have at least 40 damage, treat the grab state as one higher.
effective_grab_state++
if(HAS_TRAIT(src, TRAIT_GRABRESISTANCE)) //If we have grab resistance from some source, treat the grab state as one lower.
@@ -1199,7 +1199,7 @@
//If our puller is a drunken brawler, they add more damage based on their own damage taken so long as they're drunk and treat the grab state as one higher
var/puller_drunkenness = human_puller.get_drunk_amount()
if(puller_drunkenness && HAS_TRAIT(human_puller, TRAIT_DRUNKEN_BRAWLER))
damage_on_resist_fail += clamp((human_puller.getFireLoss() + human_puller.getBruteLoss()) / 10, 3, 20)
damage_on_resist_fail += clamp((human_puller.get_fire_loss() + human_puller.get_brute_loss()) / 10, 3, 20)
effective_grab_state++
var/datum/martial_art/puller_art = GET_ACTIVE_MARTIAL_ART(human_puller)
@@ -1221,7 +1221,7 @@
pulledby.stop_pulling()
return FALSE
else
adjustStaminaLoss(damage_on_resist_fail) //Do some stamina damage if we fail to resist
adjust_stamina_loss(damage_on_resist_fail) //Do some stamina damage if we fail to resist
visible_message(span_danger("[src] struggles as they fail to break free of [pulledby]'s grip!"), \
span_warning("You struggle as you fail to break free of [pulledby]'s grip!"), null, null, pulledby)
to_chat(pulledby, span_danger("[src] struggles as they fail to break free of your grip!"))
@@ -2075,12 +2075,12 @@ GLOBAL_LIST_EMPTY(fire_appearances)
. += {"
<br><font size='1'>[VV_HREF_TARGETREF(refid, VV_HK_GIVE_DIRECT_CONTROL, "[ckey || "no ckey"]")] / [VV_HREF_TARGETREF_1V(refid, VV_HK_BASIC_EDIT, "[real_name || "no real name"]", NAMEOF(src, real_name))]</font>
<br><font size='1'>
BRUTE:<font size='1'><a href='byond://?_src_=vars;[HrefToken()];mobToDamage=[refid];adjustDamage=brute' id='brute'>[getBruteLoss()]</a>
FIRE:<font size='1'><a href='byond://?_src_=vars;[HrefToken()];mobToDamage=[refid];adjustDamage=fire' id='fire'>[getFireLoss()]</a>
TOXIN:<font size='1'><a href='byond://?_src_=vars;[HrefToken()];mobToDamage=[refid];adjustDamage=toxin' id='toxin'>[getToxLoss()]</a>
OXY:<font size='1'><a href='byond://?_src_=vars;[HrefToken()];mobToDamage=[refid];adjustDamage=oxygen' id='oxygen'>[getOxyLoss()]</a>
BRUTE:<font size='1'><a href='byond://?_src_=vars;[HrefToken()];mobToDamage=[refid];adjustDamage=brute' id='brute'>[get_brute_loss()]</a>
FIRE:<font size='1'><a href='byond://?_src_=vars;[HrefToken()];mobToDamage=[refid];adjustDamage=fire' id='fire'>[get_fire_loss()]</a>
TOXIN:<font size='1'><a href='byond://?_src_=vars;[HrefToken()];mobToDamage=[refid];adjustDamage=toxin' id='toxin'>[get_tox_loss()]</a>
OXY:<font size='1'><a href='byond://?_src_=vars;[HrefToken()];mobToDamage=[refid];adjustDamage=oxygen' id='oxygen'>[get_oxy_loss()]</a>
BRAIN:<font size='1'><a href='byond://?_src_=vars;[HrefToken()];mobToDamage=[refid];adjustDamage=brain' id='brain'>[get_organ_loss(ORGAN_SLOT_BRAIN)]</a>
STAMINA:<font size='1'><a href='byond://?_src_=vars;[HrefToken()];mobToDamage=[refid];adjustDamage=stamina' id='stamina'>[getStaminaLoss()]</a>
STAMINA:<font size='1'><a href='byond://?_src_=vars;[HrefToken()];mobToDamage=[refid];adjustDamage=stamina' id='stamina'>[get_stamina_loss()]</a>
</font>
"}
+3 -3
View File
@@ -581,12 +581,12 @@
if(shock_damage < 1)
return FALSE
if(!(flags & SHOCK_ILLUSION))
adjustFireLoss(shock_damage)
if(getFireLoss() > 100)
adjust_fire_loss(shock_damage)
if(get_fire_loss() > 100)
add_shared_particles(/particles/smoke/burning)
addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/movable, remove_shared_particles), /particles/smoke/burning), 10 SECONDS)
else
adjustStaminaLoss(shock_damage)
adjust_stamina_loss(shock_damage)
if(!(flags & SHOCK_SUPPRESS_MESSAGE))
visible_message(
span_danger("[src] was shocked by \the [source]!"), \
+1 -1
View File
@@ -113,7 +113,7 @@
var/mob_size = MOB_SIZE_HUMAN
/// List of biotypes the mob belongs to. Used by diseases and reagents mainly.
var/mob_biotypes = MOB_ORGANIC
/// The type of respiration the mob is capable of doing. Used by adjustOxyLoss.
/// The type of respiration the mob is capable of doing. Used by adjust_oxy_loss.
var/mob_respiration_type = RESPIRATION_OXYGEN
///more or less efficiency to metabolize helpful/harmful reagents and regulate body temperature..
var/metabolism_efficiency = 1
@@ -13,7 +13,7 @@
/mob/living/silicon/ai/blob_act(obj/structure/blob/B)
if (stat != DEAD)
adjustBruteLoss(60)
adjust_brute_loss(60)
return TRUE
return FALSE
@@ -36,11 +36,11 @@
gib(DROP_ALL_REMAINS)
if(EXPLODE_HEAVY)
if (stat != DEAD)
adjustBruteLoss(60)
adjustFireLoss(60)
adjust_brute_loss(60)
adjust_fire_loss(60)
if(EXPLODE_LIGHT)
if (stat != DEAD)
adjustBruteLoss(30)
adjust_brute_loss(30)
return TRUE
@@ -12,13 +12,13 @@
else
. += span_notice("[p_Their()] neural network connection could be <b>cut</b>, the access panel cover can be <b>pried</b> back into place.")
if(stat != DEAD)
if (getBruteLoss())
if (getBruteLoss() < 30)
if (get_brute_loss())
if (get_brute_loss() < 30)
. += span_warning("[p_They()] look[p_s()] slightly dented.")
else
. += span_warning("<B>[p_They()] look[p_s()] severely dented!</B>")
if (getFireLoss())
if (getFireLoss() < 30)
if (get_fire_loss())
if (get_fire_loss() < 30)
. += span_warning("[p_They()] look[p_s()] slightly charred.")
else
. += span_warning("<B>[p_Their()] casing is melted and heat-warped!</B>")
+2 -2
View File
@@ -15,7 +15,7 @@
// Handle power damage (oxy)
if (battery <= 0 && lacks_power())
to_chat(src, span_warning("Your backup battery's output drops below usable levels. It takes only a moment longer for your systems to fail, corrupted and unusable."))
adjustOxyLoss(200)
adjust_oxy_loss(200)
if(aiRestorePowerRoutine)
// Lost power
@@ -51,7 +51,7 @@
return
var/old_health = health
set_health(maxHealth - getOxyLoss() - getToxLoss() - getBruteLoss() - getFireLoss())
set_health(maxHealth - get_oxy_loss() - get_tox_loss() - get_brute_loss() - get_fire_loss())
var/old_stat = stat
update_stat()
@@ -1,34 +1,34 @@
/mob/living/silicon/apply_effect(effect = 0,effecttype = EFFECT_STUN, blocked = FALSE)
return FALSE //The only effect that can hit them atm is flashes and they still directly edit so this works for now. (This was written in at least 2016. Help)
/mob/living/silicon/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype) //immune to tox damage
/mob/living/silicon/adjust_tox_loss(amount, updating_health = TRUE, forced = FALSE, required_biotype) //immune to tox damage
return FALSE
/mob/living/silicon/setToxLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
/mob/living/silicon/set_tox_loss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
return FALSE
/mob/living/silicon/adjustStaminaLoss(amount, updating_stamina = TRUE, forced = FALSE, required_biotype) //immune to stamina damage.
/mob/living/silicon/adjust_stamina_loss(amount, updating_stamina = TRUE, forced = FALSE, required_biotype) //immune to stamina damage.
return FALSE
/mob/living/silicon/setStaminaLoss(amount, updating_stamina = TRUE, forced = FALSE, required_biotype)
/mob/living/silicon/set_stamina_loss(amount, updating_stamina = TRUE, forced = FALSE, required_biotype)
return FALSE
/mob/living/silicon/received_stamina_damage(current_level, amount_actual, amount)
return
/mob/living/silicon/adjustOrganLoss(slot, amount, maximum = 500, required_organ_flag) //immune to organ damage (no organs, duh)
/mob/living/silicon/adjust_organ_loss(slot, amount, maximum = 500, required_organ_flag) //immune to organ damage (no organs, duh)
return FALSE
/mob/living/silicon/setOrganLoss(slot, amount)
/mob/living/silicon/set_organ_loss(slot, amount)
return FALSE
/mob/living/silicon/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype, required_respiration_type) //immune to oxygen damage
/mob/living/silicon/adjust_oxy_loss(amount, updating_health = TRUE, forced = FALSE, required_biotype, required_respiration_type) //immune to oxygen damage
if(isAI(src)) //ais are snowflakes and use oxyloss for being in AI cards and having no battery
return ..()
return FALSE
/mob/living/silicon/setOxyLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
/mob/living/silicon/set_oxy_loss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
if(isAI(src)) //ditto
return ..()
+2 -2
View File
@@ -33,9 +33,9 @@
/// Plays an animation of the player's hud flavored about their death somewhat
/mob/living/silicon/proc/death_sequence()
var/cause_of_death
if(getBruteLoss() + getFireLoss() > 100)
if(get_brute_loss() + get_fire_loss() > 100)
cause_of_death = "Critical damage sustained."
if(getOxyLoss() > 100)
if(get_oxy_loss() > 100)
cause_of_death = "Critically low power."
var/atom/movable/screen/cyborg_death/deathhud = new(null, hud_used, cause_of_death)
@@ -10,13 +10,13 @@
if(act_module)
. += "[p_Theyre()] holding [icon2html(act_module, user)] \a [act_module]."
. += get_status_effect_examinations()
if (getBruteLoss())
if (getBruteLoss() < maxHealth*0.5)
if (get_brute_loss())
if (get_brute_loss() < maxHealth*0.5)
. += span_warning("[p_They()] look[p_s()] slightly dented.")
else
. += span_boldwarning("[p_They()] look[p_s()] severely dented!")
if (getFireLoss() || getToxLoss())
var/overall_fireloss = getFireLoss() + getToxLoss()
if (get_fire_loss() || get_tox_loss())
var/overall_fireloss = get_fire_loss() + get_tox_loss()
if (overall_fireloss < maxHealth * 0.5)
. += span_warning("[p_They()] look[p_s()] slightly charred.")
else
@@ -20,7 +20,7 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
balloon_alert(user, "expose the wires first!")
return ITEM_INTERACT_BLOCKING
var/obj/item/stack/cable_coil/coil = tool
if (getFireLoss() <= 0)
if (get_fire_loss() <= 0)
balloon_alert(user, "wires are fine!")
return ITEM_INTERACT_BLOCKING
if(src == user)
@@ -30,7 +30,7 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
if (!coil.use(1))
balloon_alert(user, "not enough cable!")
return ITEM_INTERACT_BLOCKING
adjustFireLoss(-30)
adjust_fire_loss(-30)
playsound(src, 'sound/items/deconstruct.ogg', 50, TRUE)
balloon_alert(user, "wires repaired")
user.visible_message(
@@ -321,7 +321,7 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
return NONE
user.changeNext_move(CLICK_CD_MELEE)
if (!getBruteLoss())
if (!get_brute_loss())
balloon_alert(user, "no dents to fix!")
return ITEM_INTERACT_BLOCKING
if (!tool.tool_start_check(user, amount=1, heat_required = HIGH_TEMPERATURE_REQUIRED)) //The welder has 1u of fuel consumed by its afterattack, so we don't need to worry about taking any away.
@@ -334,7 +334,7 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
if(!tool.use_tool(src, user, delay = 0.5 SECONDS, amount = 1, volume = 50))
return ITEM_INTERACT_BLOCKING
adjustBruteLoss(-30)
adjust_brute_loss(-30)
add_fingerprint(user)
balloon_alert(user, "dents fixed")
user.visible_message(
@@ -498,7 +498,7 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
/mob/living/silicon/robot/blob_act(obj/structure/blob/B)
if(stat != DEAD)
adjustBruteLoss(30)
adjust_brute_loss(30)
else
investigate_log("has been gibbed by a blob.", INVESTIGATE_DEATHS)
gib(DROP_ALL_REMAINS)
@@ -512,11 +512,11 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
return TRUE
if(EXPLODE_HEAVY)
if (stat != DEAD)
adjustBruteLoss(60)
adjustFireLoss(60)
adjust_brute_loss(60)
adjust_fire_loss(60)
if(EXPLODE_LIGHT)
if (stat != DEAD)
adjustBruteLoss(30)
adjust_brute_loss(30)
return TRUE
+1 -1
View File
@@ -450,7 +450,7 @@
return
/mob/living/silicon/rust_heretic_act()
adjustBruteLoss(500)
adjust_brute_loss(500)
/mob/living/silicon/on_floored_start()
return // Silicons are always standing by default.
@@ -17,7 +17,7 @@
to_chat(user, span_danger("You slash at [src]!"))
if(prob(8))
flash_act(affect_silicon = 1)
adjustBruteLoss(damage)
adjust_brute_loss(damage)
log_combat(user, src, "attacked")
else
playsound(loc, 'sound/items/weapons/slashmiss.ogg', 25, TRUE, -1)
@@ -51,7 +51,7 @@
. = ..()
if(!.)
return
adjustBruteLoss(rand(10, 15))
adjust_brute_loss(rand(10, 15))
playsound(loc, SFX_PUNCH, 25, TRUE, -1)
visible_message(span_danger("[user] punches [src]!"), \
span_userdanger("[user] punches you!"), null, COMBAT_MESSAGE_RANGE, user)
@@ -50,7 +50,7 @@
visible_message(span_danger("[user] punches [src]!"), \
span_userdanger("You're punched by [user]!"), null, COMBAT_MESSAGE_RANGE, user)
to_chat(user, span_danger("You punch [src]!"))
adjustBruteLoss(15)
adjust_brute_loss(15)
/mob/living/simple_animal/attack_paw(mob/living/carbon/human/user, list/modifiers)
if(..()) //successful monkey bite.
@@ -118,7 +118,7 @@
/mob/living/simple_animal/proc/ex_act_devastate()
var/bomb_armor = getarmor(null, BOMB)
if(prob(bomb_armor))
adjustBruteLoss(500)
adjust_brute_loss(500)
else
investigate_log("has been gibbed by an explosion.", INVESTIGATE_DEATHS)
gib()
@@ -129,7 +129,7 @@
var/bloss = 60
if(prob(bomb_armor))
bloss = bloss / 1.5
adjustBruteLoss(bloss)
adjust_brute_loss(bloss)
/// Called when a light explosive acts on this mob
/mob/living/simple_animal/proc/ex_act_light()
@@ -137,10 +137,10 @@
var/bloss = 30
if(prob(bomb_armor))
bloss = bloss / 1.5
adjustBruteLoss(bloss)
adjust_brute_loss(bloss)
/mob/living/simple_animal/blob_act(obj/structure/blob/B)
adjustBruteLoss(20)
adjust_brute_loss(20)
return
/mob/living/simple_animal/do_attack_animation(atom/A, visual_effect_icon, used_item, no_effect)
@@ -1210,7 +1210,7 @@ Pass a positive integer as an argument to override a bot's default speed.
addtimer(CALLBACK(src, PROC_REF(set_path), null), 0.6 SECONDS) // Enough time for the animate to finish
/mob/living/simple_animal/bot/rust_heretic_act()
adjustBruteLoss(400)
adjust_brute_loss(400)
/mob/living/simple_animal/bot/get_hit_area_message(input_area)
// we just get hit, there's no complexity for hitting an arm (if it exists) or anything.
@@ -25,7 +25,7 @@
return modifier * damage_coeff[damage_type]
return modifier
/mob/living/simple_animal/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
/mob/living/simple_animal/adjust_brute_loss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
if(!can_adjust_brute_loss(amount, forced, required_bodytype))
return 0
if(forced)
@@ -33,7 +33,7 @@
else if(damage_coeff[BRUTE])
. = adjustHealth(amount * damage_coeff[BRUTE] * CONFIG_GET(number/damage_multiplier), updating_health, forced)
/mob/living/simple_animal/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
/mob/living/simple_animal/adjust_fire_loss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
if(!can_adjust_fire_loss(amount, forced, required_bodytype))
return 0
if(forced)
@@ -41,7 +41,7 @@
else if(damage_coeff[BURN])
. = adjustHealth(amount * damage_coeff[BURN] * CONFIG_GET(number/damage_multiplier), updating_health, forced)
/mob/living/simple_animal/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype, required_respiration_type)
/mob/living/simple_animal/adjust_oxy_loss(amount, updating_health = TRUE, forced = FALSE, required_biotype, required_respiration_type)
if(!can_adjust_oxy_loss(amount, forced, required_biotype, required_respiration_type))
return 0
if(forced)
@@ -49,7 +49,7 @@
else if(damage_coeff[OXY])
. = adjustHealth(amount * damage_coeff[OXY] * CONFIG_GET(number/damage_multiplier), updating_health, forced)
/mob/living/simple_animal/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
/mob/living/simple_animal/adjust_tox_loss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
if(!can_adjust_tox_loss(amount, forced, required_biotype))
return 0
if(forced)
@@ -57,7 +57,7 @@
else if(damage_coeff[TOX])
. = adjustHealth(amount * damage_coeff[TOX] * CONFIG_GET(number/damage_multiplier), updating_health, forced)
/mob/living/simple_animal/adjustStaminaLoss(amount, updating_stamina = TRUE, forced = FALSE, required_biotype)
/mob/living/simple_animal/adjust_stamina_loss(amount, updating_stamina = TRUE, forced = FALSE, required_biotype)
if(!can_adjust_stamina_loss(amount, forced, required_biotype))
return 0
var/old_stamloss = staminaloss
@@ -147,7 +147,7 @@
qdel(victim.get_organ_slot(ORGAN_SLOT_LUNGS))
qdel(victim.get_organ_slot(ORGAN_SLOT_HEART))
qdel(victim.get_organ_slot(ORGAN_SLOT_LIVER))
victim.adjustBruteLoss(500)
victim.adjust_brute_loss(500)
victim.death() //make sure they die
victim.apply_status_effect(/datum/status_effect/gutted)
LoseTarget()
@@ -170,13 +170,13 @@
/mob/living/simple_animal/hostile/megafauna/ex_act(severity, target)
switch (severity)
if (EXPLODE_DEVASTATE)
adjustBruteLoss(250)
adjust_brute_loss(250)
if (EXPLODE_HEAVY)
adjustBruteLoss(100)
adjust_brute_loss(100)
if (EXPLODE_LIGHT)
adjustBruteLoss(50)
adjust_brute_loss(50)
return TRUE
@@ -275,7 +275,7 @@ Difficulty: Hard
set_varspeed(move_to_delay)
handle_automated_action() // need to recheck movement otherwise move_to_delay won't update until the next checking aka will be wrong speed for a bit
/mob/living/simple_animal/hostile/megafauna/bubblegum/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
/mob/living/simple_animal/hostile/megafauna/bubblegum/adjust_brute_loss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
. = ..()
anger_modifier = clamp(((maxHealth - health)/60),0,20)
enrage_time = initial(enrage_time) * clamp(anger_modifier / 20, 0.5, 1)
@@ -344,7 +344,7 @@ Difficulty: Hard
/mob/living/simple_animal/hostile/megafauna/bubblegum/hallucination/Life(seconds_per_tick = SSMOBS_DT, times_fired)
return
/mob/living/simple_animal/hostile/megafauna/bubblegum/hallucination/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
/mob/living/simple_animal/hostile/megafauna/bubblegum/hallucination/adjust_brute_loss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
return
/mob/living/simple_animal/hostile/megafauna/bubblegum/hallucination/OpenFire()
@@ -158,7 +158,7 @@ Difficulty: Extremely Hard
adjustHealth(-maxHealth)
/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner/ex_act(severity, target)
adjustBruteLoss(-30 * severity)
adjust_brute_loss(-30 * severity)
visible_message(span_danger("[src] absorbs the explosion!"), span_userdanger("You absorb the explosion!"))
return TRUE
@@ -154,7 +154,7 @@
/mob/living/simple_animal/hostile/megafauna/dragon/proc/arena_escape_enrage() // you ran somehow / teleported away from my arena attack now i'm mad fucker
SLEEP_CHECK_DEATH(0, src)
visible_message(span_boldwarning("[src] starts to glow vibrantly as its wounds close up!"))
adjustBruteLoss(-250) // yeah you're gonna pay for that, don't run nerd
adjust_brute_loss(-250) // yeah you're gonna pay for that, don't run nerd
add_atom_colour(rgb(255, 255, 0), TEMPORARY_COLOUR_PRIORITY)
move_to_delay = move_to_delay / 2
set_light_range(10)
@@ -221,7 +221,7 @@
for(var/mob/living/L in T.contents - owner)
if(istype(L, /mob/living/simple_animal/hostile/megafauna/dragon))
continue
L.adjustFireLoss(10)
L.adjust_fire_loss(10)
to_chat(L, span_userdanger("You fall directly into the pool of lava!"))
// deals damage to mechs
@@ -296,11 +296,11 @@
if(istype(L, /mob/living/simple_animal/hostile/megafauna/dragon))
continue
if(islist(flame_hit) && !flame_hit[L])
L.adjustFireLoss(40)
L.adjust_fire_loss(40)
to_chat(L, span_userdanger("You're hit by the drake's fire breath!"))
flame_hit[L] = TRUE
else
L.adjustFireLoss(10) //if we've already hit them, do way less damage
L.adjust_fire_loss(10) //if we've already hit them, do way less damage
/mob/living/simple_animal/hostile/megafauna/dragon/lesser
name = "lesser ash drake"
@@ -730,7 +730,7 @@ Difficulty: Hard
else
H.Goto(get_turf(caster), H.move_to_delay, 3)
if(monster_damage_boost && (ismegafauna(L) || istype(L, /mob/living/simple_animal/hostile/asteroid)))
L.adjustBruteLoss(damage)
L.adjust_brute_loss(damage)
if(caster)
log_combat(caster, L, "struck with a [name]")
for(var/obj/vehicle/sealed/mecha/M in T.contents - hit_things) //also damage mechs.
@@ -156,13 +156,13 @@
to_chat(trample_target, span_userdanger("[src] tramples you and kicks you away!"))
trample_target.safe_throw_at(throwtarget, 10, 1, src)
trample_target.Paralyze(20)
trample_target.adjustBruteLoss(melee_damage_upper)
trample_target.adjust_brute_loss(melee_damage_upper)
addtimer(CALLBACK(src, PROC_REF(legionnaire_charge_2), move_dir, (times_ran + 1)), 0.7)
/mob/living/simple_animal/hostile/asteroid/elite/legionnaire/proc/head_detach(target)
ranged_cooldown = world.time + 1 SECONDS
if(myhead != null)
myhead.adjustBruteLoss(600)
myhead.adjust_brute_loss(600)
return
if(has_head)
has_head = FALSE
@@ -76,7 +76,7 @@
adjust_ooze_nutrition(nutrition_change)
if(ooze_nutrition <= 0)
adjustBruteLoss(0.25 * seconds_per_tick)
adjust_brute_loss(0.25 * seconds_per_tick)
/// Returns an applicable list of actions to grant to the mob. Will return a list or null.
/mob/living/simple_animal/hostile/ooze/proc/get_innate_actions()
@@ -268,7 +268,7 @@
///Gain health for the consumption and dump some brute loss on the target.
/datum/action/consume/process()
var/mob/living/simple_animal/hostile/ooze/gelatinous/ooze = owner
vored_mob.adjustBruteLoss(5)
vored_mob.adjust_brute_loss(5)
ooze.heal_ordered_damage((ooze.maxHealth * 0.03), list(BRUTE, BURN, OXY)) ///Heal 6% of these specific damage types each process
if(istype(ooze))
ooze.adjust_ooze_nutrition(3)
@@ -215,7 +215,7 @@
/mob/living/simple_animal/Life(seconds_per_tick = SSMOBS_DT, times_fired)
. = ..()
if(staminaloss > 0)
adjustStaminaLoss(-stamina_recovery * seconds_per_tick, FALSE, TRUE)
adjust_stamina_loss(-stamina_recovery * seconds_per_tick, FALSE, TRUE)
/mob/living/simple_animal/Destroy()
QDEL_NULL(access_card)