mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
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:
@@ -128,18 +128,18 @@
|
||||
new /obj/effect/temp_visual/heal(get_turf(candidate), healing_color)
|
||||
|
||||
if (iscarbon(candidate) || issilicon(candidate) || isbasicmob(candidate))
|
||||
candidate.adjustBruteLoss(-brute_heal * seconds_per_tick, updating_health = FALSE)
|
||||
candidate.adjustFireLoss(-burn_heal * seconds_per_tick, updating_health = FALSE)
|
||||
candidate.adjust_brute_loss(-brute_heal * seconds_per_tick, updating_health = FALSE)
|
||||
candidate.adjust_fire_loss(-burn_heal * seconds_per_tick, updating_health = FALSE)
|
||||
|
||||
if (iscarbon(candidate))
|
||||
// Toxin healing is forced for slime people
|
||||
candidate.adjustToxLoss(-toxin_heal * seconds_per_tick, updating_health = FALSE, forced = TRUE)
|
||||
candidate.adjust_tox_loss(-toxin_heal * seconds_per_tick, updating_health = FALSE, forced = TRUE)
|
||||
|
||||
candidate.adjustOxyLoss(-suffocation_heal * seconds_per_tick, updating_health = FALSE)
|
||||
candidate.adjustStaminaLoss(-stamina_heal * seconds_per_tick, updating_stamina = FALSE)
|
||||
candidate.adjust_oxy_loss(-suffocation_heal * seconds_per_tick, updating_health = FALSE)
|
||||
candidate.adjust_stamina_loss(-stamina_heal * seconds_per_tick, updating_stamina = FALSE)
|
||||
|
||||
for (var/organ in organ_healing)
|
||||
candidate.adjustOrganLoss(organ, -organ_healing[organ] * seconds_per_tick)
|
||||
candidate.adjust_organ_loss(organ, -organ_healing[organ] * seconds_per_tick)
|
||||
var/mob/living/carbon/carbidate = candidate
|
||||
for(var/datum/wound/iter_wound as anything in carbidate.all_wounds)
|
||||
iter_wound.adjust_blood_flow(-wound_clotting * seconds_per_tick)
|
||||
|
||||
@@ -154,9 +154,9 @@
|
||||
/datum/component/blob_minion/proc/on_burned(mob/living/minion, exposed_temperature, exposed_volume)
|
||||
SIGNAL_HANDLER
|
||||
if(isnull(exposed_temperature))
|
||||
minion.adjustFireLoss(5)
|
||||
minion.adjust_fire_loss(5)
|
||||
return
|
||||
minion.adjustFireLoss(clamp(0.01 * exposed_temperature, 1, 5))
|
||||
minion.adjust_fire_loss(clamp(0.01 * exposed_temperature, 1, 5))
|
||||
|
||||
/// Someone is attempting to move through us, allow it if it is a blob tile
|
||||
/datum/component/blob_minion/proc/on_attempted_pass(mob/living/minion, atom/movable/incoming)
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
if(isliving(dropped_thing))
|
||||
var/mob/living/fallen = dropped_thing
|
||||
fallen.Paralyze(100)
|
||||
fallen.adjustBruteLoss(30)
|
||||
fallen.adjust_brute_loss(30)
|
||||
falling_atoms -= falling_ref
|
||||
return
|
||||
|
||||
|
||||
@@ -97,11 +97,11 @@
|
||||
/// What effect the damage aura has if it has an owner.
|
||||
/datum/component/damage_aura/proc/owner_effect(mob/living/owner_mob, seconds_per_tick)
|
||||
var/need_mob_update = FALSE
|
||||
need_mob_update += owner_mob.adjustStaminaLoss(-20 * seconds_per_tick, updating_stamina = FALSE)
|
||||
need_mob_update += owner_mob.adjustBruteLoss(-1 * seconds_per_tick, updating_health = FALSE)
|
||||
need_mob_update += owner_mob.adjustFireLoss(-1 * seconds_per_tick, updating_health = FALSE)
|
||||
need_mob_update += owner_mob.adjustToxLoss(-1 * seconds_per_tick, updating_health = FALSE, forced = TRUE)
|
||||
need_mob_update += owner_mob.adjustOxyLoss(-1 * seconds_per_tick, updating_health = FALSE)
|
||||
need_mob_update += owner_mob.adjust_stamina_loss(-20 * seconds_per_tick, updating_stamina = FALSE)
|
||||
need_mob_update += owner_mob.adjust_brute_loss(-1 * seconds_per_tick, updating_health = FALSE)
|
||||
need_mob_update += owner_mob.adjust_fire_loss(-1 * seconds_per_tick, updating_health = FALSE)
|
||||
need_mob_update += owner_mob.adjust_tox_loss(-1 * seconds_per_tick, updating_health = FALSE, forced = TRUE)
|
||||
need_mob_update += owner_mob.adjust_oxy_loss(-1 * seconds_per_tick, updating_health = FALSE)
|
||||
|
||||
owner_mob.adjust_blood_volume(2 * seconds_per_tick, maximum = BLOOD_VOLUME_NORMAL)
|
||||
|
||||
@@ -135,16 +135,16 @@
|
||||
to_chat(candidate, damage_message)
|
||||
|
||||
if (iscarbon(candidate) || issilicon(candidate) || isbasicmob(candidate))
|
||||
candidate.adjustBruteLoss(brute_damage * seconds_per_tick, updating_health = FALSE)
|
||||
candidate.adjustFireLoss(burn_damage * seconds_per_tick, updating_health = FALSE)
|
||||
candidate.adjust_brute_loss(brute_damage * seconds_per_tick, updating_health = FALSE)
|
||||
candidate.adjust_fire_loss(burn_damage * seconds_per_tick, updating_health = FALSE)
|
||||
|
||||
if (iscarbon(candidate))
|
||||
candidate.adjustToxLoss(toxin_damage * seconds_per_tick, updating_health = FALSE)
|
||||
candidate.adjustOxyLoss(suffocation_damage * seconds_per_tick, updating_health = FALSE)
|
||||
candidate.adjustStaminaLoss(stamina_damage * seconds_per_tick, updating_stamina = FALSE)
|
||||
candidate.adjust_tox_loss(toxin_damage * seconds_per_tick, updating_health = FALSE)
|
||||
candidate.adjust_oxy_loss(suffocation_damage * seconds_per_tick, updating_health = FALSE)
|
||||
candidate.adjust_stamina_loss(stamina_damage * seconds_per_tick, updating_stamina = FALSE)
|
||||
|
||||
for (var/organ in organ_damage)
|
||||
candidate.adjustOrganLoss(organ, organ_damage[organ] * seconds_per_tick)
|
||||
candidate.adjust_organ_loss(organ, organ_damage[organ] * seconds_per_tick)
|
||||
else if (isanimal(candidate))
|
||||
var/mob/living/simple_animal/animal_candidate = candidate
|
||||
animal_candidate.adjustHealth(simple_damage * seconds_per_tick, updating_health = FALSE)
|
||||
|
||||
@@ -48,9 +48,9 @@
|
||||
|
||||
if(isliving(parent))
|
||||
var/mob/living/L = parent
|
||||
tox_loss = L.getToxLoss()
|
||||
oxy_loss = L.getOxyLoss()
|
||||
stamina_loss = L.getStaminaLoss()
|
||||
tox_loss = L.get_tox_loss()
|
||||
oxy_loss = L.get_oxy_loss()
|
||||
stamina_loss = L.get_stamina_loss()
|
||||
brain_loss = L.get_organ_loss(ORGAN_SLOT_BRAIN)
|
||||
rewind_type = PROC_REF(rewind_living)
|
||||
|
||||
@@ -99,10 +99,10 @@
|
||||
parent.AddComponent(type, 1, rewind_interval, TRUE)
|
||||
|
||||
var/mob/living/master = parent
|
||||
master.setToxLoss(tox_loss)
|
||||
master.setOxyLoss(oxy_loss)
|
||||
master.setStaminaLoss(stamina_loss)
|
||||
master.setOrganLoss(ORGAN_SLOT_BRAIN, brain_loss)
|
||||
master.set_tox_loss(tox_loss)
|
||||
master.set_oxy_loss(oxy_loss)
|
||||
master.set_stamina_loss(stamina_loss)
|
||||
master.set_organ_loss(ORGAN_SLOT_BRAIN, brain_loss)
|
||||
rewind()
|
||||
|
||||
/datum/component/dejavu/proc/rewind_carbon()
|
||||
|
||||
@@ -57,9 +57,9 @@
|
||||
var/t_are = target.p_are()
|
||||
if((visible_info & EMPATH_SEE_COMBAT) && target.combat_mode)
|
||||
examine_list += "[t_They] seem[p_s()] to be on guard."
|
||||
if((visible_info & EMPATH_SEE_OXY) && target.getOxyLoss() >= 10)
|
||||
if((visible_info & EMPATH_SEE_OXY) && target.get_oxy_loss() >= 10)
|
||||
examine_list += "[t_They] seem[p_s()] winded."
|
||||
if((visible_info & EMPATH_SEE_TOX) && target.getToxLoss() >= 10)
|
||||
if((visible_info & EMPATH_SEE_TOX) && target.get_tox_loss() >= 10)
|
||||
examine_list += "[t_They] seem[p_s()] sickly."
|
||||
if((visible_info & EMPATH_SEE_SANITY) && target.mob_mood.sanity <= SANITY_DISTURBED)
|
||||
examine_list += "[t_They] seem[p_s()] distressed."
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
return
|
||||
|
||||
if (terror_buildup < TERROR_BUILDUP_HEART_ATTACK || !prob(15))
|
||||
owner.adjustOxyLoss(8)
|
||||
owner.adjust_oxy_loss(8)
|
||||
if (terror_buildup < TERROR_BUILDUP_FEAR)
|
||||
to_chat(owner, span_warning("Your heart skips a beat."))
|
||||
else
|
||||
|
||||
@@ -165,14 +165,14 @@
|
||||
/datum/component/healing_touch/proc/has_healable_damage(mob/living/target)
|
||||
if (!isnull(valid_biotypes) && !(valid_biotypes & target.mob_biotypes))
|
||||
return FALSE
|
||||
if (target.getStaminaLoss() > 0 && heal_stamina)
|
||||
if (target.get_stamina_loss() > 0 && heal_stamina)
|
||||
return TRUE
|
||||
if (target.getOxyLoss() > 0 && heal_oxy)
|
||||
if (target.get_oxy_loss() > 0 && heal_oxy)
|
||||
return TRUE
|
||||
if (target.getToxLoss() > 0 && heal_tox)
|
||||
if (target.get_tox_loss() > 0 && heal_tox)
|
||||
return TRUE
|
||||
if (!iscarbon(target))
|
||||
return (target.getBruteLoss() > 0 && heal_brute) || (target.getFireLoss() > 0 && heal_burn)
|
||||
return (target.get_brute_loss() > 0 && heal_brute) || (target.get_fire_loss() > 0 && heal_burn)
|
||||
var/mob/living/carbon/carbon_target = target
|
||||
for (var/obj/item/bodypart/part in carbon_target.bodyparts)
|
||||
if (!(part.brute_dam && heal_brute) && !(part.burn_dam && heal_burn))
|
||||
@@ -207,8 +207,8 @@
|
||||
required_bodytype = required_bodytype,
|
||||
updating_health = FALSE,
|
||||
)
|
||||
healed += target.adjustOxyLoss(-heal_oxy * mult, updating_health = FALSE, required_biotype = valid_biotypes)
|
||||
healed += target.adjustToxLoss(-heal_tox * mult, updating_health = FALSE, required_biotype = valid_biotypes)
|
||||
healed += target.adjust_oxy_loss(-heal_oxy * mult, updating_health = FALSE, required_biotype = valid_biotypes)
|
||||
healed += target.adjust_tox_loss(-heal_tox * mult, updating_health = FALSE, required_biotype = valid_biotypes)
|
||||
if (healed <= 0)
|
||||
return
|
||||
|
||||
|
||||
@@ -111,11 +111,11 @@
|
||||
///Heart eater give also strong healing from hearts.
|
||||
/datum/component/heart_eater/proc/healing_heart(mob/living/carbon/human/eater)
|
||||
for(var/heal_organ in eater.organs)
|
||||
eater.adjustOrganLoss(heal_organ, -50)
|
||||
eater.adjust_organ_loss(heal_organ, -50)
|
||||
for(var/datum/wound/heal_wound in eater.all_wounds)
|
||||
heal_wound.remove_wound()
|
||||
eater.adjustBruteLoss(-50)
|
||||
eater.adjustFireLoss(-50)
|
||||
eater.adjustToxLoss(-50)
|
||||
eater.adjustOxyLoss(-50)
|
||||
eater.adjustStaminaLoss(-50)
|
||||
eater.adjust_brute_loss(-50)
|
||||
eater.adjust_fire_loss(-50)
|
||||
eater.adjust_tox_loss(-50)
|
||||
eater.adjust_oxy_loss(-50)
|
||||
eater.adjust_stamina_loss(-50)
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
return PROCESS_KILL
|
||||
|
||||
var/mob/living/carbon/human/human_parent = parent
|
||||
if (human_parent.getToxLoss() == 0)
|
||||
if (human_parent.get_tox_loss() == 0)
|
||||
qdel(src)
|
||||
return PROCESS_KILL
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
|
||||
if (isliving(source))
|
||||
var/mob/living/living_source = source
|
||||
to_chat(user, span_bolddanger("[icon2html(geiger_counter, user)] Subject is irradiated. Contamination traces back to roughly [DisplayTimeText(world.time - beginning_of_irradiation, 5)] ago. Current toxin levels: [living_source.getToxLoss()]."))
|
||||
to_chat(user, span_bolddanger("[icon2html(geiger_counter, user)] Subject is irradiated. Contamination traces back to roughly [DisplayTimeText(world.time - beginning_of_irradiation, 5)] ago. Current toxin levels: [living_source.get_tox_loss()]."))
|
||||
else
|
||||
// In case the green wasn't obvious enough...
|
||||
to_chat(user, span_bolddanger("[icon2html(geiger_counter, user)] Target is irradiated."))
|
||||
|
||||
@@ -31,5 +31,5 @@
|
||||
|
||||
var/mob/living/overlord_to_damage = overlord_mob?.resolve()
|
||||
if(!isnull(overlord_to_damage))
|
||||
overlord_to_damage.adjustBruteLoss(previous_health_count - source.health) ///damage or heal overlord
|
||||
overlord_to_damage.adjust_brute_loss(previous_health_count - source.health) ///damage or heal overlord
|
||||
previous_health_count = source.health
|
||||
|
||||
@@ -65,13 +65,13 @@
|
||||
amount *= our_mob.get_damage_mod(type)
|
||||
switch (type)
|
||||
if(BRUTE)
|
||||
host.adjustBruteLoss(amount, forced = TRUE)
|
||||
host.adjust_brute_loss(amount, forced = TRUE)
|
||||
if(BURN)
|
||||
host.adjustFireLoss(amount, forced = TRUE)
|
||||
host.adjust_fire_loss(amount, forced = TRUE)
|
||||
if(TOX)
|
||||
host.adjustToxLoss(amount, forced = TRUE)
|
||||
host.adjust_tox_loss(amount, forced = TRUE)
|
||||
if(OXY)
|
||||
host.adjustOxyLoss(amount, forced = TRUE)
|
||||
host.adjust_oxy_loss(amount, forced = TRUE)
|
||||
|
||||
on_passed_damage?.Invoke(our_mob, host, amount)
|
||||
return COMPONENT_IGNORE_CHANGE
|
||||
@@ -80,9 +80,9 @@
|
||||
/datum/component/life_link/proc/on_limb_damage(mob/living/our_mob, limb, brute, burn)
|
||||
SIGNAL_HANDLER
|
||||
if (brute != 0)
|
||||
host.adjustBruteLoss(brute, updating_health = FALSE)
|
||||
host.adjust_brute_loss(brute, updating_health = FALSE)
|
||||
if (burn != 0)
|
||||
host.adjustFireLoss(burn, updating_health = FALSE)
|
||||
host.adjust_fire_loss(burn, updating_health = FALSE)
|
||||
if (brute != 0 || burn != 0)
|
||||
host.updatehealth()
|
||||
on_passed_damage?.Invoke(our_mob, host, brute + burn)
|
||||
|
||||
@@ -99,9 +99,9 @@
|
||||
carbon_owner.adjust_blood_volume(blood_loss * 0.5)
|
||||
carbon_owner.remove_client_colour(REF(src))
|
||||
add_colour = TRUE
|
||||
carbon_owner.adjustBruteLoss(-heal_brute)
|
||||
carbon_owner.adjustFireLoss(-heal_burn)
|
||||
carbon_owner.adjustOxyLoss(-heal_oxy)
|
||||
carbon_owner.adjust_brute_loss(-heal_brute)
|
||||
carbon_owner.adjust_fire_loss(-heal_burn)
|
||||
carbon_owner.adjust_oxy_loss(-heal_oxy)
|
||||
|
||||
/datum/component/manual_heart/process()
|
||||
var/mob/living/carbon/carbon_parent = parent
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
SIGNAL_HANDLER
|
||||
if (forced)
|
||||
return
|
||||
back?.adjustStaminaLoss(amount, forced = forced)
|
||||
back?.adjust_stamina_loss(amount, forced = forced)
|
||||
|
||||
/// On damage or heal, affect our furthest segment
|
||||
/datum/component/mob_chain/proc/on_adjust_damage(mob/living/our_mob, type, amount, forced)
|
||||
@@ -180,13 +180,13 @@
|
||||
return
|
||||
switch (type)
|
||||
if(BRUTE)
|
||||
back.adjustBruteLoss(amount, forced = forced)
|
||||
back.adjust_brute_loss(amount, forced = forced)
|
||||
if(BURN)
|
||||
back.adjustFireLoss(amount, forced = forced)
|
||||
back.adjust_fire_loss(amount, forced = forced)
|
||||
if(TOX)
|
||||
back.adjustToxLoss(amount, forced = forced)
|
||||
back.adjust_tox_loss(amount, forced = forced)
|
||||
if(OXY) // If all segments are suffocating we pile damage backwards until our ass starts dying forwards
|
||||
back.adjustOxyLoss(amount, forced = forced)
|
||||
back.adjust_oxy_loss(amount, forced = forced)
|
||||
return COMPONENT_IGNORE_CHANGE
|
||||
|
||||
/// Special handling for if damage is delegated to a mob's limbs instead of its overall damage
|
||||
@@ -195,9 +195,9 @@
|
||||
if (isnull(back))
|
||||
return
|
||||
if (brute != 0)
|
||||
back.adjustBruteLoss(brute, updating_health = FALSE)
|
||||
back.adjust_brute_loss(brute, updating_health = FALSE)
|
||||
if (burn != 0)
|
||||
back.adjustFireLoss(burn, updating_health = FALSE)
|
||||
back.adjust_fire_loss(burn, updating_health = FALSE)
|
||||
if (brute != 0 || burn != 0)
|
||||
back.updatehealth()
|
||||
return COMPONENT_PREVENT_LIMB_DAMAGE
|
||||
|
||||
@@ -115,13 +115,13 @@
|
||||
|
||||
var/need_mob_update = FALSE
|
||||
if(brute_per_second)
|
||||
need_mob_update += living_parent.adjustBruteLoss(-1 * heal_mod * brute_per_second * seconds_per_tick, updating_health = FALSE)
|
||||
need_mob_update += living_parent.adjust_brute_loss(-1 * heal_mod * brute_per_second * seconds_per_tick, updating_health = FALSE)
|
||||
if(burn_per_second)
|
||||
need_mob_update += living_parent.adjustFireLoss(-1 * heal_mod * burn_per_second * seconds_per_tick, updating_health = FALSE)
|
||||
need_mob_update += living_parent.adjust_fire_loss(-1 * heal_mod * burn_per_second * seconds_per_tick, updating_health = FALSE)
|
||||
if(tox_per_second)
|
||||
need_mob_update += living_parent.adjustToxLoss(-1 * heal_mod * tox_per_second * seconds_per_tick, updating_health = FALSE)
|
||||
need_mob_update += living_parent.adjust_tox_loss(-1 * heal_mod * tox_per_second * seconds_per_tick, updating_health = FALSE)
|
||||
if(oxy_per_second)
|
||||
need_mob_update += living_parent.adjustOxyLoss(-1 * heal_mod * oxy_per_second * seconds_per_tick, updating_health = FALSE)
|
||||
need_mob_update += living_parent.adjust_oxy_loss(-1 * heal_mod * oxy_per_second * seconds_per_tick, updating_health = FALSE)
|
||||
|
||||
if(heals_wounds && iscarbon(parent))
|
||||
var/mob/living/carbon/carbon_parent = living_parent
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
if(squash_flags & SQUASHED_SHOULD_BE_GIBBED)
|
||||
target.gib(DROP_ALL_REMAINS)
|
||||
else
|
||||
target.adjustBruteLoss(squash_damage)
|
||||
target.adjust_brute_loss(squash_damage)
|
||||
|
||||
/datum/component/squashable/UnregisterFromParent()
|
||||
. = ..()
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
clicked_atom = get_turf_in_angle(tackle_angle, get_turf(user), min_distance)
|
||||
|
||||
user.Knockdown(base_knockdown, ignore_canstun = TRUE)
|
||||
user.adjustStaminaLoss(stamina_cost)
|
||||
user.adjust_stamina_loss(stamina_cost)
|
||||
user.throw_at(clicked_atom, range, speed, user, FALSE)
|
||||
addtimer(CALLBACK(src, PROC_REF(resetTackle)), base_knockdown, TIMER_STOPPABLE)
|
||||
return(COMSIG_MOB_CANCEL_CLICKON)
|
||||
@@ -466,11 +466,11 @@
|
||||
|
||||
if(human_sacker.mob_mood.sanity_level == SANITY_LEVEL_INSANE) //I've gone COMPLETELY INSANE
|
||||
attack_mod += 15
|
||||
human_sacker.adjustStaminaLoss(100) //AHAHAHAHAHAHAHAHA
|
||||
human_sacker.adjust_stamina_loss(100) //AHAHAHAHAHAHAHAHA
|
||||
|
||||
if(HAS_TRAIT(human_sacker, TRAIT_BRAWLING_KNOCKDOWN_BLOCKED)) // tackling with riot specialized armor, like riot armor, is effective but tiring
|
||||
attack_mod += 2
|
||||
human_sacker.adjustStaminaLoss(20)
|
||||
human_sacker.adjust_stamina_loss(20)
|
||||
|
||||
var/randomized_tackle_roll = rand(-3, 3) - defense_mod + attack_mod + skill_mod
|
||||
return randomized_tackle_roll
|
||||
@@ -622,7 +622,7 @@
|
||||
embed.ignore_throwspeed_threshold = initial(embed.ignore_throwspeed_threshold)
|
||||
embed.impact_pain_mult = initial(embed.impact_pain_mult)
|
||||
windscreen_casualty.atom_destruction()
|
||||
user.adjustStaminaLoss(10 * speed)
|
||||
user.adjust_stamina_loss(10 * speed)
|
||||
user.Paralyze(3 SECONDS)
|
||||
user.visible_message(span_danger("[user] smacks into [windscreen_casualty] and shatters it, shredding [user.p_them()]self with glass!"), span_userdanger("You smacks into [windscreen_casualty] and shatter it, shredding yourself with glass!"))
|
||||
|
||||
@@ -631,8 +631,8 @@
|
||||
user.Paralyze(1 SECONDS)
|
||||
user.Knockdown(3 SECONDS)
|
||||
windscreen_casualty.take_damage(30 * speed)
|
||||
user.adjustStaminaLoss(10 * speed, updating_stamina=FALSE)
|
||||
user.adjustBruteLoss(5 * speed)
|
||||
user.adjust_stamina_loss(10 * speed, updating_stamina=FALSE)
|
||||
user.adjust_brute_loss(5 * speed)
|
||||
|
||||
/datum/component/tackler/proc/delayedSmash(obj/structure/window/windscreen_casualty)
|
||||
if(windscreen_casualty)
|
||||
@@ -676,8 +676,8 @@
|
||||
HOW_big_of_a_miss_did_we_just_make = ", making a ginormous mess!" // an extra exclamation point!! for emphasis!!!
|
||||
|
||||
owner.visible_message(span_danger("[owner] trips over [kevved] and slams into it face-first[HOW_big_of_a_miss_did_we_just_make]!"), span_userdanger("You trip over [kevved] and slam into it face-first[HOW_big_of_a_miss_did_we_just_make]!"))
|
||||
owner.adjustStaminaLoss(15 + messes.len * 2, updating_stamina = FALSE)
|
||||
owner.adjustBruteLoss(8 + messes.len, updating_health = FALSE)
|
||||
owner.adjust_stamina_loss(15 + messes.len * 2, updating_stamina = FALSE)
|
||||
owner.adjust_brute_loss(8 + messes.len, updating_health = FALSE)
|
||||
owner.Paralyze(0.4 SECONDS * messes.len) // .4 seconds of paralyze for each thing you knock around
|
||||
owner.Knockdown(2 SECONDS + 0.4 SECONDS * messes.len) // 2 seconds of knockdown after the paralyze
|
||||
owner.updatehealth()
|
||||
|
||||
@@ -273,11 +273,11 @@
|
||||
var/obj/item/item_parent = parent
|
||||
switch(item_parent.damtype)
|
||||
if(STAMINA)
|
||||
user.adjustStaminaLoss(clumsy_damage)
|
||||
user.adjust_stamina_loss(clumsy_damage)
|
||||
if(OXY)
|
||||
user.adjustOxyLoss(clumsy_damage)
|
||||
user.adjust_oxy_loss(clumsy_damage)
|
||||
if(TOX)
|
||||
user.adjustToxLoss(clumsy_damage)
|
||||
user.adjust_tox_loss(clumsy_damage)
|
||||
if(BRUTE)
|
||||
user.take_bodypart_damage(brute=clumsy_damage)
|
||||
if(BURN)
|
||||
|
||||
Reference in New Issue
Block a user