From e6f972666ccc2ea3a4cd922e68110c6594dc8f01 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Mon, 9 Sep 2024 17:13:34 -0400 Subject: [PATCH] regexes damage and wound types (#6735) Different semantics demand different defines. It's hard to tell what's being used where and for what reason right now. Staging for combat PR. --- citadel.dme | 2 + code/__DEFINES/combat/damage.dm | 63 +++++++++++--- code/__DEFINES/damage_organs.dm | 16 ---- code/__DEFINES/hardsuits/breaches.dm | 7 ++ code/__DEFINES/mobs/wounds.dm | 10 +++ code/datums/components/jousting.dm | 2 +- code/datums/components/mobs/block_frame.dm | 2 +- code/datums/unarmed_attack.dm | 4 +- code/game/atoms/atom-damage.dm | 4 +- code/game/atoms/atom-defense.dm | 14 +-- code/game/gamemodes/cult/construct_spells.dm | 2 +- code/game/gamemodes/cult/cult_items.dm | 2 +- .../spells/projectile/chain_lightning.dm | 2 +- .../spells/projectile/force_missile.dm | 2 +- .../spells/projectile/lightning.dm | 2 +- .../spells/projectile/overload.dm | 2 +- code/game/machinery/iv_drip.dm | 2 +- code/game/objects/effects/spiders.dm | 4 +- code/game/objects/effects/traps.dm | 16 ++-- code/game/objects/items/devices/PDA/PDA.dm | 2 +- code/game/objects/items/devices/defib.dm | 2 +- code/game/objects/items/devices/flash.dm | 2 +- .../melee/types/transforming/energy/axe.dm | 2 +- code/game/objects/items/stacks/medical.dm | 6 +- .../items/stream_projector/medichine.dm | 4 +- code/game/objects/items/tools/weldingtool.dm | 2 +- .../objects/items/weapons/cigs_lighters.dm | 4 +- .../objects/items/weapons/dna_injector.dm | 2 +- .../objects/items/weapons/implants/implant.dm | 6 +- .../objects/items/weapons/material/shards.dm | 4 +- code/game/objects/items/weapons/nullrod.dm | 2 +- .../objects/items/weapons/surgery_tools.dm | 2 +- .../objects/items/weapons/swords_axes_etc.dm | 10 +-- code/game/objects/items/weapons/traps.dm | 2 +- code/game/objects/obj-defense.dm | 10 +-- code/game/objects/structures/charge_pylon.dm | 2 +- code/game/objects/structures/cliff.dm | 2 +- .../structures/crates_lockers/crates.dm | 2 +- code/game/objects/structures/femur_breaker.dm | 2 +- code/game/objects/structures/guillotine.dm | 2 +- .../objects/structures/medical_stand_vr.dm | 4 +- .../structures/props/projectile_lock.dm | 2 +- .../objects/structures/props/puzzledoor.dm | 2 +- .../structures/stool_bed_chair_nest/chairs.dm | 4 +- .../stool_bed_chair_nest/wheelchair.dm | 4 +- code/game/objects/stumble_into_vr.dm | 20 ++--- .../game/turfs/simulated/wall/wall-defense.dm | 2 +- code/modules/ai/ai_tracking.dm | 1 - .../atmospherics/environmental/zas/airflow.dm | 6 +- .../atmospherics/environmental/zas/fire.dm | 16 ++-- .../atmospherics/machinery/pipes/he_pipes.dm | 2 +- code/modules/blob2/blobs/base_blob.dm | 8 +- code/modules/blob2/overmind/types.dm | 26 +++--- code/modules/clothing/gloves/_gloves.dm | 2 +- code/modules/clothing/spacesuits/breaches.dm | 56 +++++++----- .../food/machinery/appliance/_appliance.dm | 2 +- code/modules/holodeck/HolodeckControl.dm | 2 +- code/modules/holodeck/HolodeckObjects.dm | 4 +- code/modules/hydroponics/seed.dm | 4 +- .../spreading/spreading_response.dm | 2 +- .../subtypes/manipulation.dm | 2 +- code/modules/maps/weather/miaphus.dm | 2 +- code/modules/maps/weather/virgo4.dm | 2 +- code/modules/materials/material_sheets.dm | 6 +- .../mining/tools/kinetic_accelerator.dm | 4 +- code/modules/mining/tools/kinetic_crusher.dm | 9 +- code/modules/mining/tools/resonator.dm | 2 +- code/modules/mob/grab.dm | 4 +- code/modules/mob/living/bot/mulebot.dm | 12 +-- .../mob/living/carbon/carbon_defense.dm | 8 +- code/modules/mob/living/carbon/human/blood.dm | 4 +- .../carbon/human/human-damage-legacy.dm | 10 +-- .../carbon/human/human-defense-legacy.dm | 8 +- .../living/carbon/human/human_attackhand.dm | 2 +- .../mob/living/carbon/human/human_powers.dm | 2 +- code/modules/mob/living/carbon/human/life.dm | 12 +-- code/modules/mob/living/living-damage.dm | 40 ++++----- .../mob/living/living-defense-legacy.dm | 10 +-- .../silicon/robot/dogborg/dog_modules_vr.dm | 2 +- .../mob/living/silicon/silicon-damage.dm | 4 +- .../simple_animal/constructs/constructs.dm | 8 +- code/modules/mob/living/simple_mob/combat.dm | 2 +- code/modules/mob/living/simple_mob/defense.dm | 12 +-- .../mob/living/simple_mob/simple_mob_vr.dm | 2 +- .../subtypes/animal/giant_spider/hunter.dm | 2 +- .../simple_mob/subtypes/animal/sif/kururak.dm | 4 +- .../simple_mob/subtypes/animal/space/alien.dm | 24 ++--- .../subtypes/animal/space/horing.dm | 12 +-- .../simple_mob/subtypes/animal/space/worm.dm | 4 +- .../simple_mob/subtypes/lavaland/goliath.dm | 2 +- .../mechanical/cyber_horror/cyber_horror.dm | 9 +- .../subtypes/mechanical/hivebot/hivebot.dm | 2 +- .../mechanical/hivebot/ranged_damage.dm | 3 +- .../mechanical/mecha/adv_dark_gygax.dm | 2 +- .../subtypes/occult/constructs/juggernaut.dm | 8 +- .../simple_mob/subtypes/slime/feral/feral.dm | 2 +- .../subtypes/slime/xenobio/subtypes.dm | 10 ++- .../computers/modular_computer/damage.dm | 6 +- code/modules/organs/external/external.dm | 34 ++++---- code/modules/organs/external/wound.dm | 42 ++++----- .../organs/external/wounds/amputation.dm | 4 +- code/modules/organs/external/wounds/brute.dm | 18 ++-- code/modules/organs/external/wounds/burn.dm | 2 +- .../modules/organs/internal/subtypes/heart.dm | 2 +- code/modules/paperwork/pen.dm | 4 +- code/modules/power/cable.dm | 2 +- code/modules/power/port_gen.dm | 2 +- code/modules/projectiles/gun.dm | 4 +- .../ballistic/microbattery/revolver_cells.dm | 2 +- .../projectiles/guns/energy/particle.dm | 2 +- .../guns/legacy_vr_guns/pummeler.dm | 2 +- .../guns/legacy_vr_guns/sickshot.dm | 2 +- code/modules/projectiles/guns/vox.dm | 8 +- .../projectiles/projectile/projectile.dm | 8 +- .../projectile/subtypes/animate.dm | 2 +- .../projectiles/projectile/subtypes/arc.dm | 2 +- .../projectile/subtypes/beam/beams.dm | 14 +-- .../projectile/subtypes/beam/beams_vr.dm | 6 +- .../projectile/subtypes/beam/blaster.dm | 2 +- .../projectiles/projectile/subtypes/blob.dm | 6 +- .../projectile/subtypes/bullets.dm | 20 ++--- .../projectiles/projectile/subtypes/change.dm | 2 +- .../projectiles/projectile/subtypes/energy.dm | 20 ++--- .../projectiles/projectile/subtypes/hook.dm | 6 +- .../projectile/subtypes/magnetic.dm | 2 +- .../projectile/subtypes/reusable.dm | 2 +- .../projectile/subtypes/special.dm | 40 ++++----- code/modules/projectiles/unsorted/magic.dm | 24 ++--- .../chemistry/reagents/Chemistry-Topical.dm | 2 +- code/modules/shieldgen/energy_shield.dm | 8 +- code/modules/species/station/alraune.dm | 12 +-- .../species/station/standard/zaddat.dm | 2 +- .../station/station_special_abilities.dm | 18 ++-- .../species/xenomorphs/alien_facehugger.dm | 4 +- .../species/xenomorphs/alien_powers.dm | 4 +- code/modules/spells/artifacts.dm | 2 +- code/modules/surgery/bones.dm | 6 +- code/modules/surgery/encased.dm | 10 +-- code/modules/surgery/external_repair.dm | 14 +-- code/modules/surgery/face.dm | 6 +- code/modules/surgery/generic.dm | 24 ++--- code/modules/surgery/implant.dm | 2 +- code/modules/surgery/limb_reattach.dm | 6 +- code/modules/surgery/neck.dm | 12 +-- code/modules/surgery/organs_internal.dm | 10 +-- code/modules/surgery/other.dm | 18 ++-- code/modules/surgery/robotics.dm | 6 +- code/modules/tension/tension.dm | 2 +- .../sealed/mecha/components/_component.dm | 2 +- .../sealed/mecha/equipment/tools/drill.dm | 2 +- .../mecha/equipment/weapons/reticent.dm | 10 +-- code/modules/vehicles/sealed/mecha/mecha.dm | 4 +- .../modules/vehicles_legacy/Securitrain_vr.dm | 2 +- code/modules/vehicles_legacy/cargo_train.dm | 2 +- code/modules/vehicles_legacy/rover_vr.dm | 2 +- code/modules/virus2/effect.dm | 6 +- code/modules/vore/fluffstuff/custom_items.dm | 6 +- code/modules/vore/resizing/resize_vr.dm | 2 +- code/modules/xenoarcheaology/finds/special.dm | 2 +- code/modules/xenobio/items/weapons.dm | 2 +- code/modules/xenobio2/mob/slime/slime.dm | 6 +- code/unit_tests/_unit_tests.dm | 1 - code/unit_tests/medical_wounds.dm | 87 ------------------- 163 files changed, 607 insertions(+), 641 deletions(-) create mode 100644 code/__DEFINES/hardsuits/breaches.dm create mode 100644 code/__DEFINES/mobs/wounds.dm delete mode 100644 code/unit_tests/medical_wounds.dm diff --git a/citadel.dme b/citadel.dme index 4f49d0be1d81..15d9dad0a07d 100644 --- a/citadel.dme +++ b/citadel.dme @@ -216,6 +216,7 @@ #include "code\__DEFINES\fishing\aquarium.dm" #include "code\__DEFINES\fishing\fish.dm" #include "code\__DEFINES\fishing\fishing.dm" +#include "code\__DEFINES\hardsuits\breaches.dm" #include "code\__DEFINES\interface\skin.dm" #include "code\__DEFINES\interface\verbs.dm" #include "code\__DEFINES\inventory\accessories.dm" @@ -273,6 +274,7 @@ #include "code\__DEFINES\mobs\silicon_privileges.dm" #include "code\__DEFINES\mobs\sprite_accessories.dm" #include "code\__DEFINES\mobs\stat.dm" +#include "code\__DEFINES\mobs\wounds.dm" #include "code\__DEFINES\objects\objects.dm" #include "code\__DEFINES\objects\type_generation.dm" #include "code\__DEFINES\overmaps\misc.dm" diff --git a/code/__DEFINES/combat/damage.dm b/code/__DEFINES/combat/damage.dm index 32d831fed87a..f2c4aa85ff6d 100644 --- a/code/__DEFINES/combat/damage.dm +++ b/code/__DEFINES/combat/damage.dm @@ -1,18 +1,55 @@ //* This file is explicitly licensed under the MIT license. *// -//* Copyright (c) 2023 Citadel Station developers. *// +//* Copyright (c) 2024 Citadel Station Developers *// -//? damage types +//? damage types -// todo: refactor damage types +//* direct damage types; maps to most systems in the game *// -//? damage_mode bitfield +#define DAMAGE_TYPE_BRUTE "brute" +#define DAMAGE_TYPE_BURN "burn" -#define DAMAGE_MODE_SHARP (1<<0) //! sharp weapons like knives, spears, etc -#define DAMAGE_MODE_EDGE (1<<1) //! weapons with an edge, like knives, being used as such. without this, sharp = pierce -#define DAMAGE_MODE_ABLATING (1<<2) //! pulse lasers, etc, basically blows a crater -#define DAMAGE_MODE_PIERCE (1<<3) //! specifically highly-piercing weapons like bullets, even worse than sharp. -#define DAMAGE_MODE_SHRED (1<<4) //! messy, shredded wounds instead of a clean cut / pierce. strong. -#define DAMAGE_MODE_GRADUAL (1<<5) //! disallow bone breaks, ablation, etc; used for gradual sources like depressurization -#define DAMAGE_MODE_INTERNAL (1<<6) //! coming from internal; used to flag that something isn't coming through the skin. certain defenses don't work if this is set. -#define DAMAGE_MODE_REDIRECT (1<<7) //! if zone doesn't exist / etc, allow redirection -#define DAMAGE_MODE_NO_OVERFLOW (1<<8)//! temporary - re-evaluate when health is reworked. prevents damage from overflowing caps. +//* special damage types; only relevant for certain biologies *// +//* most of these will be reworked in brainmed update *// + +/// body toxins / systems instability +#define DAMAGE_TYPE_TOX "tox" +/// oxygen deprivation +#define DAMAGE_TYPE_OXY "oxy" +/// dna damage +#define DAMAGE_TYPE_CLONE "clone" +/// pain +/// todo: stamina vs pain +#define DAMAGE_TYPE_HALLOSS "halloss" + +//* special hybrid types; processed specially depending on type *// + +/// passed to electrocute_act() +/// todo: remove +#define DAMAGE_TYPE_ELECTROCUTE "electrocute" +/// bioacid ; toxins for organics, acid for synthetics +/// todo: better hybrid type handling +#define DAMAGE_TYPE_BIOACID "bioacid" +/// searing; half brute, half bur +/// todo: better hybrid type handling +#define DAMAGE_TYPE_SEARING "searing" + +//? damage_mode bitfield ?// + +/// sharp weapons like knives, spears, etc +#define DAMAGE_MODE_SHARP (1<<0) +/// weapons with an edge, like knives, being used as such. without this, sharp = pierce +#define DAMAGE_MODE_EDGE (1<<1) +/// pulse lasers, etc, basically blows a crater +#define DAMAGE_MODE_ABLATING (1<<2) +/// specifically highly-piercing weapons like bullets, even worse than sharp. +#define DAMAGE_MODE_PIERCE (1<<3) +/// messy, shredded wounds instead of a clean cut / pierce. strong. +#define DAMAGE_MODE_SHRED (1<<4) +/// disallow bone breaks, ablation, etc; used for gradual sources like depressurization +#define DAMAGE_MODE_GRADUAL (1<<5) +/// coming from internal; used to flag that something isn't coming through the skin. certain defenses don't work if this is set. +#define DAMAGE_MODE_INTERNAL (1<<6) +/// if zone doesn't exist / etc, allow redirection +#define DAMAGE_MODE_REDIRECT (1<<7) +/// temporary - re-evaluate when health is reworked. prevents damage from overflowing caps. +#define DAMAGE_MODE_NO_OVERFLOW (1<<8) diff --git a/code/__DEFINES/damage_organs.dm b/code/__DEFINES/damage_organs.dm index 2cc7e6f2e2ad..e3be801a156d 100644 --- a/code/__DEFINES/damage_organs.dm +++ b/code/__DEFINES/damage_organs.dm @@ -1,21 +1,5 @@ -// Damage things. //TODO: Merge these down to reduce on defines. -// Way to waste perfectly good damage-type names (BRUTE) on this... If you were really worried about case sensitivity, you could have just used lowertext(damagetype) in the proc. -#define BRUTE "brute" -#define BURN "fire" -#define TOX "tox" -#define OXY "oxy" -#define CLONE "clone" -#define HALLOSS "halloss" -#define ELECTROCUTE "electrocute" -#define BIOACID "bioacid" -#define SEARING "searing" - // todo: these things should be damage modes / flags -#define CUT "cut" -#define BRUISE "bruise" -#define PIERCE "pierce" - #define STUN "stun" #define WEAKEN "weaken" #define PARALYZE "paralize" diff --git a/code/__DEFINES/hardsuits/breaches.dm b/code/__DEFINES/hardsuits/breaches.dm new file mode 100644 index 000000000000..f85a76699ff0 --- /dev/null +++ b/code/__DEFINES/hardsuits/breaches.dm @@ -0,0 +1,7 @@ +//* This file is explicitly licensed under the MIT license. *// +//* Copyright (c) 2024 Citadel Station Developers *// + +//* /datum/hardsuit_breach breach_type's *// + +#define HARDSUIT_BREACH_TYPE_BRUTE "brute" +#define HARDSUIT_BREACH_TYPE_BURN "burn" diff --git a/code/__DEFINES/mobs/wounds.dm b/code/__DEFINES/mobs/wounds.dm new file mode 100644 index 000000000000..4f37f7810c67 --- /dev/null +++ b/code/__DEFINES/mobs/wounds.dm @@ -0,0 +1,10 @@ +//* This file is explicitly licensed under the MIT license. *// +//* Copyright (c) 2024 Citadel Station Developers *// + +//* Wound types *// + +#define WOUND_TYPE_CUT "cut" +#define WOUND_TYPE_PIERCE "pierce" +#define WOUND_TYPE_BRUISE "bruise" +#define WOUND_TYPE_BURN "burn" +#define WOUND_TYPE_OTHER "other" diff --git a/code/datums/components/jousting.dm b/code/datums/components/jousting.dm index f7893f5be417..538075401c65 100644 --- a/code/datums/components/jousting.dm +++ b/code/datums/components/jousting.dm @@ -50,7 +50,7 @@ var/mob/living/L = target if(damage) msg += "[user] [sharp? "impales" : "slams into"] [target] [sharp? "on" : "with"] their [parent]" - target.apply_damage(damage, BRUTE, user.zone_sel, 0) + target.apply_damage(damage, DAMAGE_TYPE_BRUTE, user.zone_sel, 0) if(prob(knockdown_chance)) msg += " and knocks [target] [target_buckled? "off of [target.buckled]" : "down"]" if(target_buckled) diff --git a/code/datums/components/mobs/block_frame.dm b/code/datums/components/mobs/block_frame.dm index bbbbedd27b3d..6994fae03789 100644 --- a/code/datums/components/mobs/block_frame.dm +++ b/code/datums/components/mobs/block_frame.dm @@ -64,7 +64,7 @@ /// ratio [0, INFINITY] of inbound damage to convert to another type var/block_transmute = 0 /// damage type to transmute to - var/block_transmute_type = HALLOSS + var/block_transmute_type = DAMAGE_TYPE_HALLOSS /// damage flag the transmuted damage counts as; null = inherit from attack /// /// * only used if block_transmute_simulation is on diff --git a/code/datums/unarmed_attack.dm b/code/datums/unarmed_attack.dm index ff6e629e7b91..d79226557072 100644 --- a/code/datums/unarmed_attack.dm +++ b/code/datums/unarmed_attack.dm @@ -21,7 +21,7 @@ GLOBAL_LIST_EMPTY(unarmed_attack_cache) /// damage tier var/damage_tier = MELEE_TIER_UNARMED_DEFAULT /// damage type - var/damage_type = BRUTE + var/damage_type = DAMAGE_TYPE_BRUTE /// damage flag var/damage_flag = ARMOR_MELEE /// flat damage buff when attacking structures @@ -327,4 +327,4 @@ GLOBAL_LIST_EMPTY(unarmed_attack_cache) attack_verb_legacy = list("tapped", "lightly struck") damage = 5 damage_mode = NONE - damage_type = AGONY + damage_type = DAMAGE_TYPE_HALLOSS diff --git a/code/game/atoms/atom-damage.dm b/code/game/atoms/atom-damage.dm index 61ebc475db1c..20600bac4cfe 100644 --- a/code/game/atoms/atom-damage.dm +++ b/code/game/atoms/atom-damage.dm @@ -62,8 +62,8 @@ if(inflict_damage_type_special(args)) return switch(damage_type) - if(BRUTE) - if(BURN) + if(DAMAGE_TYPE_BRUTE) + if(DAMAGE_TYPE_BURN) else return // normal atoms can't take non brute-burn damage // default atom damage handling diff --git a/code/game/atoms/atom-defense.dm b/code/game/atoms/atom-defense.dm index 3f2f7141d7be..0ee92140df2c 100644 --- a/code/game/atoms/atom-defense.dm +++ b/code/game/atoms/atom-defense.dm @@ -160,13 +160,13 @@ . = hitsound_override(I.damtype, I.damage_mode, ATTACK_TYPE_MELEE, I) if(.) return - . = (I.damtype == BURN? hit_sound_burn : hit_sound_brute) || I.attack_sound + . = (I.damtype == DAMAGE_TYPE_BURN? hit_sound_burn : hit_sound_brute) || I.attack_sound if(.) return switch(I.damtype) - if(BRUTE) + if(DAMAGE_TYPE_BRUTE) return "swing_hit" - if(BURN) + if(DAMAGE_TYPE_BURN) return "'sound/items/welder.ogg" else return "swing_hit" @@ -185,13 +185,13 @@ . = hitsound_override(I.damtype, I.damage_mode, ATTACK_TYPE_THROWN, I) if(.) return - . = (I.damtype == BURN? hit_sound_burn : hit_sound_brute) || I.attack_sound + . = (I.damtype == DAMAGE_TYPE_BURN? hit_sound_burn : hit_sound_brute) || I.attack_sound if(.) return switch(I.damtype) - if(BRUTE) + if(DAMAGE_TYPE_BRUTE) return "swing_hit" - if(BURN) + if(DAMAGE_TYPE_BURN) return 'sound/items/welder.ogg' else return "swing_hit" @@ -202,7 +202,7 @@ if(.) return // todo: way to override this from style side? we don't just want hitsound brute/burn. - . = (style.damage_type == BURN? hit_sound_burn : hit_sound_brute) || style.attack_sound + . = (style.damage_type == DAMAGE_TYPE_BURN? hit_sound_burn : hit_sound_brute) || style.attack_sound //* Armor *// diff --git a/code/game/gamemodes/cult/construct_spells.dm b/code/game/gamemodes/cult/construct_spells.dm index 9009e8183ff4..aeeff476bc82 100644 --- a/code/game/gamemodes/cult/construct_spells.dm +++ b/code/game/gamemodes/cult/construct_spells.dm @@ -570,7 +570,7 @@ icon_state = "invert" fire_sound = 'sound/weapons/spiderlunge.ogg' damage_force = 15 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN damage_flag = ARMOR_LASER armor_penetration = 60 light_range = 2 diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm index 0b1fd4839a0d..ca3ed22aa694 100644 --- a/code/game/gamemodes/cult/cult_items.dm +++ b/code/game/gamemodes/cult/cult_items.dm @@ -29,7 +29,7 @@ var/obj/item/organ/external/affecting = H.get_organ(zone) to_chat(user, "An inexplicable force rips through your [affecting.name], tearing the sword from your grasp!") //random amount of damage between half of the blade's force and the full force of the blade. - H.apply_damage(rand(damage_force/2, damage_force), BRUTE, zone, 0, sharp=1, edge=1) + H.apply_damage(rand(damage_force/2, damage_force), DAMAGE_TYPE_BRUTE, zone, 0, sharp=1, edge=1) H.afflict_paralyze(20 * 5) else if(!istype(user, /mob/living/simple_mob/construct)) to_chat(user, "An inexplicable force rips through you, tearing the sword from your grasp!") diff --git a/code/game/gamemodes/technomancer/spells/projectile/chain_lightning.dm b/code/game/gamemodes/technomancer/spells/projectile/chain_lightning.dm index 75160bb02526..0a20eab1dbcd 100644 --- a/code/game/gamemodes/technomancer/spells/projectile/chain_lightning.dm +++ b/code/game/gamemodes/technomancer/spells/projectile/chain_lightning.dm @@ -24,7 +24,7 @@ name = "lightning" icon_state = "lightning" nodamage = 1 - damage_type = HALLOSS + damage_type = DAMAGE_TYPE_HALLOSS muzzle_type = /obj/effect/projectile/muzzle/lightning tracer_type = /obj/effect/projectile/tracer/lightning diff --git a/code/game/gamemodes/technomancer/spells/projectile/force_missile.dm b/code/game/gamemodes/technomancer/spells/projectile/force_missile.dm index e3dde15402b2..fc658b4d62a0 100644 --- a/code/game/gamemodes/technomancer/spells/projectile/force_missile.dm +++ b/code/game/gamemodes/technomancer/spells/projectile/force_missile.dm @@ -23,5 +23,5 @@ name = "force missile" icon_state = "force_missile" damage_force = 25 - damage_type = BRUTE + damage_type = DAMAGE_TYPE_BRUTE damage_flag = ARMOR_MELEE diff --git a/code/game/gamemodes/technomancer/spells/projectile/lightning.dm b/code/game/gamemodes/technomancer/spells/projectile/lightning.dm index 58e3bd19292d..028d34ec997a 100644 --- a/code/game/gamemodes/technomancer/spells/projectile/lightning.dm +++ b/code/game/gamemodes/technomancer/spells/projectile/lightning.dm @@ -24,7 +24,7 @@ name = "lightning" icon_state = "lightning" nodamage = 1 - damage_type = HALLOSS + damage_type = DAMAGE_TYPE_HALLOSS muzzle_type = /obj/effect/projectile/muzzle/lightning tracer_type = /obj/effect/projectile/tracer/lightning diff --git a/code/game/gamemodes/technomancer/spells/projectile/overload.dm b/code/game/gamemodes/technomancer/spells/projectile/overload.dm index 1265fa409bce..ad79e0c43ddb 100644 --- a/code/game/gamemodes/technomancer/spells/projectile/overload.dm +++ b/code/game/gamemodes/technomancer/spells/projectile/overload.dm @@ -25,7 +25,7 @@ /obj/projectile/overload name = "overloaded bolt" icon_state = "bluespace" - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN armor_penetration = 100 /obj/item/spell/projectile/overload/make_projectile(obj/projectile/projectile_type, mob/living/user) diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index c75979412d70..2289941aeca9 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -187,7 +187,7 @@ damage_mode = DAMAGE_MODE_SHARP, weapon_descriptor = "a needle", ) - chosen_limb.create_wound(CUT, 5) + chosen_limb.create_wound(WOUND_TYPE_CUT, 5) detach_iv() return PROCESS_KILL diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index a0b957a07837..abe9012a0b59 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -192,9 +192,9 @@ src.loc = O.owner ? O.owner.loc : O.loc src.visible_message("\A [src] makes its way out of [O.owner ? "[O.owner]'s [O.name]" : "\the [O]"]!") if(O.owner) - O.owner.apply_damage(1, BRUTE, O.organ_tag) + O.owner.apply_damage(1, DAMAGE_TYPE_BRUTE, O.organ_tag) else if(prob(1)) - O.owner.apply_damage(1, TOX, O.organ_tag) + O.owner.apply_damage(1, DAMAGE_TYPE_TOX, O.organ_tag) if(world.time > last_itch + 30 SECONDS) last_itch = world.time to_chat(O.owner, "Your [O.name] itches...") diff --git a/code/game/objects/effects/traps.dm b/code/game/objects/effects/traps.dm index 42855a8026c5..e956add738ae 100644 --- a/code/game/objects/effects/traps.dm +++ b/code/game/objects/effects/traps.dm @@ -184,7 +184,7 @@ Add those other swinging traps you mentioned above! else if(istype(AM, /mob/living)) var/mob/living/M = AM var/damage = rand(min_damage, max_damage) - M.apply_damage(damage, BRUTE) + M.apply_damage(damage, DAMAGE_TYPE_BRUTE) M.visible_message("[M] falls onto a punji stake!", \ "You slide onto a punji stake!") @@ -282,7 +282,7 @@ Add those other swinging traps you mentioned above! else if(istype(AM, /mob/living)) var/mob/living/M = AM var/damage = rand(min_damage, max_damage) - M.apply_damage(damage, TOX) + M.apply_damage(damage, DAMAGE_TYPE_TOX) M.set_stunned(20 * 15) M.visible_message("[M] falls into a writhing mass of tentacles!", \ "You are entwined by a writhing mass of tentacles!") @@ -509,7 +509,7 @@ Add those other swinging traps you mentioned above! else if(istype(AM, /mob/living)) var/mob/living/M = AM var/damage = rand(min_damage, max_damage) - M.apply_damage(damage, BRUTE) + M.apply_damage(damage, DAMAGE_TYPE_BRUTE) M.visible_message("[M] is stabbed by the rising spears!", \ "You are impaled by a thrusting spear!") @@ -546,7 +546,7 @@ Add those other swinging traps you mentioned above! var/list/target_limbs = list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT) var/selected = pick(target_limbs) var/obj/item/organ/external/target = M.get_organ(selected) - M.apply_damage(damage, BRUTE) + M.apply_damage(damage, DAMAGE_TYPE_BRUTE) target.droplimb() M.visible_message("[M] is slashed by the spinning blades!", \ "You are slashed by the spinning blades!") @@ -562,7 +562,7 @@ if (istype(AM, /mob/living)) /obj/effect/trap/pop_up/pillar/process(atom/AM as mob|obj) var/mob/living/M = AM var/damage = rand(min_damage, max_damage) - M.apply_damage(damage, BRUTE) + M.apply_damage(damage, DAMAGE_TYPE_BRUTE) /obj/effect/trap/pop_up/pillar/Destroy() STOP_PROCESSING(SSprocess_5fps, src) @@ -602,7 +602,7 @@ if (istype(AM, /mob/living)) var/list/target_limbs = list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT) var/selected = pick(target_limbs) var/obj/item/organ/external/target = M.get_organ(selected) - M.apply_damage(damage, BRUTE) + M.apply_damage(damage, DAMAGE_TYPE_BRUTE) target.droplimb() M.visible_message("[M] is ripped by the whirling sawblades!", \ "You are ripped open by the whirling sawblades!") @@ -637,7 +637,7 @@ if (istype(AM, /mob/living)) else if(istype(AM, /mob/living)) var/mob/living/M = AM var/damage = rand(min_damage, max_damage) - M.apply_damage(damage, BURN) + M.apply_damage(damage, DAMAGE_TYPE_BURN) M.adjust_fire_stacks(2) M.IgniteMob() M.visible_message("[M] is engulfed in flames!", \ @@ -789,7 +789,7 @@ if (istype(AM, /mob/living)) var/selected = pick(bone_sites) var/obj/item/organ/external/target = M.get_organ(selected) var/head_slot = SLOT_HEAD - M.apply_damage(damage, BRUTE) + M.apply_damage(damage, DAMAGE_TYPE_BRUTE) target.fracture() M.throw_at_old(T2, 1, 1, src) if(!head_slot || !(istype(head_slot,/obj/item/clothing/head/helmet) || istype(head_slot,/obj/item/clothing/head/hardhat))) diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index ca79da65190d..20fdc2dde995 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -1018,7 +1018,7 @@ GLOBAL_LIST_EMPTY(PDAs) if(i>=10 && i<= 20) //The PDA burns a hole in the holder. j=1 if(M && isliving(M)) - M.apply_damage( rand(30,60) , BURN) + M.apply_damage( rand(30,60) , DAMAGE_TYPE_BURN) message += "You feel a searing heat! Your [P] is burning!" if(i>=20 && i<=25) //EMP empulse(P.loc, 1, 2, 4, 6, 1) diff --git a/code/game/objects/items/devices/defib.dm b/code/game/objects/items/devices/defib.dm index b657b547ca10..4e05b9fb44b1 100644 --- a/code/game/objects/items/devices/defib.dm +++ b/code/game/objects/items/devices/defib.dm @@ -409,7 +409,7 @@ playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0) return - H.apply_damage(burn_damage_amt, BURN, BP_TORSO) + H.apply_damage(burn_damage_amt, DAMAGE_TYPE_BURN, BP_TORSO) //set oxyloss so that the patient is just barely in crit, if possible var/barely_in_crit = config_legacy.health_threshold_crit - 1 diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index 755fa38bf179..92c305c88cbd 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -203,7 +203,7 @@ H.eye_blurry = max(H.eye_blurry, flash_strength + 5) H.flash_eyes() H.adjustHalLoss(halloss_per_flash * (flash_strength / 5)) // Should take four flashes to stun. - H.apply_damage(10 * (H.species.flash_burn / 5), BURN, BP_HEAD, 0, 0, "Photon burns") + H.apply_damage(10 * (H.species.flash_burn / 5), DAMAGE_TYPE_BURN, BP_HEAD, 0, 0, "Photon burns") else flashfail = 1 diff --git a/code/game/objects/items/melee/types/transforming/energy/axe.dm b/code/game/objects/items/melee/types/transforming/energy/axe.dm index 42d6e7be1c9a..1bbb22023857 100644 --- a/code/game/objects/items/melee/types/transforming/energy/axe.dm +++ b/code/game/objects/items/melee/types/transforming/energy/axe.dm @@ -18,7 +18,7 @@ active_damage_force = 60 active_throw_force = 35 active_weight_class = WEIGHT_CLASS_HUGE - active_damage_type = SEARING + active_damage_type = DAMAGE_TYPE_SEARING /obj/item/melee/transforming/energy/axe/on_activate(datum/event_args/actor/actor, silent) . = ..() diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index e39b4b3fb6c8..13cedf6faf38 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -192,7 +192,7 @@ user.visible_message("\The [user] bandages \a [W.desc] on [H]'s [affecting.name].", \ "You bandage \a [W.desc] on [H]'s [affecting.name]." ) //H.add_side_effect("Itch") - else if (W.damage_type == BRUISE) + else if (W.wound_type == WOUND_TYPE_BRUISE) user.visible_message("\The [user] places a bruise patch over \a [W.desc] on [H]'s [affecting.name].", \ "You place a bruise patch over \a [W.desc] on [H]'s [affecting.name]." ) else @@ -295,7 +295,7 @@ if (W.current_stage <= W.max_bleeding_stage) user.visible_message("\The [user] cleans \a [W.desc] on [M]'s [affecting.name] and seals the edges with bioglue.", \ "You clean and seal \a [W.desc] on [M]'s [affecting.name]." ) - else if (W.damage_type == BRUISE) + else if (W.wound_type == WOUND_TYPE_BRUISE) user.visible_message("\The [user] places a medical patch over \a [W.desc] on [M]'s [affecting.name].", \ "You place a medical patch over \a [W.desc] on [M]'s [affecting.name]." ) else @@ -502,7 +502,7 @@ user.visible_message("\The [user] covers \a [W.desc] on [H]'s [affecting.name].", \ "You cover \a [W.desc] on [H]'s [affecting.name]." ) //H.add_side_effect("Itch") - else if (W.damage_type == BRUISE) + else if (W.wound_type == WOUND_TYPE_BRUISE) user.visible_message("\The [user] spreads the poultice over \a [W.desc] on [H]'s [affecting.name].", \ "You spread the poultice over \a [W.desc] on [H]'s [affecting.name]." ) else diff --git a/code/game/objects/items/stream_projector/medichine.dm b/code/game/objects/items/stream_projector/medichine.dm index 5ab66a2b6ad3..a8f4146766cc 100644 --- a/code/game/objects/items/stream_projector/medichine.dm +++ b/code/game/objects/items/stream_projector/medichine.dm @@ -714,7 +714,7 @@ GLOBAL_LIST_EMPTY(medichine_cell_datums) continue if(only_open && (wound.is_treated())) continue - if(wound.damage_type == BURN) + if(wound.wound_type == WOUND_TYPE_BURN) burn_loss_instances++ else brute_loss_instances++ @@ -727,7 +727,7 @@ GLOBAL_LIST_EMPTY(medichine_cell_datums) var/brute_heal_overrun = 0 for(var/datum/wound/wound as anything in wounds_healing) var/effective_heal - if(wound.damage_type == BURN) + if(wound.wound_type == WOUND_TYPE_BURN) if(!burn_healing_left) continue effective_heal = min(burn_heal_per + burn_heal_overrun, burn_healing_left) diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm index 9811dbc5c85c..adf07cc03b87 100644 --- a/code/game/objects/items/tools/weldingtool.dm +++ b/code/game/objects/items/tools/weldingtool.dm @@ -77,7 +77,7 @@ to_chat(user, "You'll need to turn [src] on to patch the damage on [H]'s [S.name]!") return NONE - if(S.robo_repair(15, BRUTE, "some dents", src, user)) + if(S.robo_repair(15, DAMAGE_TYPE_BRUTE, "some dents", src, user)) remove_fuel(1, user) return NONE return ..() diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index 58db3effd425..b2f43649dee3 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -631,9 +631,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM to_chat(user, "You burn yourself while lighting the lighter.") var/mob/living/carbon/human/H = ishuman(user)? user : null if (user.get_held_item_of_index(1) == src) - H?.apply_damage(2,BURN,"l_hand") + H?.apply_damage(2,DAMAGE_TYPE_BURN,"l_hand") else - H?.apply_damage(2,BURN,"r_hand") + H?.apply_damage(2,DAMAGE_TYPE_BURN,"r_hand") user.visible_message("After a few attempts, [user] manages to light the [src], they however burn their finger in the process.") set_light(2) diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index 95c12557d517..14dfd71099db 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -68,7 +68,7 @@ if(istype(M,/mob/living)) var/mob/living/L = M L.afflict_radiation(RAD_MOB_AFFLICT_DNA_INJECTOR) - L.apply_damage(max(2,L.getCloneLoss()), CLONE) + L.apply_damage(max(2,L.getCloneLoss()), DAMAGE_TYPE_CLONE) if (!(MUTATION_NOCLONE in M.mutations)) // prevents drained people from having their DNA changed if (buf.types & DNA2_BUF_UI) diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 92769892f314..91df076469df 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -61,7 +61,7 @@ ) else var/mob/living/M = imp_in - M.apply_damage(15,BURN) + M.apply_damage(15,DAMAGE_TYPE_BURN) name = "melted implant" desc = "Charred circuit in melted plastic case. Wonder what that used to be..." icon_state = "implant_melted" @@ -260,7 +260,7 @@ Implant Specifics:
"} if (istype(part,/obj/item/organ/external/chest) || \ istype(part,/obj/item/organ/external/groin) || \ istype(part,/obj/item/organ/external/head)) - part.create_wound(BRUISE, 80) //mangle them instead + part.create_wound(WOUND_TYPE_BRUISE, 80) //mangle them instead explosion(get_turf(imp_in), -1, -1, 1, 3) qdel(src) else @@ -336,7 +336,7 @@ Implant Specifics:
"} if (istype(part,/obj/item/organ/external/chest) || \ istype(part,/obj/item/organ/external/groin) || \ istype(part,/obj/item/organ/external/head)) - part.create_wound(BRUISE, 80) //mangle them instead + part.create_wound(WOUND_TYPE_BRUISE, 80) //mangle them instead else part.droplimb(0,DROPLIMB_BLUNT) explosion(get_turf(imp_in), -1, -1, 1, 3) diff --git a/code/game/objects/items/weapons/material/shards.dm b/code/game/objects/items/weapons/material/shards.dm index 10d09ba0951c..2ef03eb8add6 100644 --- a/code/game/objects/items/weapons/material/shards.dm +++ b/code/game/objects/items/weapons/material/shards.dm @@ -89,11 +89,11 @@ if(gloves && !protected_hands) to_chat(user, "\The [src] partially cuts into your hand through your gloves as you hit \the [target]!") - user.apply_damage(light_glove_d + will_break ? break_damage : 0, BRUTE, active_hand, 0, 0, src, src.sharp || (damage_mode & DAMAGE_MODE_SHARP), src.edge || (damage_mode & DAMAGE_MODE_EDGE)) // Ternary to include break damage + user.apply_damage(light_glove_d + will_break ? break_damage : 0, DAMAGE_TYPE_BRUTE, active_hand, 0, 0, src, src.sharp || (damage_mode & DAMAGE_MODE_SHARP), src.edge || (damage_mode & DAMAGE_MODE_EDGE)) // Ternary to include break damage else if(!gloves) to_chat(user, "\The [src] cuts into your hand as you hit \the [target]!") - user.apply_damage(no_glove_d + will_break ? break_damage : 0, BRUTE, active_hand, 0, 0, src, src.sharp || (damage_mode & DAMAGE_MODE_SHARP), src.edge || (damage_mode & DAMAGE_MODE_EDGE)) + user.apply_damage(no_glove_d + will_break ? break_damage : 0, DAMAGE_TYPE_BRUTE, active_hand, 0, 0, src, src.sharp || (damage_mode & DAMAGE_MODE_SHARP), src.edge || (damage_mode & DAMAGE_MODE_EDGE)) if(will_break && src.loc == user) // If it's not in our hand anymore user.visible_message("[user] hit \the [target] with \the [src], shattering it!", "You shatter \the [src] in your hand!") diff --git a/code/game/objects/items/weapons/nullrod.dm b/code/game/objects/items/weapons/nullrod.dm index ce93b1ee66b2..97a0eb0fd077 100644 --- a/code/game/objects/items/weapons/nullrod.dm +++ b/code/game/objects/items/weapons/nullrod.dm @@ -109,7 +109,7 @@ item_state = "disintegrate" name = "god hand" desc = "This hand of yours glows with an awesome power!" - damtype = BURN + damtype = DAMAGE_TYPE_BURN attack_verb = list("punched", "cross countered", "pummeled") /obj/item/nullrod/godhand/Initialize(mapload) diff --git a/code/game/objects/items/weapons/surgery_tools.dm b/code/game/objects/items/weapons/surgery_tools.dm index 56f995b1a259..fb75f705c9a6 100644 --- a/code/game/objects/items/weapons/surgery_tools.dm +++ b/code/game/objects/items/weapons/surgery_tools.dm @@ -162,7 +162,7 @@ icon_state = "adv_saw" item_state = "saw3" attack_sound = 'sound/weapons/emitter2.ogg' - damtype = SEARING + damtype = DAMAGE_TYPE_SEARING w_class = WEIGHT_CLASS_BULKY origin_tech = list(TECH_BIO = 4, TECH_MATERIAL = 6, TECH_MAGNET = 6) materials_base = list(MAT_STEEL = 12500) diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index b5c7a599daa3..c04b902bdcdd 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -26,7 +26,7 @@ user.afflict_paralyze(20 * 3 * damage_force) if(ishuman(user)) var/mob/living/carbon/human/H = user - H.apply_damage(2*damage_force, BRUTE, BP_HEAD) + H.apply_damage(2*damage_force, DAMAGE_TYPE_BRUTE, BP_HEAD) else L.take_random_targeted_damage(brute = 2*damage_force) return @@ -105,7 +105,7 @@ user.afflict_paralyze(20 * 3 * damage_force) if(ishuman(user)) var/mob/living/carbon/human/H = user - H.apply_damage(2*damage_force, BRUTE, BP_HEAD) + H.apply_damage(2*damage_force, DAMAGE_TYPE_BRUTE, BP_HEAD) else if(isliving(user)) var/mob/living/L = user L.take_random_targeted_damage(brute = 2*damage_force) @@ -114,7 +114,7 @@ var/old_attack_verb = attack_verb var/old_force = damage_force if(user.a_intent != INTENT_HARM) - damtype = HALLOSS + damtype = DAMAGE_TYPE_HALLOSS attack_verb = list("suppressed") damage_force = on_pain_force . = ..() @@ -221,7 +221,7 @@ desc = "A training sword made of wood and shaped like a katana." icon_state = "bokken" slot_flags = SLOT_BELT | SLOT_BACK - damtype = HALLOSS + damtype = DAMAGE_TYPE_HALLOSS damage_force = 5 throw_force = 5 attack_verb = list("whacked", "smacked", "struck") @@ -351,7 +351,7 @@ desc = "A heavy wooden club reinforced with metal studs. Ancient Terran Oni were often depicted carrying this weapon." icon_state = "kanabo" slot_flags = SLOT_BACK - damtype = BRUTE + damtype = DAMAGE_TYPE_BRUTE damage_force = 15 throw_force = 5 attack_verb = list("battered", "hammered", "struck") diff --git a/code/game/objects/items/weapons/traps.dm b/code/game/objects/items/weapons/traps.dm index 100a837531d8..a56cd093b593 100644 --- a/code/game/objects/items/weapons/traps.dm +++ b/code/game/objects/items/weapons/traps.dm @@ -128,7 +128,7 @@ if(soaked >= 30) return - if(!L.apply_damage(trap_damage, BRUTE, target_zone, blocked, soaked, used_weapon=src)) + if(!L.apply_damage(trap_damage, DAMAGE_TYPE_BRUTE, target_zone, blocked, soaked, used_weapon=src)) return 0 //trap the victim in place diff --git a/code/game/objects/obj-defense.dm b/code/game/objects/obj-defense.dm index 4bbfcff3a177..d8046405874a 100644 --- a/code/game/objects/obj-defense.dm +++ b/code/game/objects/obj-defense.dm @@ -5,13 +5,13 @@ . = ..() // todo: wave explosions // no named arguments for speed reasons - run_damage_instance(power * (1 / 2.5) * (0.01 * rand(80, 120)), BRUTE, null, ARMOR_BOMB) + run_damage_instance(power * (1 / 2.5) * (0.01 * rand(80, 120)), DAMAGE_TYPE_BRUTE, null, ARMOR_BOMB) /obj/legacy_ex_act(severity, target) . = ..() // todo: wave explosions // no named arguments for speed reasons - run_damage_instance(global._legacy_ex_atom_damage[severity] * (0.01 * rand(80, 120)), BRUTE, null, ARMOR_BOMB) + run_damage_instance(global._legacy_ex_atom_damage[severity] * (0.01 * rand(80, 120)), DAMAGE_TYPE_BRUTE, null, ARMOR_BOMB) /obj/melee_act(mob/user, obj/item/weapon, target_zone, datum/event_args/actor/clickchain/clickchain) var/shieldcall_returns = atom_shieldcall_handle_item_melee(weapon, clickchain, FALSE, NONE) @@ -96,7 +96,7 @@ /obj/hitsound_melee(obj/item/I) if(!isnull(material_primary)) var/datum/material/primary = get_primary_material() - . = I.damtype == BURN? primary.sound_melee_burn : primary.sound_melee_brute + . = I.damtype == DAMAGE_TYPE_BURN? primary.sound_melee_burn : primary.sound_melee_brute if(!isnull(.)) return return ..() @@ -104,7 +104,7 @@ /obj/hitsound_throwhit(obj/item/I) if(!isnull(material_primary)) var/datum/material/primary = get_primary_material() - . = I.damtype == BURN? primary.sound_melee_burn : primary.sound_melee_brute + . = I.damtype == DAMAGE_TYPE_BURN? primary.sound_melee_burn : primary.sound_melee_brute if(!isnull(.)) return return ..() @@ -112,7 +112,7 @@ /obj/hitsound_unarmed(mob/M, datum/unarmed_attack/style) if(!isnull(material_primary)) var/datum/material/primary = get_primary_material() - . = style.damage_type == BURN? primary.sound_melee_burn : primary.sound_melee_brute + . = style.damage_type == DAMAGE_TYPE_BURN? primary.sound_melee_burn : primary.sound_melee_brute if(!isnull(.)) return return ..() diff --git a/code/game/objects/structures/charge_pylon.dm b/code/game/objects/structures/charge_pylon.dm index 0225508a2b7e..54e2af1d521c 100644 --- a/code/game/objects/structures/charge_pylon.dm +++ b/code/game/objects/structures/charge_pylon.dm @@ -29,7 +29,7 @@ H.nutrition = 400 return if(isrobot(user)) - user.apply_damage(80, BURN, def_zone = BP_TORSO) + user.apply_damage(80, DAMAGE_TYPE_BURN, def_zone = BP_TORSO) visible_message("Electricity arcs off [user] as it touches \the [src]!") to_chat(user, "You detect damage to your components!") else if(istype(H) && H.species.get_species_id() != SPECIES_ID_ADHERENT) diff --git a/code/game/objects/structures/cliff.dm b/code/game/objects/structures/cliff.dm index f649caacdfc3..74b08f80cc4e 100644 --- a/code/game/objects/structures/cliff.dm +++ b/code/game/objects/structures/cliff.dm @@ -211,7 +211,7 @@ two tiles on initialization, and which way a cliff is facing may change during m var/blocked = L.run_armor_check(target_zone, "melee") * harm var/soaked = L.get_armor_soak(target_zone, "melee") * harm - L.apply_damage(damage * harm, BRUTE, target_zone, blocked, soaked, used_weapon=src) + L.apply_damage(damage * harm, DAMAGE_TYPE_BRUTE, target_zone, blocked, soaked, used_weapon=src) // Now fall off more cliffs below this one if they exist. var/obj/structure/cliff/bottom_cliff = locate() in T diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 42913bb46872..e5eac07358da 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -262,7 +262,7 @@ ..() /obj/structure/closet/crate/secure/on_bullet_act(obj/projectile/proj, impact_flags, list/bullet_act_args) - if(!(proj.damage_type == BRUTE || proj.damage_type == BURN)) + if(!(proj.damage_type == DAMAGE_TYPE_BRUTE || proj.damage_type == DAMAGE_TYPE_BURN)) return ..() if(locked && tamper_proof && integrity <= proj.damage_force) diff --git a/code/game/objects/structures/femur_breaker.dm b/code/game/objects/structures/femur_breaker.dm index 36253a9b3fd9..cde262d7935c 100644 --- a/code/game/objects/structures/femur_breaker.dm +++ b/code/game/objects/structures/femur_breaker.dm @@ -75,7 +75,7 @@ /obj/structure/femur_breaker/proc/damage_leg(mob/living/carbon/human/H) var/where_we_snappin_boys = pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG) H.emote("scream") - H.apply_damage(150, BRUTE, where_we_snappin_boys) + H.apply_damage(150, DAMAGE_TYPE_BRUTE, where_we_snappin_boys) var/obj/item/bodypart/cracka = H.get_bodypart(where_we_snappin_boys) if(cracka) var/datum/wound/blunt/critical/cracka_lackin = new diff --git a/code/game/objects/structures/guillotine.dm b/code/game/objects/structures/guillotine.dm index 308a2c1b7f52..e041405b267d 100644 --- a/code/game/objects/structures/guillotine.dm +++ b/code/game/objects/structures/guillotine.dm @@ -142,7 +142,7 @@ addtimer(CALLBACK(C, TYPE_PROC_REF(/mob, emote), "clap"), delay_offset * 0.3) delay_offset++ else - H.apply_damage(15 * blade_sharpness, BRUTE, head) + H.apply_damage(15 * blade_sharpness, DAMAGE_TYPE_BRUTE, head) log_combat(user, H, "dropped the blade on", src, " non-fatally") H.emote("scream") diff --git a/code/game/objects/structures/medical_stand_vr.dm b/code/game/objects/structures/medical_stand_vr.dm index ee4ca93c4d39..910971c630c4 100644 --- a/code/game/objects/structures/medical_stand_vr.dm +++ b/code/game/objects/structures/medical_stand_vr.dm @@ -155,7 +155,7 @@ if(!do_mob(usr, target, 50)) usr.visible_message("\The [usr]'s hand slips and pricks \the [target].", "Your hand slips and pricks \the [target].") - target.apply_damage(3, BRUTE, pick(BP_R_ARM, BP_L_ARM)) + target.apply_damage(3, DAMAGE_TYPE_BRUTE, pick(BP_R_ARM, BP_L_ARM)) return usr.visible_message("\The [usr] hooks \the [target] up to \the [src].", "You hook \the [target] up to \the [src].") @@ -393,7 +393,7 @@ if(attached) if(!Adjacent(attached)) visible_message("The needle is ripped out of [src.attached], doesn't that hurt?") - attached.apply_damage(3, BRUTE, pick(BP_R_ARM, BP_L_ARM)) + attached.apply_damage(3, DAMAGE_TYPE_BRUTE, pick(BP_R_ARM, BP_L_ARM)) attached = null update_icon() diff --git a/code/game/objects/structures/props/projectile_lock.dm b/code/game/objects/structures/props/projectile_lock.dm index bc4437f1a23a..505cc3b263b2 100644 --- a/code/game/objects/structures/props/projectile_lock.dm +++ b/code/game/objects/structures/props/projectile_lock.dm @@ -48,7 +48,7 @@ if(timing) return PROJECTILE_IMPACT_DELETE - if(istype(proj, /obj/projectile/beam/heavylaser/cannon) || istype(proj, /obj/projectile/beam/emitter) || (proj.damage_force >= 80 && proj.damtype == BURN)) + if(istype(proj, /obj/projectile/beam/heavylaser/cannon) || istype(proj, /obj/projectile/beam/emitter) || (proj.damage_force >= 80 && proj.damtype == DAMAGE_TYPE_BURN)) toggle_lock() visible_message("\The [src] [enabled ? "disengages" : "engages"] its locking mechanism.") diff --git a/code/game/objects/structures/props/puzzledoor.dm b/code/game/objects/structures/props/puzzledoor.dm index d3e25d3acf8b..951eb64f86dc 100644 --- a/code/game/objects/structures/props/puzzledoor.dm +++ b/code/game/objects/structures/props/puzzledoor.dm @@ -77,7 +77,7 @@ else if(src.density && (user.a_intent == INTENT_HARM)) var/obj/item/W = C user.setClickCooldown(user.get_attack_speed(W)) - if(W.damtype == BRUTE || W.damtype == BURN) + if(W.damtype == DAMAGE_TYPE_BRUTE || W.damtype == DAMAGE_TYPE_BURN) user.do_attack_animation(src) user.visible_message("\The [user] hits \the [src] with \the [W] with no visible effect.") diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index ebae37616894..6810f3fe6fa1 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -290,7 +290,7 @@ occupant.apply_effect(6, STUN, blocked) occupant.apply_effect(6, WEAKEN, blocked) occupant.apply_effect(6, STUTTER, blocked) - occupant.apply_damage(10, BRUTE, def_zone, blocked, soaked) + occupant.apply_damage(10, DAMAGE_TYPE_BRUTE, def_zone, blocked, soaked) playsound(src.loc, 'sound/weapons/punch1.ogg', 50, 1, -1) if(istype(A, /mob/living)) var/mob/living/victim = A @@ -300,7 +300,7 @@ victim.apply_effect(6, STUN, blocked) victim.apply_effect(6, WEAKEN, blocked) victim.apply_effect(6, STUTTER, blocked) - victim.apply_damage(10, BRUTE, def_zone, blocked, soaked) + victim.apply_damage(10, DAMAGE_TYPE_BRUTE, def_zone, blocked, soaked) occupant.visible_message("[occupant] crashed into \the [A]!") /obj/structure/bed/chair/office/light diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm index 6f38a4dd187c..39d5dd6ba358 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm @@ -140,7 +140,7 @@ occupant.apply_effect(6, STUN, blocked) occupant.apply_effect(6, WEAKEN, blocked) occupant.apply_effect(6, STUTTER, blocked) - occupant.apply_damage(10, BRUTE, def_zone, soaked) + occupant.apply_damage(10, DAMAGE_TYPE_BRUTE, def_zone, soaked) playsound(src.loc, 'sound/weapons/punch1.ogg', 50, 1, -1) if(istype(A, /mob/living)) var/mob/living/victim = A @@ -150,7 +150,7 @@ victim.apply_effect(6, STUN, blocked) victim.apply_effect(6, WEAKEN, blocked) victim.apply_effect(6, STUTTER, blocked) - victim.apply_damage(10, BRUTE, def_zone, soaked) + victim.apply_damage(10, DAMAGE_TYPE_BRUTE, def_zone, soaked) if(pulling_along) occupant.visible_message("[pulling_along] has thrusted \the [name] into \the [A], throwing \the [occupant] out of it!") diff --git a/code/game/objects/stumble_into_vr.dm b/code/game/objects/stumble_into_vr.dm index aa2eb4cbbab1..637495853523 100644 --- a/code/game/objects/stumble_into_vr.dm +++ b/code/game/objects/stumble_into_vr.dm @@ -2,7 +2,7 @@ playsound(get_turf(M), "punch", 25, 1, -1) visible_message("[M] [pick("ran", "slammed")] into \the [src]!") to_chat(M, "You just [pick("ran", "slammed")] into \the [src]!") - M.apply_damage(5, BRUTE) + M.apply_damage(5, DAMAGE_TYPE_BRUTE) M.afflict_paralyze(20 * 2) M.stop_flying() @@ -15,7 +15,7 @@ else playsound(get_turf(src), 'sound/weapons/tablehit1.ogg', 25, 1, -1) visible_message("[M] flopped onto \the [src]!") - M.apply_damage(5, BRUTE) + M.apply_damage(5, DAMAGE_TYPE_BRUTE) M.afflict_paralyze(20 * 2) M.forceMove(get_turf(src)) M.stop_flying() @@ -23,7 +23,7 @@ /obj/machinery/disposal/stumble_into(mob/living/M) playsound(get_turf(src), 'sound/effects/clang.ogg', 25, 1, -1) visible_message("[M] [pick("tripped", "stumbled")] into \the [src]!") - M.apply_damage(5, BRUTE) + M.apply_damage(5, DAMAGE_TYPE_BRUTE) M.afflict_paralyze(20 * 2) M.forceMove(src) M.update_perspective() @@ -39,14 +39,14 @@ /obj/structure/kitchenspike/stumble_into(mob/living/M) playsound(get_turf(M), "sound/weapons/pierce.ogg", 25, 1, -1) visible_message("[M] [pick("ran", "slammed")] into the spikes on \the [src]!") - M.apply_damage(15, BRUTE, sharp=1) + M.apply_damage(15, DAMAGE_TYPE_BRUTE, sharp=1) M.afflict_paralyze(20 * 5) M.stop_flying() /obj/structure/m_tray/stumble_into(mob/living/M) playsound(get_turf(src), 'sound/weapons/tablehit1.ogg', 25, 1, -1) visible_message("[M] flopped onto \the [src]!") - M.apply_damage(5, BRUTE) + M.apply_damage(5, DAMAGE_TYPE_BRUTE) M.afflict_paralyze(20 * 2) M.forceMove(get_turf(src)) M.stop_flying() @@ -54,14 +54,14 @@ /obj/structure/c_tray/stumble_into(mob/living/M) playsound(get_turf(src), 'sound/weapons/tablehit1.ogg', 25, 1, -1) visible_message("[M] flopped onto \the [src]!") - M.apply_damage(5, BRUTE) + M.apply_damage(5, DAMAGE_TYPE_BRUTE) M.afflict_paralyze(20 * 2) M.forceMove(get_turf(src)) M.stop_flying() /obj/structure/window/stumble_into(mob/living/M) visible_message("[M] [pick("ran", "slammed")] into \the [src]!") - M.apply_damage(5, BRUTE) + M.apply_damage(5, DAMAGE_TYPE_BRUTE) M.afflict_paralyze(20 * 2) M.stop_flying() @@ -88,7 +88,7 @@ /obj/machinery/appliance/cooker/fryer/stumble_into(mob/living/M) // Citadel change visible_message("[M] [pick("ran", "slammed")] into \the [src]!") - M.apply_damage(15, BURN) + M.apply_damage(15, DAMAGE_TYPE_BURN) M.afflict_paralyze(20 * 5) M.emote("scream") M.stop_flying() @@ -98,7 +98,7 @@ return ..() playsound(get_turf(src), 'sound/effects/Glasshit.ogg', 25, 1, -1) visible_message("[M] [pick("tripped", "stumbled")] into \the [src]!") - M.apply_damage(5, BRUTE) + M.apply_damage(5, DAMAGE_TYPE_BRUTE) M.afflict_paralyze(20 * 2) put_mob(M) M.stop_flying() @@ -114,7 +114,7 @@ /obj/machinery/space_heater/stumble_into(mob/living/M) ..() if(on) - M.apply_damage(10, BURN) + M.apply_damage(10, DAMAGE_TYPE_BURN) M.emote("scream") /obj/machinery/suit_storage_unit/stumble_into(mob/living/M) diff --git a/code/game/turfs/simulated/wall/wall-defense.dm b/code/game/turfs/simulated/wall/wall-defense.dm index 954f3502d6a0..98c80c6ec0dd 100644 --- a/code/game/turfs/simulated/wall/wall-defense.dm +++ b/code/game/turfs/simulated/wall/wall-defense.dm @@ -87,7 +87,7 @@ //! legacy code handling if((proj.projectile_type & (PROJECTILE_TYPE_ENERGY | PROJECTILE_TYPE_BEAM)) && !proj.nodamage && proj.damage_force) burn(2500) - if(proj.damage_type == BURN && proj.damage_force && !proj.nodamage) + if(proj.damage_type == DAMAGE_TYPE_BURN && proj.damage_force && !proj.nodamage) if(thermite) thermitemelt() if(proj.ricochet_sounds && prob(15)) diff --git a/code/modules/ai/ai_tracking.dm b/code/modules/ai/ai_tracking.dm index fc962abb4066..0a6d01b4f397 100644 --- a/code/modules/ai/ai_tracking.dm +++ b/code/modules/ai/ai_tracking.dm @@ -60,7 +60,6 @@ * * dir - direction of move. if it's just a Move() or otherwie standing still, this is NONE. */ /datum/ai_tracking/proc/track_movement(time, dir) - var/elapsed = max(world.time - movement_record_last, world.tick_lag) // flushing changes last record flush_movement() diff --git a/code/modules/atmospherics/environmental/zas/airflow.dm b/code/modules/atmospherics/environmental/zas/airflow.dm index f8e05581aa91..4c74e2b260d1 100644 --- a/code/modules/atmospherics/environmental/zas/airflow.dm +++ b/code/modules/atmospherics/environmental/zas/airflow.dm @@ -136,15 +136,15 @@ Contains helper procs for airflow, handled in /connection_group. var/blocked = run_armor_check(BP_HEAD,"melee") var/soaked = get_armor_soak(BP_HEAD,"melee") - apply_damage(b_loss/3, BRUTE, BP_HEAD, blocked, soaked, 0, "Airflow") + apply_damage(b_loss/3, DAMAGE_TYPE_BRUTE, BP_HEAD, blocked, soaked, 0, "Airflow") blocked = run_armor_check(BP_TORSO,"melee") soaked = get_armor_soak(BP_TORSO,"melee") - apply_damage(b_loss/3, BRUTE, BP_TORSO, blocked, soaked, 0, "Airflow") + apply_damage(b_loss/3, DAMAGE_TYPE_BRUTE, BP_TORSO, blocked, soaked, 0, "Airflow") blocked = run_armor_check(BP_GROIN,"melee") soaked = get_armor_soak(BP_GROIN,"melee") - apply_damage(b_loss/3, BRUTE, BP_GROIN, blocked, soaked, 0, "Airflow") + apply_damage(b_loss/3, DAMAGE_TYPE_BRUTE, BP_GROIN, blocked, soaked, 0, "Airflow") GET_VSC_PROP(atmos_vsc, /atmos/airflow/impact_stun, impact_stun) diff --git a/code/modules/atmospherics/environmental/zas/fire.dm b/code/modules/atmospherics/environmental/zas/fire.dm index 24ecfae64756..49ba7e5ce215 100644 --- a/code/modules/atmospherics/environmental/zas/fire.dm +++ b/code/modules/atmospherics/environmental/zas/fire.dm @@ -228,7 +228,7 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin /mob/living/proc/FireBurn(var/firelevel, var/last_temperature, var/pressure) CACHE_VSC_PROP(atmos_vsc, /atmos/fire/firelevel_multiplier, firelevel_multiplier) var/mx = 5 * firelevel/firelevel_multiplier * min(pressure / ONE_ATMOSPHERE, 1) - apply_damage(2.5*mx, BURN) + apply_damage(2.5*mx, DAMAGE_TYPE_BURN) /mob/living/carbon/human/FireBurn(var/firelevel, var/last_temperature, var/pressure) @@ -265,10 +265,10 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin //Always check these damage procs first if fire damage isn't working. They're probably what's wrong. - apply_damage(2.5*mx*head_exposure, BURN, BP_HEAD, 0, 0, "Fire") - apply_damage(2.5*mx*chest_exposure, BURN, BP_TORSO, 0, 0, "Fire") - apply_damage(2.0*mx*groin_exposure, BURN, BP_GROIN, 0, 0, "Fire") - apply_damage(0.6*mx*legs_exposure, BURN, BP_L_LEG, 0, 0, "Fire") - apply_damage(0.6*mx*legs_exposure, BURN, BP_R_LEG, 0, 0, "Fire") - apply_damage(0.4*mx*arms_exposure, BURN, BP_L_ARM, 0, 0, "Fire") - apply_damage(0.4*mx*arms_exposure, BURN, BP_R_ARM, 0, 0, "Fire") + apply_damage(2.5*mx*head_exposure, DAMAGE_TYPE_BURN, BP_HEAD, 0, 0, "Fire") + apply_damage(2.5*mx*chest_exposure, DAMAGE_TYPE_BURN, BP_TORSO, 0, 0, "Fire") + apply_damage(2.0*mx*groin_exposure, DAMAGE_TYPE_BURN, BP_GROIN, 0, 0, "Fire") + apply_damage(0.6*mx*legs_exposure, DAMAGE_TYPE_BURN, BP_L_LEG, 0, 0, "Fire") + apply_damage(0.6*mx*legs_exposure, DAMAGE_TYPE_BURN, BP_R_LEG, 0, 0, "Fire") + apply_damage(0.4*mx*arms_exposure, DAMAGE_TYPE_BURN, BP_L_ARM, 0, 0, "Fire") + apply_damage(0.4*mx*arms_exposure, DAMAGE_TYPE_BURN, BP_R_ARM, 0, 0, "Fire") diff --git a/code/modules/atmospherics/machinery/pipes/he_pipes.dm b/code/modules/atmospherics/machinery/pipes/he_pipes.dm index 4e10d7350f59..c9650dede303 100644 --- a/code/modules/atmospherics/machinery/pipes/he_pipes.dm +++ b/code/modules/atmospherics/machinery/pipes/he_pipes.dm @@ -105,7 +105,7 @@ heat_limit = H.species.heat_level_3 if(pipe_air.temperature > heat_limit + 1) - L.apply_damage(4 * log(pipe_air.temperature - heat_limit), BURN, BP_TORSO, used_weapon = "Excessive Heat") + L.apply_damage(4 * log(pipe_air.temperature - heat_limit), DAMAGE_TYPE_BURN, BP_TORSO, used_weapon = "Excessive Heat") //fancy radiation glowing if(pipe_air.temperature && (icon_temperature > 500 || pipe_air.temperature > 500)) //start glowing at 500K diff --git a/code/modules/blob2/blobs/base_blob.dm b/code/modules/blob2/blobs/base_blob.dm index 09cdcd04c83f..40d129452082 100644 --- a/code/modules/blob2/blobs/base_blob.dm +++ b/code/modules/blob2/blobs/base_blob.dm @@ -227,7 +227,7 @@ var/list/blobs = list() visible_message("\The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]") var/damage = W.damage_force switch(W.damtype) - if(BURN) + if(DAMAGE_TYPE_BURN) if(overmind) damage *= overmind.blob_type.burn_multiplier else @@ -237,7 +237,7 @@ var/list/blobs = list() playsound(src.loc, 'sound/items/welder.ogg', 100, 1) else playsound(src, 'sound/weapons/tap.ogg', 50, 1) - if(BRUTE) + if(DAMAGE_TYPE_BRUTE) if(overmind) damage *= overmind.blob_type.brute_multiplier else @@ -265,10 +265,10 @@ var/list/blobs = list() return switch(proj.damage_type) - if(BRUTE) + if(DAMAGE_TYPE_BRUTE) if(overmind) damage *= overmind.blob_type.brute_multiplier - if(BURN) + if(DAMAGE_TYPE_BURN) if(overmind) damage *= overmind.blob_type.burn_multiplier diff --git a/code/modules/blob2/overmind/types.dm b/code/modules/blob2/overmind/types.dm index 42a56f5df373..ec8ba27683b6 100644 --- a/code/modules/blob2/overmind/types.dm +++ b/code/modules/blob2/overmind/types.dm @@ -15,7 +15,7 @@ var/attack_verb = "attacks" // Used for the visible_message(), as the above is shown to the mob getting hit directly. // Format is '\The [blob name] [attack_verb] [victim]!' E.g. 'The explosive lattice blasts John Doe!' - var/damage_type = BRUTE // What kind of damage to do to living mobs via blob_act() + var/damage_type = DAMAGE_TYPE_BRUTE // What kind of damage to do to living mobs via blob_act() var/armor_check = "melee" // What armor to check for when blob_act()-ing living mobs. var/armor_pen = 0 // How much armor to penetrate(ignore) when attacking via blob_act(). var/damage_lower = 30 // Lower bound for amount of damage to do for attacks. @@ -146,7 +146,7 @@ complementary_color = "#BE5532" spread_modifier = 0.5 ai_aggressiveness = 50 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN burn_multiplier = 0 // Fire immunity attack_message = "The blazing oil splashes you with its burning oil" attack_message_living = ", and you feel your skin char and melt" @@ -192,7 +192,7 @@ difficulty = BLOB_DIFFICULTY_MEDIUM // Rough for robots but otherwise fragile and can be fought at range like most blobs anyways. color = "#83ECEC" complementary_color = "#EC8383" - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN damage_lower = 10 damage_upper = 20 brute_multiplier = 3 @@ -220,7 +220,7 @@ difficulty = BLOB_DIFFICULTY_MEDIUM // The spores are more of an annoyance but can be difficult to contain. color = "#AAAAAA" complementary_color = "#FFFFFF" - damage_type = TOX + damage_type = DAMAGE_TYPE_TOX damage_lower = 15 damage_upper = 25 spread_modifier = 0.3 // Lower, since spores will do a lot of the spreading. @@ -250,7 +250,7 @@ difficulty = BLOB_DIFFICULTY_HARD // Loads of spores that can overwhelm, and spreads quickly. color = "#FF0000" // Red complementary_color = "#FFCC00" // Orange-ish - damage_type = TOX + damage_type = DAMAGE_TYPE_TOX damage_lower = 10 damage_upper = 20 spread_modifier = 0.7 @@ -290,7 +290,7 @@ difficulty = BLOB_DIFFICULTY_EASY // Potentially deadly to people not knowing the mechanics, but otherwise fairly tame, due to its slow spread and weakness. color = "#9ACD32" complementary_color = "#FFA500" - damage_type = BRUTE + damage_type = DAMAGE_TYPE_BRUTE damage_lower = 30 damage_upper = 40 armor_pen = 50 // Even with riot armor and tactical jumpsuit, you'd have 90 armor, reduced by 50, totaling 40. Getting hit for around 21 damage is still rough. @@ -321,7 +321,7 @@ difficulty = BLOB_DIFFICULTY_EASY // Mostly a tank and spank. color = "#65ADA2" complementary_color = "#AD6570" - damage_type = BRUTE + damage_type = DAMAGE_TYPE_BRUTE damage_lower = 10 damage_upper = 15 brute_multiplier = 0.5 @@ -366,7 +366,7 @@ difficulty = BLOB_DIFFICULTY_EASY color = "#C8963C" complementary_color = "#3C6EC8" - damage_type = BRUTE + damage_type = DAMAGE_TYPE_BRUTE damage_lower = 20 damage_upper = 30 brute_multiplier = 0.5 @@ -403,7 +403,7 @@ difficulty = BLOB_DIFFICULTY_MEDIUM color = "#8BA6E9" complementary_color = "#7D6EB4" - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN damage_lower = 15 damage_upper = 25 brute_multiplier = 0.25 @@ -449,7 +449,7 @@ difficulty = BLOB_DIFFICULTY_MEDIUM color = "#EFD65A" complementary_color = "#00E5B1" - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN damage_lower = 5 damage_upper = 10 brute_multiplier = 0.5 @@ -475,7 +475,7 @@ difficulty = BLOB_DIFFICULTY_MEDIUM color = "#8B2500" complementary_color = "#00668B" - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN damage_lower = 25 damage_upper = 35 armor_check = "bomb" @@ -527,7 +527,7 @@ difficulty = BLOB_DIFFICULTY_HARD color = "#AAAABB" complementary_color = "#BBBBAA" - damage_type = OXY + damage_type = DAMAGE_TYPE_OXY damage_lower = 5 damage_upper = 15 armor_check = null @@ -577,7 +577,7 @@ difficulty = BLOB_DIFFICULTY_MEDIUM color = "#33CC33" complementary_color = "#99FF66" - damage_type = TOX + damage_type = DAMAGE_TYPE_TOX damage_lower = 20 damage_upper = 30 armor_check = "rad" diff --git a/code/modules/clothing/gloves/_gloves.dm b/code/modules/clothing/gloves/_gloves.dm index 255da6cf7305..12d8c47999fa 100644 --- a/code/modules/clothing/gloves/_gloves.dm +++ b/code/modules/clothing/gloves/_gloves.dm @@ -16,7 +16,7 @@ var/glove_level = 2 //What "layer" the glove is on var/overgloves = 0 //Used by gauntlets and arm_guards var/punch_force = 0 //How much damage do these gloves add to a punch? - var/punch_damtype = BRUTE //What type of damage does this make fists be? + var/punch_damtype = DAMAGE_TYPE_BRUTE //What type of damage does this make fists be? body_cover_flags = HANDS slot_flags = SLOT_GLOVES attack_verb = list("challenged") diff --git a/code/modules/clothing/spacesuits/breaches.dm b/code/modules/clothing/spacesuits/breaches.dm index 1c86f73f0bce..4e8e334ed991 100644 --- a/code/modules/clothing/spacesuits/breaches.dm +++ b/code/modules/clothing/spacesuits/breaches.dm @@ -2,10 +2,13 @@ //Breaches greatly increase the amount of lost gas and decrease the armour rating of the suit. //They can be healed with plastic or metal sheeting. -/datum/breach +/** + * A semi-standalone 'wound' system for things like spacesuits. + */ +/datum/hardsuit_breach var/class = 0 // Size. Lower is smaller. Uses floating point values! var/descriptor // 'gaping hole' etc. - var/damtype = BURN // Punctured or melted + var/breach_type = HARDSUIT_BREACH_TYPE_BURN // Punctured or melted var/obj/item/clothing/suit/space/holder // Suit containing the list of breaches holding this instance. /obj/item/clothing/suit/space @@ -41,18 +44,18 @@ var/global/list/breach_burn_descriptors = list( "huge scorched area" ) -/datum/breach/proc/update_descriptor() +/datum/hardsuit_breach/proc/update_descriptor() //Sanity... class = clamp( round(class), 1, 5) //Apply the correct descriptor. - if(damtype == BURN) + if(breach_type == HARDSUIT_BREACH_TYPE_BURN) descriptor = breach_burn_descriptors[class] - else if(damtype == BRUTE) + else if(breach_type == HARDSUIT_BREACH_TYPE_BRUTE) descriptor = breach_brute_descriptors[class] //Repair a certain amount of brute or burn damage to the suit. -/obj/item/clothing/suit/space/proc/repair_breaches(var/damtype, var/amount, var/mob/user) +/obj/item/clothing/suit/space/proc/repair_breaches(var/breach_type, var/amount, var/mob/user) if(!can_breach || !breaches || !breaches.len || !damage) to_chat(user, "There are no breaches to repair on \the [src].") @@ -60,8 +63,8 @@ var/global/list/breach_burn_descriptors = list( var/list/valid_breaches = list() - for(var/datum/breach/B in breaches) - if(B.damtype == damtype) + for(var/datum/hardsuit_breach/B in breaches) + if(B.breach_type == breach_type) valid_breaches += B if(!valid_breaches.len) @@ -69,7 +72,7 @@ var/global/list/breach_burn_descriptors = list( return var/amount_left = amount - for(var/datum/breach/B in valid_breaches) + for(var/datum/hardsuit_breach/B in valid_breaches) if(!amount_left) break if(B.class <= amount_left) @@ -85,6 +88,13 @@ var/global/list/breach_burn_descriptors = list( calc_breach_damage() /obj/item/clothing/suit/space/proc/create_breaches(var/damtype, var/amount) + var/breach_type + switch(damtype) + if(DAMAGE_TYPE_BRUTE) + breach_type = HARDSUIT_BREACH_TYPE_BRUTE + if(DAMAGE_TYPE_BURN) + breach_type = HARDSUIT_BREACH_TYPE_BURN + amount -= src.breach_threshold amount *= src.resilience @@ -102,9 +112,9 @@ var/global/list/breach_burn_descriptors = list( if(!T) return //Increase existing breaches. - for(var/datum/breach/existing in breaches) + for(var/datum/hardsuit_breach/existing in breaches) - if(existing.damtype != damtype) + if(existing.breach_type != breach_type) continue //keep in mind that 10 breach damage == full pressure loss. @@ -118,25 +128,25 @@ var/global/list/breach_burn_descriptors = list( existing.class = 5 amount -= needs - if(existing.damtype == BRUTE) + if(existing.breach_type == HARDSUIT_BREACH_TYPE_BRUTE) T.visible_message("\The [existing.descriptor] on [src] gapes wider!") - else if(existing.damtype == BURN) + else if(existing.breach_type == HARDSUIT_BREACH_TYPE_BURN) T.visible_message("\The [existing.descriptor] on [src] widens!") if (amount) //Spawn a new breach. - var/datum/breach/B = new() + var/datum/hardsuit_breach/B = new() breaches += B B.class = min(amount,5) - B.damtype = damtype + B.breach_type = breach_type B.update_descriptor() B.holder = src - if(B.damtype == BRUTE) + if(B.breach_type == HARDSUIT_BREACH_TYPE_BRUTE) T.visible_message("\A [B.descriptor] opens up on [src]!") - else if(B.damtype == BURN) + else if(B.breach_type == HARDSUIT_BREACH_TYPE_BURN) T.visible_message("\A [B.descriptor] marks the surface of [src]!") calc_breach_damage() @@ -152,15 +162,15 @@ var/global/list/breach_burn_descriptors = list( name = base_name return 0 - for(var/datum/breach/B in breaches) + for(var/datum/hardsuit_breach/B in breaches) if(!B.class) src.breaches -= B qdel(B) else damage += B.class - if(B.damtype == BRUTE) + if(B.breach_type == HARDSUIT_BREACH_TYPE_BRUTE) brute_damage += B.class - else if(B.damtype == BURN) + else if(B.breach_type == HARDSUIT_BREACH_TYPE_BURN) burn_damage += B.class if(damage >= 3) @@ -201,7 +211,7 @@ var/global/list/breach_burn_descriptors = list( var/obj/item/stack/P = W var/use_amt = min(P.get_amount(), 3) if(use_amt && P.use(use_amt)) - repair_breaches(BURN, use_amt * repair_power, user) + repair_breaches(HARDSUIT_BREACH_TYPE_BURN, use_amt * repair_power, user) return else if(istype(W, /obj/item/weldingtool)) @@ -219,7 +229,7 @@ var/global/list/breach_burn_descriptors = list( to_chat(user, "You need more welding fuel to repair this suit.") return - repair_breaches(BRUTE, 3, user) + repair_breaches(HARDSUIT_BREACH_TYPE_BRUTE, 3, user) return ..() @@ -227,5 +237,5 @@ var/global/list/breach_burn_descriptors = list( /obj/item/clothing/suit/space/examine(mob/user, dist) . = ..() if(can_breach && breaches && breaches.len) - for(var/datum/breach/B in breaches) + for(var/datum/hardsuit_breach/B in breaches) . += "It has \a [B.descriptor]." diff --git a/code/modules/food/machinery/appliance/_appliance.dm b/code/modules/food/machinery/appliance/_appliance.dm index 641141ac8286..de28d29cb3d3 100644 --- a/code/modules/food/machinery/appliance/_appliance.dm +++ b/code/modules/food/machinery/appliance/_appliance.dm @@ -29,7 +29,7 @@ var/cooking // Whether or not the machine is currently operating. var/cook_type // A string value used to track what kind of food this machine makes. var/can_cook_mobs // Whether or not this machine accepts grabbed mobs. - var/mobdamagetype = BRUTE // Burn damage for cooking appliances, brute for cereal/candy + var/mobdamagetype = DAMAGE_TYPE_BRUTE // Burn damage for cooking appliances, brute for cereal/candy var/food_color // Colour of resulting food item. var/cooked_sound = 'sound/machines/ding.ogg' // Sound played when cooking completes. var/can_burn_food // Can the object burn food that is left inside? diff --git a/code/modules/holodeck/HolodeckControl.dm b/code/modules/holodeck/HolodeckControl.dm index 95b91e324001..60f78010bae2 100644 --- a/code/modules/holodeck/HolodeckControl.dm +++ b/code/modules/holodeck/HolodeckControl.dm @@ -173,7 +173,7 @@ if (safety_disabled) item_power_usage = 2500 for(var/obj/item/holo/esword/H in linkedholodeck) - H.damtype = BRUTE + H.damtype = DAMAGE_TYPE_BRUTE else item_power_usage = initial(item_power_usage) for(var/obj/item/holo/esword/H in linkedholodeck) diff --git a/code/modules/holodeck/HolodeckObjects.dm b/code/modules/holodeck/HolodeckObjects.dm index 73ca10c2a5fb..493c9a42ddfd 100644 --- a/code/modules/holodeck/HolodeckObjects.dm +++ b/code/modules/holodeck/HolodeckObjects.dm @@ -157,7 +157,7 @@ if(armor_soak >= damage) return TRUE - target.apply_damage(damage, HALLOSS, affecting, armor_block, armor_soak) + target.apply_damage(damage, DAMAGE_TYPE_HALLOSS, affecting, armor_block, armor_soak) if(damage >= 9) target.visible_message("[user] has weakened [target]!") target.apply_effect(4, WEAKEN, armor_block) @@ -213,7 +213,7 @@ return /obj/item/holo - damtype = HALLOSS + damtype = DAMAGE_TYPE_HALLOSS /obj/item/holo/esword desc = "May the force be within you. Sorta." diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm index 67aac64879b0..25cd5f0271b4 100644 --- a/code/modules/hydroponics/seed.dm +++ b/code/modules/hydroponics/seed.dm @@ -131,7 +131,7 @@ if(affecting) to_chat(target, "\The [fruit]'s thorns pierce your [affecting.name] greedily!") - target.apply_damage(damage, BRUTE, target_limb, blocked, soaked, "Thorns", sharp=1, edge=has_edge) + target.apply_damage(damage, DAMAGE_TYPE_BRUTE, target_limb, blocked, soaked, "Thorns", sharp=1, edge=has_edge) else to_chat(target, "\The [fruit]'s thorns pierce your flesh greedily!") target.adjustBruteLoss(damage) @@ -140,7 +140,7 @@ has_edge = prob(get_trait(TRAIT_POTENCY)/5) if(affecting) to_chat(target, "\The [fruit]'s thorns dig deeply into your [affecting.name]!") - target.apply_damage(damage, BRUTE, target_limb, blocked, "Thorns", sharp=1, edge=has_edge) + target.apply_damage(damage, DAMAGE_TYPE_BRUTE, target_limb, blocked, "Thorns", sharp=1, edge=has_edge) else to_chat(target, "\The [fruit]'s thorns dig deeply into your flesh!") target.adjustBruteLoss(damage) diff --git a/code/modules/hydroponics/spreading/spreading_response.dm b/code/modules/hydroponics/spreading/spreading_response.dm index 016ae848fa3a..2e1825edff7f 100644 --- a/code/modules/hydroponics/spreading/spreading_response.dm +++ b/code/modules/hydroponics/spreading/spreading_response.dm @@ -31,7 +31,7 @@ if(soaked >= 30) return - if(!M.apply_damage(base_damage, BRUTE, target_zone, blocked, soaked, used_weapon=src)) + if(!M.apply_damage(base_damage, DAMAGE_TYPE_BRUTE, target_zone, blocked, soaked, used_weapon=src)) return 0 /obj/effect/plant/attack_hand(mob/user, datum/event_args/actor/clickchain/e_args) diff --git a/code/modules/integrated_electronics/subtypes/manipulation.dm b/code/modules/integrated_electronics/subtypes/manipulation.dm index b999233fcd80..5932727d079c 100644 --- a/code/modules/integrated_electronics/subtypes/manipulation.dm +++ b/code/modules/integrated_electronics/subtypes/manipulation.dm @@ -691,7 +691,7 @@ if(isliving(target)) if(ishuman(target)) var/mob/living/carbon/human/S = target - S.apply_damage(drill_force, BRUTE) + S.apply_damage(drill_force, DAMAGE_TYPE_BRUTE) return else if(issimple(target)) var/mob/living/simple_mob/S = target diff --git a/code/modules/maps/weather/miaphus.dm b/code/modules/maps/weather/miaphus.dm index cbdaa8bdaf67..0eee0b8410d1 100644 --- a/code/modules/maps/weather/miaphus.dm +++ b/code/modules/maps/weather/miaphus.dm @@ -375,7 +375,7 @@ if(amount_soaked >= damage) continue // No need to apply damage. - H.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked, used_weapon = "hail") + H.apply_damage(damage, DAMAGE_TYPE_BRUTE, target_zone, amount_blocked, amount_soaked, used_weapon = "hail") if(show_message) to_chat(H, effect_message) diff --git a/code/modules/maps/weather/virgo4.dm b/code/modules/maps/weather/virgo4.dm index 769fba39ea6b..2736db28703a 100644 --- a/code/modules/maps/weather/virgo4.dm +++ b/code/modules/maps/weather/virgo4.dm @@ -371,7 +371,7 @@ if(amount_soaked >= damage) continue // No need to apply damage. - H.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked, used_weapon = "hail") + H.apply_damage(damage, DAMAGE_TYPE_BRUTE, target_zone, amount_blocked, amount_soaked, used_weapon = "hail") if(show_message) to_chat(H, effect_message) diff --git a/code/modules/materials/material_sheets.dm b/code/modules/materials/material_sheets.dm index 0b9c51f98d69..4eab8536f577 100644 --- a/code/modules/materials/material_sheets.dm +++ b/code/modules/materials/material_sheets.dm @@ -317,8 +317,8 @@ if(burn_user) H.visible_message("\The [src] flashes as it scorches [H]'s hands!") - H.apply_damage(amount / 2 + 5, BURN, "r_hand", used_weapon="Supermatter Chunk") - H.apply_damage(amount / 2 + 5, BURN, "l_hand", used_weapon="Supermatter Chunk") + H.apply_damage(amount / 2 + 5, DAMAGE_TYPE_BURN, "r_hand", used_weapon="Supermatter Chunk") + H.apply_damage(amount / 2 + 5, DAMAGE_TYPE_BURN, "l_hand", used_weapon="Supermatter Chunk") H.drop_item_to_ground(src) return @@ -326,7 +326,7 @@ burn_user = FALSE if(burn_user) - M.apply_damage(amount, BURN, null, used_weapon="Supermatter Chunk") + M.apply_damage(amount, DAMAGE_TYPE_BURN, null, used_weapon="Supermatter Chunk") /obj/item/stack/material/supermatter/legacy_ex_act(severity) // An incredibly hard to manufacture material, SM chunks are unstable by their 'stabilized' nature. if(prob((4 / severity) * 20)) diff --git a/code/modules/mining/tools/kinetic_accelerator.dm b/code/modules/mining/tools/kinetic_accelerator.dm index 655b935c6f03..c09a9d21af61 100644 --- a/code/modules/mining/tools/kinetic_accelerator.dm +++ b/code/modules/mining/tools/kinetic_accelerator.dm @@ -197,7 +197,7 @@ name = "kinetic force" icon_state = null damage_force = 30 - damage_type = BRUTE + damage_type = DAMAGE_TYPE_BRUTE damage_flag = ARMOR_BOMB range = WORLD_ICON_SIZE * 4 // log_override = TRUE @@ -208,7 +208,7 @@ /obj/projectile/kinetic/premium damage_force = 40 - damage_type = BRUTE + damage_type = DAMAGE_TYPE_BRUTE range = 5 /obj/projectile/kinetic/Destroy() diff --git a/code/modules/mining/tools/kinetic_crusher.dm b/code/modules/mining/tools/kinetic_crusher.dm index 4e593ad17d19..149841982a7c 100644 --- a/code/modules/mining/tools/kinetic_crusher.dm +++ b/code/modules/mining/tools/kinetic_crusher.dm @@ -187,12 +187,12 @@ if(thrown? (get_dir(src, L) & L.dir) : ((user.dir & backstab_dir) && (L.dir & backstab_dir))) if(!QDELETED(C)) C.total_damage += detonation_damage + backstab_bonus + thrown_bonus //cheat a little and add the total before killing it, so certain mobs don't have much lower chances of giving an item - L.apply_damage(detonation_damage + backstab_bonus + thrown_bonus, BRUTE, blocked = def_check) + L.apply_damage(detonation_damage + backstab_bonus + thrown_bonus, DAMAGE_TYPE_BRUTE, blocked = def_check) playsound(src, 'sound/weapons/kenetic_accel.ogg', 100, 1) //Seriously who spelled it wrong else if(!QDELETED(C)) C.total_damage += detonation_damage + thrown_bonus - L.apply_damage(detonation_damage + thrown_bonus, BRUTE, blocked = def_check) + L.apply_damage(detonation_damage + thrown_bonus, DAMAGE_TYPE_BRUTE, blocked = def_check) /obj/item/kinetic_crusher/throw_impact(atom/A, datum/thrownthing/TT) . = ..() @@ -307,8 +307,9 @@ name = "destabilizing force" icon_state = "pulse1" nodamage = TRUE - damage_force = 0 //We're just here to mark people. This is still a melee weapon. - damage_type = BRUTE + // We're just here to mark people. This is still a melee weapon. + damage_force = 0 + damage_type = DAMAGE_TYPE_BRUTE damage_flag = ARMOR_BOMB range = WORLD_ICON_SIZE * 6 accuracy_disabled = TRUE diff --git a/code/modules/mining/tools/resonator.dm b/code/modules/mining/tools/resonator.dm index 7ea2cc170e91..77a7e2585deb 100644 --- a/code/modules/mining/tools/resonator.dm +++ b/code/modules/mining/tools/resonator.dm @@ -97,7 +97,7 @@ if(creator) add_attack_logs(creator, L, "used a resonator field on") to_chat(L, "\The [src] ruptured with you in it!") - L.apply_damage(resonance_damage, BRUTE) + L.apply_damage(resonance_damage, DAMAGE_TYPE_BRUTE) qdel(src) diff --git a/code/modules/mob/grab.dm b/code/modules/mob/grab.dm index d42f8c6c55b3..c1229a5996dc 100644 --- a/code/modules/mob/grab.dm +++ b/code/modules/mob/grab.dm @@ -624,8 +624,8 @@ var/armor = target.run_armor_check(BP_HEAD, "melee") var/soaked = target.get_armor_soak(BP_HEAD, "melee") - target.apply_damage(damage, BRUTE, BP_HEAD, armor, soaked) - attacker.apply_damage(10, BRUTE, BP_HEAD, attacker.run_armor_check(BP_HEAD), attacker.get_armor_soak(BP_HEAD), "melee") + target.apply_damage(damage, DAMAGE_TYPE_BRUTE, BP_HEAD, armor, soaked) + attacker.apply_damage(10, DAMAGE_TYPE_BRUTE, BP_HEAD, attacker.run_armor_check(BP_HEAD), attacker.get_armor_soak(BP_HEAD), "melee") if(!armor && target.headcheck(BP_HEAD) && prob(damage)) target.apply_effect(20, PARALYZE) diff --git a/code/modules/mob/living/bot/mulebot.dm b/code/modules/mob/living/bot/mulebot.dm index 0de59b68a2a6..4b683e5b746a 100644 --- a/code/modules/mob/living/bot/mulebot.dm +++ b/code/modules/mob/living/bot/mulebot.dm @@ -245,12 +245,12 @@ playsound(loc, 'sound/effects/splat.ogg', 50, 1) var/damage = rand(5, 7) - M.apply_damage(2 * damage, BRUTE, BP_HEAD) - M.apply_damage(2 * damage, BRUTE, BP_TORSO) - M.apply_damage(0.5 * damage, BRUTE, BP_L_LEG) - M.apply_damage(0.5 * damage, BRUTE, BP_R_LEG) - M.apply_damage(0.5 * damage, BRUTE, BP_L_ARM) - M.apply_damage(0.5 * damage, BRUTE, BP_R_ARM) + M.apply_damage(2 * damage, DAMAGE_TYPE_BRUTE, BP_HEAD) + M.apply_damage(2 * damage, DAMAGE_TYPE_BRUTE, BP_TORSO) + M.apply_damage(0.5 * damage, DAMAGE_TYPE_BRUTE, BP_L_LEG) + M.apply_damage(0.5 * damage, DAMAGE_TYPE_BRUTE, BP_R_LEG) + M.apply_damage(0.5 * damage, DAMAGE_TYPE_BRUTE, BP_L_ARM) + M.apply_damage(0.5 * damage, DAMAGE_TYPE_BRUTE, BP_R_ARM) blood_splatter(src, M, 1) diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 2db93426db2b..5cf584d5efe3 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -30,7 +30,7 @@ apply_damage(effective_force, I.damtype, hit_zone, blocked, soaked, sharp=weapon_sharp, edge=weapon_edge, used_weapon=I) //Melee weapon embedded object code. - if (I && I.damtype == BRUTE && !I.anchored && !is_robot_module(I) && I.embed_chance > 0) + if (I && I.damtype == DAMAGE_TYPE_BRUTE && !I.anchored && !is_robot_module(I) && I.embed_chance > 0) var/damage = effective_force if (blocked) damage *= (100 - blocked)/100 @@ -67,7 +67,7 @@ if (shock_damage<1) return 0 - src.apply_damage(shock_damage, BURN, def_zone, used_weapon="Electrocution") + src.apply_damage(shock_damage, DAMAGE_TYPE_BURN, def_zone, used_weapon="Electrocution") playsound(loc, /datum/soundbyte/grouped/sparks, 50, 1, -1) if (shock_damage > 15) src.visible_message( @@ -102,7 +102,7 @@ // Knifing /mob/living/carbon/proc/attack_throat(obj/item/W, obj/item/grab/G, mob/user) - if(!((W.damage_mode & DAMAGE_MODE_EDGE) || W.edge) || !W.damage_force || W.damtype != BRUTE) + if(!((W.damage_mode & DAMAGE_MODE_EDGE) || W.edge) || !W.damage_force || W.damtype != DAMAGE_TYPE_BRUTE) return 0 //unsuitable weapon user.visible_message("\The [user] begins to slit [src]'s throat with \the [W]!") @@ -150,7 +150,7 @@ /mob/living/carbon/proc/shank_attack(obj/item/W, obj/item/grab/G, mob/user, hit_zone) - if(!(W.sharp || (W.damage_mode & DAMAGE_MODE_SHARP)) || !W.damage_force || W.damtype != BRUTE) + if(!(W.sharp || (W.damage_mode & DAMAGE_MODE_SHARP)) || !W.damage_force || W.damtype != DAMAGE_TYPE_BRUTE) return 0 //unsuitable weapon user.visible_message("\The [user] plunges \the [W] into \the [src]!") diff --git a/code/modules/mob/living/carbon/human/blood.dm b/code/modules/mob/living/carbon/human/blood.dm index cd005fd3b246..bcf6667c6e72 100644 --- a/code/modules/mob/living/carbon/human/blood.dm +++ b/code/modules/mob/living/carbon/human/blood.dm @@ -181,9 +181,9 @@ var/const/CE_STABLE_THRESHOLD = 0.5 continue for(var/datum/wound/W as anything in temp.wounds) if(W.bleeding()) - if(W.damage_type == PIERCE) //gunshots and spear stabs bleed more + if(W.wound_type == WOUND_TYPE_PIERCE) //gunshots and spear stabs bleed more blood_loss_divisor = max(blood_loss_divisor - 5, 1) - else if(W.damage_type == BRUISE) //bruises bleed less + else if(W.wound_type == WOUND_TYPE_BRUISE) //bruises bleed less blood_loss_divisor = max(blood_loss_divisor + 5, 1) //the farther you get from those vital regions, the less you bleed //depending on how dangerous bleeding turns out to be, it might be better to only apply the reduction to hands and feet diff --git a/code/modules/mob/living/carbon/human/human-damage-legacy.dm b/code/modules/mob/living/carbon/human/human-damage-legacy.dm index f5a2e375af4f..0f699869fc39 100644 --- a/code/modules/mob/living/carbon/human/human-damage-legacy.dm +++ b/code/modules/mob/living/carbon/human/human-damage-legacy.dm @@ -349,7 +349,7 @@ This function restores all organs. for(var/obj/item/organ/external/current_organ in organs) current_organ.rejuvenate_legacy(ignore_prosthetic_prefs) -/mob/living/carbon/human/apply_damage(var/damage = 0, var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/soaked = 0, var/sharp = 0, var/edge = 0, var/obj/used_weapon = null) +/mob/living/carbon/human/apply_damage(var/damage = 0, var/damagetype = DAMAGE_TYPE_BRUTE, var/def_zone = null, var/blocked = 0, var/soaked = 0, var/sharp = 0, var/edge = 0, var/obj/used_weapon = null) var/obj/item/organ/external/organ = null if(isorgan(def_zone)) organ = def_zone @@ -358,8 +358,8 @@ This function restores all organs. organ = get_organ(check_zone(def_zone)) //Handle other types of damage - if((damagetype != BRUTE) && (damagetype != BURN)) - if(damagetype == HALLOSS) + if((damagetype != DAMAGE_TYPE_BRUTE) && (damagetype != DAMAGE_TYPE_BURN)) + if(damagetype == DAMAGE_TYPE_HALLOSS) if((damage > 25 && prob(20)) || (damage > 50 && prob(60))) if(organ && organ.organ_can_feel_pain() && !isbelly(loc) && !istype(loc, /obj/item/dogborg/sleeper)) emote("scream") @@ -388,7 +388,7 @@ This function restores all organs. log_world("## DEBUG: [src] was hit for [damage].") switch(damagetype) - if(BRUTE) + if(DAMAGE_TYPE_BRUTE) damageoverlaytemp = 20 damage = damage*species.brute_mod @@ -403,7 +403,7 @@ This function restores all organs. damage_mode = (edge? DAMAGE_MODE_EDGE : NONE) | (sharp? DAMAGE_MODE_SHARP : NONE), weapon_descriptor = used_weapon, ) - if(BURN) + if(DAMAGE_TYPE_BURN) damageoverlaytemp = 20 damage = damage*species.burn_mod diff --git a/code/modules/mob/living/carbon/human/human-defense-legacy.dm b/code/modules/mob/living/carbon/human/human-defense-legacy.dm index 663da91a0673..7438b3dc2cf4 100644 --- a/code/modules/mob/living/carbon/human/human-defense-legacy.dm +++ b/code/modules/mob/living/carbon/human/human-defense-legacy.dm @@ -227,7 +227,7 @@ forcesay(hit_appends) //forcesay checks stat already if(prob(25 + (effective_force * 2))) - if(!((I.damtype == BRUTE) || (I.damtype == HALLOSS))) + if(!((I.damtype == DAMAGE_TYPE_BRUTE) || (I.damtype == DAMAGE_TYPE_HALLOSS))) return if(!(I.atom_flags & NOBLOODY)) @@ -274,7 +274,7 @@ if(!organ || (organ.dislocated == 2) || (organ.dislocated == -1) || blocked >= 100) return 0 - if(W.damtype != BRUTE) + if(W.damtype != DAMAGE_TYPE_BRUTE) return 0 if(soaked >= round(effective_force*0.8)) @@ -374,7 +374,7 @@ apply_damage(throw_damage, dtype, zone, armor, soaked, is_sharp(O), has_edge(O), O) //thrown weapon embedded object code. - if(dtype == BRUTE && istype(O,/obj/item)) + if(dtype == DAMAGE_TYPE_BRUTE && istype(O,/obj/item)) var/obj/item/I = O if (!is_robot_module(I)) var/sharp = is_sharp(I) @@ -476,7 +476,7 @@ /mob/living/carbon/human/proc/handle_suit_punctures(var/damtype, var/damage, var/def_zone) // Tox and oxy don't matter to suits. - if(damtype != BURN && damtype != BRUTE) return + if(damtype != DAMAGE_TYPE_BURN && damtype != DAMAGE_TYPE_BRUTE) return // The hardsuit might soak this hit, if we're wearing one. if(back && istype(back,/obj/item/hardsuit)) diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index 99fe7baf87c9..5c7aa6f329fc 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -328,7 +328,7 @@ var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone)) var/armor_block = run_armor_check(affecting, armor_type, armor_pen) var/armor_soak = get_armor_soak(affecting, armor_type, armor_pen) - apply_damage(damage, BRUTE, affecting, armor_block, armor_soak, sharp = a_sharp, edge = a_edge) + apply_damage(damage, DAMAGE_TYPE_BRUTE, affecting, armor_block, armor_soak, sharp = a_sharp, edge = a_edge) update_health() return TRUE diff --git a/code/modules/mob/living/carbon/human/human_powers.dm b/code/modules/mob/living/carbon/human/human_powers.dm index 45c472b08444..6fa6ba71157c 100644 --- a/code/modules/mob/living/carbon/human/human_powers.dm +++ b/code/modules/mob/living/carbon/human/human_powers.dm @@ -287,7 +287,7 @@ to_chat(src, SPAN_NOTICE("You feel a slithering sensation as your [O.name] reform.")) var/agony_to_apply = round(0.66 * O.max_damage) // 66% of the limb's health is converted into pain. - src.apply_damage(agony_to_apply, HALLOSS) + src.apply_damage(agony_to_apply, DAMAGE_TYPE_HALLOSS) for(var/organtype in species.has_organ) // Replace completely missing internal organs. -After- external ones, so they all should exist. if(!src.internal_organs_by_name[organtype]) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 80cab738bcb8..df4d5ac29a38 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -633,24 +633,24 @@ if(breath.temperature >= species.breath_heat_level_1) if(breath.temperature < species.breath_heat_level_2) - apply_damage(HEAT_GAS_DAMAGE_LEVEL_1, BURN, BP_HEAD, used_weapon = "Excessive Heat") + apply_damage(HEAT_GAS_DAMAGE_LEVEL_1, DAMAGE_TYPE_BURN, BP_HEAD, used_weapon = "Excessive Heat") fire_alert = max(fire_alert, 2) else if(breath.temperature < species.breath_heat_level_3) - apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, BURN, BP_HEAD, used_weapon = "Excessive Heat") + apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, DAMAGE_TYPE_BURN, BP_HEAD, used_weapon = "Excessive Heat") fire_alert = max(fire_alert, 2) else - apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, BP_HEAD, used_weapon = "Excessive Heat") + apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, DAMAGE_TYPE_BURN, BP_HEAD, used_weapon = "Excessive Heat") fire_alert = max(fire_alert, 2) else if(breath.temperature <= species.breath_cold_level_1) if(breath.temperature > species.breath_cold_level_2) - apply_damage(COLD_GAS_DAMAGE_LEVEL_1, BURN, BP_HEAD, used_weapon = "Excessive Cold") + apply_damage(COLD_GAS_DAMAGE_LEVEL_1, DAMAGE_TYPE_BURN, BP_HEAD, used_weapon = "Excessive Cold") fire_alert = max(fire_alert, 1) else if(breath.temperature > species.breath_cold_level_3) - apply_damage(COLD_GAS_DAMAGE_LEVEL_2, BURN, BP_HEAD, used_weapon = "Excessive Cold") + apply_damage(COLD_GAS_DAMAGE_LEVEL_2, DAMAGE_TYPE_BURN, BP_HEAD, used_weapon = "Excessive Cold") fire_alert = max(fire_alert, 1) else - apply_damage(COLD_GAS_DAMAGE_LEVEL_3, BURN, BP_HEAD, used_weapon = "Excessive Cold") + apply_damage(COLD_GAS_DAMAGE_LEVEL_3, DAMAGE_TYPE_BURN, BP_HEAD, used_weapon = "Excessive Cold") fire_alert = max(fire_alert, 1) diff --git a/code/modules/mob/living/living-damage.dm b/code/modules/mob/living/living-damage.dm index ac09b0d13bc5..28e675792104 100644 --- a/code/modules/mob/living/living-damage.dm +++ b/code/modules/mob/living/living-damage.dm @@ -8,7 +8,7 @@ Returns standard 0 if fail */ -/mob/living/proc/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/soaked = 0, var/used_weapon = null, var/sharp = 0, var/edge = 0) +/mob/living/proc/apply_damage(var/damage = 0,var/damagetype = DAMAGE_TYPE_BRUTE, var/def_zone = null, var/blocked = 0, var/soaked = 0, var/used_weapon = null, var/sharp = 0, var/edge = 0) if(!damage || (blocked >= 100)) return 0 if(soaked) @@ -18,26 +18,26 @@ damage -= soaked blocked = (100-blocked)/100 switch(damagetype) - if(BRUTE) + if(DAMAGE_TYPE_BRUTE) adjustBruteLoss(damage * blocked) - if(BURN) + if(DAMAGE_TYPE_BURN) if(MUTATION_COLD_RESIST in mutations) damage = 0 adjustFireLoss(damage * blocked) - if(SEARING) - apply_damage(damage / 3, BURN, def_zone, blocked, soaked, used_weapon, sharp, edge) - apply_damage(damage / 3 * 2, BRUTE, def_zone, blocked, soaked, used_weapon, sharp, edge) - if(TOX) + if(DAMAGE_TYPE_SEARING) + apply_damage(damage / 3, DAMAGE_TYPE_BURN, def_zone, blocked, soaked, used_weapon, sharp, edge) + apply_damage(damage / 3 * 2, DAMAGE_TYPE_BRUTE, def_zone, blocked, soaked, used_weapon, sharp, edge) + if(DAMAGE_TYPE_TOX) adjustToxLoss(damage * blocked) - if(OXY) + if(DAMAGE_TYPE_OXY) adjustOxyLoss(damage * blocked) - if(CLONE) + if(DAMAGE_TYPE_CLONE) adjustCloneLoss(damage * blocked) - if(HALLOSS) + if(DAMAGE_TYPE_HALLOSS) adjustHalLoss(damage * blocked) - if(ELECTROCUTE) + if(DAMAGE_TYPE_ELECTROCUTE) electrocute_act(damage, used_weapon, 1.0, def_zone) - if(BIOACID) + if(DAMAGE_TYPE_BIOACID) if(isSynthetic()) adjustFireLoss(damage * blocked) else @@ -50,12 +50,12 @@ /mob/living/proc/apply_damages(var/brute = 0, var/burn = 0, var/tox = 0, var/oxy = 0, var/clone = 0, var/halloss = 0, var/def_zone = null, var/blocked = 0) if(blocked >= 100) return 0 - if(brute) apply_damage(brute, BRUTE, def_zone, blocked) - if(burn) apply_damage(burn, BURN, def_zone, blocked) - if(tox) apply_damage(tox, TOX, def_zone, blocked) - if(oxy) apply_damage(oxy, OXY, def_zone, blocked) - if(clone) apply_damage(clone, CLONE, def_zone, blocked) - if(halloss) apply_damage(halloss, HALLOSS, def_zone, blocked) + if(brute) apply_damage(brute, DAMAGE_TYPE_BRUTE, def_zone, blocked) + if(burn) apply_damage(burn, DAMAGE_TYPE_BURN, def_zone, blocked) + if(tox) apply_damage(tox, DAMAGE_TYPE_TOX, def_zone, blocked) + if(oxy) apply_damage(oxy, DAMAGE_TYPE_OXY, def_zone, blocked) + if(clone) apply_damage(clone, DAMAGE_TYPE_CLONE, def_zone, blocked) + if(halloss) apply_damage(halloss, DAMAGE_TYPE_HALLOSS, def_zone, blocked) return 1 @@ -213,8 +213,8 @@ return var/weapon_descriptor = RESOLVE_SHIELDCALL_WEAPON_DESCRIPTOR(args) - var/brute = damage_type == BRUTE? damage : 0 - var/burn = damage_type == BURN? damage : 0 + var/brute = damage_type == DAMAGE_TYPE_BRUTE? damage : 0 + var/burn = damage_type == DAMAGE_TYPE_BURN? damage : 0 if(hit_zone) take_targeted_damage(brute, burn, damage_mode, hit_zone, weapon_descriptor) diff --git a/code/modules/mob/living/living-defense-legacy.dm b/code/modules/mob/living/living-defense-legacy.dm index 1e994c49ede8..008761bdc1c4 100644 --- a/code/modules/mob/living/living-defense-legacy.dm +++ b/code/modules/mob/living/living-defense-legacy.dm @@ -122,7 +122,7 @@ apply_effect(EYE_BLUR, stun_amount) if (agony_amount) - apply_damage(agony_amount, HALLOSS, def_zone, 0, used_weapon) + apply_damage(agony_amount, DAMAGE_TYPE_HALLOSS, def_zone, 0, used_weapon) apply_effect(STUTTER, agony_amount/10) apply_effect(EYE_BLUR, agony_amount/10) @@ -142,7 +142,7 @@ var/damage = rand(30, 40) var/armor_pen = 0 var/armor_check = "melee" - var/damage_type = BRUTE + var/damage_type = DAMAGE_TYPE_BRUTE var/attack_message = "The blob attacks you!" var/attack_verb = "attacks" var/def_zone = pick(BP_HEAD, BP_TORSO, BP_GROIN, BP_L_ARM, BP_R_ARM, BP_L_LEG, BP_R_LEG) @@ -159,8 +159,8 @@ attack_verb = blob.attack_verb B.overmind.blob_type.on_attack(B, src, def_zone) - if( (damage_type == TOX || damage_type == OXY) && isSynthetic()) // Borgs and FBPs don't really handle tox/oxy damage the same way other mobs do. - damage_type = BRUTE + if( (damage_type == DAMAGE_TYPE_TOX || damage_type == DAMAGE_TYPE_OXY) && isSynthetic()) // Borgs and FBPs don't really handle tox/oxy damage the same way other mobs do. + damage_type = DAMAGE_TYPE_BRUTE damage *= 0.66 // Take 2/3s as much damage. visible_message("\The [B] [attack_verb] \the [src]!", "[attack_message]!") @@ -192,7 +192,7 @@ standard_weapon_hit_effects(I, user, effective_force, blocked, soaked, hit_zone) - if(I.damtype == BRUTE && prob(33)) // Added blood for whacking non-humans too + if(I.damtype == DAMAGE_TYPE_BRUTE && prob(33)) // Added blood for whacking non-humans too var/turf/simulated/location = get_turf(src) if(istype(location)) location.add_blood_floor(src) diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm index 93d3d3ec9a78..30f9696a3088 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm @@ -447,7 +447,7 @@ return var/armor_block = run_armor_check(T, "melee") var/armor_soak = get_armor_soak(T, "melee") - T.apply_damage(20, HALLOSS,, armor_block, armor_soak) + T.apply_damage(20, DAMAGE_TYPE_HALLOSS,, armor_block, armor_soak) if(prob(33)) T.apply_effect(3, WEAKEN, armor_block) diff --git a/code/modules/mob/living/silicon/silicon-damage.dm b/code/modules/mob/living/silicon/silicon-damage.dm index d22faa575803..6fde6d1727b7 100644 --- a/code/modules/mob/living/silicon/silicon-damage.dm +++ b/code/modules/mob/living/silicon/silicon-damage.dm @@ -8,7 +8,7 @@ return // we only care about those switch(damage_type) - if(BRUTE) + if(DAMAGE_TYPE_BRUTE) adjustBruteLoss(damage) - if(BURN) + if(DAMAGE_TYPE_BURN) adjustBruteLoss(damage) diff --git a/code/modules/mob/living/simple_animal/constructs/constructs.dm b/code/modules/mob/living/simple_animal/constructs/constructs.dm index 32e833179976..e68a3e398b24 100644 --- a/code/modules/mob/living/simple_animal/constructs/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs/constructs.dm @@ -223,8 +223,8 @@ visible_message("The [P.name] bounces off of [src]'s shell!", \ "The [P.name] bounces off of [src]'s shell!") new /obj/item/material/shard/shrapnel(src.loc) - if(!(P.damage_type == BRUTE || P.damage_type == BURN)) - projectile_dam_type = BRUTE + if(!(P.damage_type == DAMAGE_TYPE_BRUTE || P.damage_type == DAMAGE_TYPE_BURN)) + projectile_dam_type = DAMAGE_TYPE_BRUTE incoming_damage = round(incoming_damage / 4) //Damage from strange sources is converted to brute for physical projectiles, though severely decreased. apply_damage(incoming_damage, projectile_dam_type, null, armorcheck, soakedcheck, is_sharp(P), has_edge(P), P) return -1 //Doesn't reflect non-beams or non-energy projectiles. They just smack and drop with little to no effect. @@ -233,8 +233,8 @@ "The [P.name] gets reflected by [src]'s shell!") damage_mod = rand(3,5) incoming_damage = (round(P.damage / damage_mod) - (round((P.damage / damage_mod) * 0.3))) - if(!(P.damage_type == BRUTE || P.damage_type == BURN)) - projectile_dam_type = BURN + if(!(P.damage_type == DAMAGE_TYPE_BRUTE || P.damage_type == DAMAGE_TYPE_BURN)) + projectile_dam_type = DAMAGE_TYPE_BURN incoming_damage = round(incoming_damage / 4) //Damage from strange sources is converted to burn for energy-type projectiles, though severely decreased. apply_damage(incoming_damage, P.damage_type, null, armorcheck, soakedcheck, is_sharp(P), has_edge(P), P) diff --git a/code/modules/mob/living/simple_mob/combat.dm b/code/modules/mob/living/simple_mob/combat.dm index e226cbbfded4..0d93a7269497 100644 --- a/code/modules/mob/living/simple_mob/combat.dm +++ b/code/modules/mob/living/simple_mob/combat.dm @@ -63,7 +63,7 @@ return FALSE // We missed. var/datum/event_args/actor/clickchain/simulated_clickchain = new(src, target = L) - var/list/shieldcall_result = L.atom_shieldcall(damage_to_do, BRUTE, MELEE_TIER_MEDIUM, ARMOR_MELEE, NONE, ATTACK_TYPE_MELEE, clickchain = simulated_clickchain) + var/list/shieldcall_result = L.atom_shieldcall(damage_to_do, DAMAGE_TYPE_BRUTE, MELEE_TIER_MEDIUM, ARMOR_MELEE, NONE, ATTACK_TYPE_MELEE, clickchain = simulated_clickchain) if(shieldcall_result[SHIELDCALL_ARG_FLAGS] & SHIELDCALL_FLAGS_BLOCK_ATTACK) return FALSE diff --git a/code/modules/mob/living/simple_mob/defense.dm b/code/modules/mob/living/simple_mob/defense.dm index af337354f3ea..cc18761c9935 100644 --- a/code/modules/mob/living/simple_mob/defense.dm +++ b/code/modules/mob/living/simple_mob/defense.dm @@ -39,7 +39,7 @@ if(INTENT_HARM) var/armor = run_armor_check(def_zone = null, attack_flag = "melee") - apply_damage(damage = harm_intent_damage, damagetype = BURN, def_zone = null, blocked = armor, blocked = resistance, used_weapon = null, sharp = FALSE, edge = FALSE) + apply_damage(damage = harm_intent_damage, damagetype = DAMAGE_TYPE_BURN, def_zone = null, blocked = armor, blocked = resistance, used_weapon = null, sharp = FALSE, edge = FALSE) L.visible_message("\The [L] [response_harm] \the [src]!") L.do_attack_animation(src) @@ -75,7 +75,7 @@ effective_force = O.damage_force //Animals can't be stunned(?) - if(O.damtype == HALLOSS) + if(O.damtype == DAMAGE_TYPE_HALLOSS) effective_force = 0 if(supernatural && istype(O,/obj/item/nullrod)) effective_force *= 2 @@ -101,7 +101,7 @@ if (3.0) bombdam = 30 - apply_damage(damage = bombdam, damagetype = BRUTE, def_zone = null, blocked = armor, blocked = resistance, used_weapon = null, sharp = FALSE, edge = FALSE) + apply_damage(damage = bombdam, damagetype = DAMAGE_TYPE_BRUTE, def_zone = null, blocked = armor, blocked = resistance, used_weapon = null, sharp = FALSE, edge = FALSE) if(bombdam > maxHealth) gib() @@ -152,7 +152,7 @@ if(shock_damage < 1) return 0 - apply_damage(damage = shock_damage, damagetype = BURN, def_zone = null, blocked = null, blocked = resistance, used_weapon = null, sharp = FALSE, edge = FALSE) + apply_damage(damage = shock_damage, damagetype = DAMAGE_TYPE_BURN, def_zone = null, blocked = null, blocked = resistance, used_weapon = null, sharp = FALSE, edge = FALSE) playsound(loc, /datum/soundbyte/grouped/sparks, 50, 1, -1) var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread @@ -182,11 +182,11 @@ if(stun_amount) stunDam += stun_amount * 0.5 - apply_damage(damage = stunDam, damagetype = BURN, def_zone = null, blocked = armor, blocked = resistance, used_weapon = used_weapon, sharp = FALSE, edge = FALSE) + apply_damage(damage = stunDam, damagetype = DAMAGE_TYPE_BURN, def_zone = null, blocked = armor, blocked = resistance, used_weapon = used_weapon, sharp = FALSE, edge = FALSE) if(agony_amount) agonyDam += agony_amount * 0.5 - apply_damage(damage = agonyDam, damagetype = BURN, def_zone = null, blocked = armor, blocked = resistance, used_weapon = used_weapon, sharp = FALSE, edge = FALSE) + apply_damage(damage = agonyDam, damagetype = DAMAGE_TYPE_BURN, def_zone = null, blocked = armor, blocked = resistance, used_weapon = used_weapon, sharp = FALSE, edge = FALSE) // Electromagnetism diff --git a/code/modules/mob/living/simple_mob/simple_mob_vr.dm b/code/modules/mob/living/simple_mob/simple_mob_vr.dm index ec7c1836ebe5..59357be84e33 100644 --- a/code/modules/mob/living/simple_mob/simple_mob_vr.dm +++ b/code/modules/mob/living/simple_mob/simple_mob_vr.dm @@ -111,7 +111,7 @@ return var/armor_block = run_armor_check(T, "melee") var/armor_soak = get_armor_soak(T, "melee") - T.apply_damage(20, HALLOSS,, armor_block, armor_soak) + T.apply_damage(20, DAMAGE_TYPE_HALLOSS,, armor_block, armor_soak) if(prob(33)) T.apply_effect(3, WEAKEN, armor_block) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/hunter.dm b/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/hunter.dm index 9589a72493c2..08f505eaf67d 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/hunter.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/hunter.dm @@ -87,7 +87,7 @@ if(L == src) continue - var/list/shieldcall_result = L.atom_shieldcall(40, BRUTE, MELEE_TIER_MEDIUM, ARMOR_MELEE, NONE, ATTACK_TYPE_MELEE) + var/list/shieldcall_result = L.atom_shieldcall(40, DAMAGE_TYPE_BRUTE, MELEE_TIER_MEDIUM, ARMOR_MELEE, NONE, ATTACK_TYPE_MELEE) if(shieldcall_result[SHIELDCALL_ARG_FLAGS] & SHIELDCALL_FLAGS_BLOCK_ATTACK) continue diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/kururak.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/kururak.dm index 9874709f3121..22615c273566 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/kururak.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/kururak.dm @@ -185,7 +185,7 @@ H.eye_blurry = max(H.eye_blurry, flash_strength + 5) H.flash_eyes() H.adjustHalLoss(flash_strength / 5) - H.apply_damage(flash_strength * H.species.flash_burn/5, BURN, BP_HEAD, 0, 0, "Photon burns") + H.apply_damage(flash_strength * H.species.flash_burn/5, DAMAGE_TYPE_BURN, BP_HEAD, 0, 0, "Photon burns") else if(issilicon(L)) if(isrobot(L)) @@ -263,7 +263,7 @@ var/mob/living/L = A if(ishuman(L)) var/mob/living/carbon/human/H = L - H.apply_damage(damage_to_apply, BRUTE, BP_TORSO, 0, 0, "Animal claws") + H.apply_damage(damage_to_apply, DAMAGE_TYPE_BRUTE, BP_TORSO, 0, 0, "Animal claws") else L.adjustBruteLoss(damage_to_apply) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/space/alien.dm b/code/modules/mob/living/simple_mob/subtypes/animal/space/alien.dm index 0aeff455be7b..4e98fa3554c9 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/space/alien.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/space/alien.dm @@ -273,12 +273,12 @@ playsound(src, "sound/mobs/biomorphs/breaker_charge_hit.ogg", 50, 1) // todo: this ignores charge_damage var/damage = rand(3,4) - M.apply_damage(2 * damage, BRUTE, BP_HEAD) - M.apply_damage(2 * damage, BRUTE, BP_TORSO) - M.apply_damage(0.5 * damage, BRUTE, BP_L_LEG) - M.apply_damage(0.5 * damage, BRUTE, BP_R_LEG) - M.apply_damage(0.5 * damage, BRUTE, BP_L_ARM) - M.apply_damage(0.5 * damage, BRUTE, BP_R_ARM) + M.apply_damage(2 * damage, DAMAGE_TYPE_BRUTE, BP_HEAD) + M.apply_damage(2 * damage, DAMAGE_TYPE_BRUTE, BP_TORSO) + M.apply_damage(0.5 * damage, DAMAGE_TYPE_BRUTE, BP_L_LEG) + M.apply_damage(0.5 * damage, DAMAGE_TYPE_BRUTE, BP_R_LEG) + M.apply_damage(0.5 * damage, DAMAGE_TYPE_BRUTE, BP_L_ARM) + M.apply_damage(0.5 * damage, DAMAGE_TYPE_BRUTE, BP_R_ARM) blood_splatter(src, M, 1) /mob/living/simple_mob/animal/space/alien/breaker/apply_melee_effects(atom/A) @@ -464,12 +464,12 @@ playsound(src, "sound/mobs/biomorphs/monarch_charge.ogg", 50, 1) // todo: this ignores charge_damage var/damage = rand(3,4) - M.apply_damage(2 * damage, BRUTE, BP_HEAD) - M.apply_damage(2 * damage, BRUTE, BP_TORSO) - M.apply_damage(0.5 * damage, BRUTE, BP_L_LEG) - M.apply_damage(0.5 * damage, BRUTE, BP_R_LEG) - M.apply_damage(0.5 * damage, BRUTE, BP_L_ARM) - M.apply_damage(0.5 * damage, BRUTE, BP_R_ARM) + M.apply_damage(2 * damage, DAMAGE_TYPE_BRUTE, BP_HEAD) + M.apply_damage(2 * damage, DAMAGE_TYPE_BRUTE, BP_TORSO) + M.apply_damage(0.5 * damage, DAMAGE_TYPE_BRUTE, BP_L_LEG) + M.apply_damage(0.5 * damage, DAMAGE_TYPE_BRUTE, BP_R_LEG) + M.apply_damage(0.5 * damage, DAMAGE_TYPE_BRUTE, BP_L_ARM) + M.apply_damage(0.5 * damage, DAMAGE_TYPE_BRUTE, BP_R_ARM) blood_splatter(src, M, 1) /mob/living/simple_mob/animal/space/alien/monarch/apply_melee_effects(atom/A) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/space/horing.dm b/code/modules/mob/living/simple_mob/subtypes/animal/space/horing.dm index d490b5426318..7039501e092d 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/space/horing.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/space/horing.dm @@ -105,12 +105,12 @@ playsound(src, 'sound/effects/splat.ogg', 50, 1) // todo: this ignores charge_damage var/damage = rand(3,4) - M.apply_damage(2 * damage, BRUTE, BP_HEAD) - M.apply_damage(2 * damage, BRUTE, BP_TORSO) - M.apply_damage(0.5 * damage, BRUTE, BP_L_LEG) - M.apply_damage(0.5 * damage, BRUTE, BP_R_LEG) - M.apply_damage(0.5 * damage, BRUTE, BP_L_ARM) - M.apply_damage(0.5 * damage, BRUTE, BP_R_ARM) + M.apply_damage(2 * damage, DAMAGE_TYPE_BRUTE, BP_HEAD) + M.apply_damage(2 * damage, DAMAGE_TYPE_BRUTE, BP_TORSO) + M.apply_damage(0.5 * damage, DAMAGE_TYPE_BRUTE, BP_L_LEG) + M.apply_damage(0.5 * damage, DAMAGE_TYPE_BRUTE, BP_R_LEG) + M.apply_damage(0.5 * damage, DAMAGE_TYPE_BRUTE, BP_L_ARM) + M.apply_damage(0.5 * damage, DAMAGE_TYPE_BRUTE, BP_R_ARM) blood_splatter(src, M, 1) /mob/living/simple_mob/animal/horing/handle_special() diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/space/worm.dm b/code/modules/mob/living/simple_mob/subtypes/animal/space/worm.dm index 9ee40ccb70c4..ad3fc03429e6 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/space/worm.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/space/worm.dm @@ -378,9 +378,9 @@ var/mob/living/carbon/C = L var/damage_cycles = rand(3, 5) for(var/I = 0, I < damage_cycles, I++) - C.apply_damage(damage = rand(10,20), damagetype = BIOACID, def_zone = pick(BP_ALL)) + C.apply_damage(damage = rand(10,20), damagetype = DAMAGE_TYPE_BIOACID, def_zone = pick(BP_ALL)) else - L.apply_damage(damage = rand(10,60), damagetype = BIOACID) + L.apply_damage(damage = rand(10,60), damagetype = DAMAGE_TYPE_BIOACID) continue DumpStomach() diff --git a/code/modules/mob/living/simple_mob/subtypes/lavaland/goliath.dm b/code/modules/mob/living/simple_mob/subtypes/lavaland/goliath.dm index ff11f5cdb894..a56600e2c8a3 100644 --- a/code/modules/mob/living/simple_mob/subtypes/lavaland/goliath.dm +++ b/code/modules/mob/living/simple_mob/subtypes/lavaland/goliath.dm @@ -274,7 +274,7 @@ C.adjustBruteLoss(rand(5,10)) latched = TRUE for(var/obj/vehicle/sealed/mecha/M in loc) - M.take_damage_legacy(20, BRUTE, null, null, null, 25) + M.take_damage_legacy(20, DAMAGE_TYPE_BRUTE, null, null, null, 25) if(!latched) retract() else diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/cyber_horror/cyber_horror.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/cyber_horror/cyber_horror.dm index f1a3af03bba1..10d2d713edf9 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/cyber_horror/cyber_horror.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/cyber_horror/cyber_horror.dm @@ -182,7 +182,7 @@ if(L == src) continue - var/list/shieldcall_result = L.atom_shieldcall(40, BRUTE, MELEE_TIER_MEDIUM, ARMOR_MELEE, NONE, ATTACK_TYPE_MELEE) + var/list/shieldcall_result = L.atom_shieldcall(40, DAMAGE_TYPE_BRUTE, MELEE_TIER_MEDIUM, ARMOR_MELEE, NONE, ATTACK_TYPE_MELEE) if(shieldcall_result[SHIELDCALL_ARG_FLAGS] & SHIELDCALL_FLAGS_BLOCK_ATTACK) continue @@ -324,7 +324,7 @@ name = "energy missle" icon_state = "force_missile" damage_force = 12 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN //Direct Ranged Mob /mob/living/simple_mob/mechanical/cyber_horror/corgi @@ -390,11 +390,12 @@ //These are the projectiles mobs use /obj/projectile/beam/drone damage_force = 3 + /obj/projectile/arc/blue_energy name = "energy missle" icon_state = "force_missile" damage_force = 12 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN //Boss Mob - The High Priest /mob/living/simple_mob/mechanical/cyber_horror/priest @@ -431,7 +432,7 @@ name = "nanite cloud" icon_state = "particle-heavy" damage_force = 15 - damage_type = BRUTE + damage_type = DAMAGE_TYPE_BRUTE /obj/projectile/arc/blue_energy/priest/on_impact(atom/target, impact_flags, def_zone, efficiency) . = ..() diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/hivebot.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/hivebot.dm index 0f9f0af3d52b..dc0d7a6f28be 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/hivebot.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/hivebot.dm @@ -55,7 +55,7 @@ // The hivebot's default projectile. /obj/projectile/bullet/hivebot damage_force = 10 - damage_type = BRUTE + damage_type = DAMAGE_TYPE_BRUTE sharp = FALSE edge = FALSE diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/ranged_damage.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/ranged_damage.dm index 73243bb462fd..3f5869cb06de 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/ranged_damage.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/ranged_damage.dm @@ -125,8 +125,9 @@ /obj/projectile/arc/blue_energy name = "energy missile" icon_state = "force_missile" + // A bit stronger since arcing projectiles are much easier to avoid than traditional ones. damage_force = 15 // A bit stronger since arcing projectiles are much easier to avoid than traditional ones. - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN // Very long ranged hivebot that rains down hell. // Their projectiles arc, meaning they go over everything until it hits the ground. diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/adv_dark_gygax.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/adv_dark_gygax.dm index be19896e88ce..0d294b921ec8 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/adv_dark_gygax.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/adv_dark_gygax.dm @@ -122,7 +122,7 @@ name = "homing bolt" icon_state = "force_missile" damage_force = 20 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN damage_flag = ARMOR_LASER speed = 5 * WORLD_ICON_SIZE homing_turn_speed = 85 diff --git a/code/modules/mob/living/simple_mob/subtypes/occult/constructs/juggernaut.dm b/code/modules/mob/living/simple_mob/subtypes/occult/constructs/juggernaut.dm index a83f4307fb8d..ef6daf28a817 100644 --- a/code/modules/mob/living/simple_mob/subtypes/occult/constructs/juggernaut.dm +++ b/code/modules/mob/living/simple_mob/subtypes/occult/constructs/juggernaut.dm @@ -75,8 +75,8 @@ visible_message("The [proj.name] bounces off of [src]'s shell!", \ "The [proj.name] bounces off of [src]'s shell!") new /obj/item/material/shard/shrapnel(src.loc) - if(!(proj.damage_type == BRUTE || proj.damage_type == BURN)) - projectile_dam_type = BRUTE + if(!(proj.damage_type == DAMAGE_TYPE_BRUTE || proj.damage_type == DAMAGE_TYPE_BURN)) + projectile_dam_type = DAMAGE_TYPE_BRUTE incoming_damage = round(incoming_damage / 4) //Damage from strange sources is converted to brute for physical projectiles, though severely decreased. apply_damage(incoming_damage, projectile_dam_type, null, armorcheck, soakedcheck, is_sharp(proj), has_edge(proj), proj) return ..() @@ -85,8 +85,8 @@ "The [proj.name] gets reflected by [src]'s shell!") damage_mod = rand(3,5) incoming_damage = (round(proj.damage_force / damage_mod) - (round((proj.damage_force / damage_mod) * 0.3))) - if(!(proj.damage_type == BRUTE || proj.damage_type == BURN)) - projectile_dam_type = BURN + if(!(proj.damage_type == DAMAGE_TYPE_BRUTE || proj.damage_type == DAMAGE_TYPE_BURN)) + projectile_dam_type = DAMAGE_TYPE_BURN incoming_damage = round(incoming_damage / 4) //Damage from strange sources is converted to burn for energy-type projectiles, though severely decreased. apply_damage(incoming_damage, proj.damage_type, null, armorcheck, soakedcheck, is_sharp(proj), has_edge(proj), proj) diff --git a/code/modules/mob/living/simple_mob/subtypes/slime/feral/feral.dm b/code/modules/mob/living/simple_mob/subtypes/slime/feral/feral.dm index c407ff732416..f96303e4280c 100644 --- a/code/modules/mob/living/simple_mob/subtypes/slime/feral/feral.dm +++ b/code/modules/mob/living/simple_mob/subtypes/slime/feral/feral.dm @@ -65,7 +65,7 @@ name = "icicle" icon_state = "ice_2" damage_force = 40 - damage_type = BRUTE + damage_type = DAMAGE_TYPE_BRUTE damage_flag = ARMOR_MELEE armor_penetration = 30 speed = 7.5 * WORLD_ICON_SIZE diff --git a/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/subtypes.dm b/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/subtypes.dm index 2106c9d7dbf4..c8e5ab414ba7 100644 --- a/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/subtypes.dm +++ b/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/subtypes.dm @@ -201,12 +201,13 @@ /mob/living/simple_mob/slime/xenobio/dark_purple/on_bullet_act(obj/projectile/proj, impact_flags, list/bullet_act_args) . = ..() - if(proj.damage_type && proj.damage_type == BURN && proj.damage_force) // Most bullets won't trigger the explosion, as a mercy towards Security. + // Most bullets won't trigger the explosion, as a mercy towards Security. + if(proj.damage_type && proj.damage_type == DAMAGE_TYPE_BURN && proj.damage_force) log_and_message_admins("[src] ignited due to bring hit by a burning projectile[proj.firer ? " by [key_name(proj.firer)]" : ""].") ignite() /mob/living/simple_mob/slime/xenobio/dark_purple/attackby(var/obj/item/W, var/mob/user) - if(istype(W) && W.damage_force && W.damtype == BURN) + if(istype(W) && W.damage_force && W.damtype == DAMAGE_TYPE_BURN) log_and_message_admins("[src] ignited due to being hit with a burning weapon ([W]) by [key_name(user)].") ignite() else @@ -654,12 +655,13 @@ /mob/living/simple_mob/slime/xenobio/oil/on_bullet_act(obj/projectile/proj, impact_flags, list/bullet_act_args) . = ..() - if(proj.damage_type && proj.damage_type == BURN && proj.damage_force) // Most bullets won't trigger the explosion, as a mercy towards Security. + // Most bullets won't trigger the explosion, as a mercy towards Security. + if(proj.damage_type && proj.damage_type == DAMAGE_TYPE_BURN && proj.damage_force) log_and_message_admins("[src] exploded due to bring hit by a burning projectile[proj.firer ? " by [key_name(proj.firer)]" : ""].") explode() /mob/living/simple_mob/slime/xenobio/oil/attackby(obj/item/W, mob/living/user) - if(istype(W) && W.damage_force && W.damtype == BURN) + if(istype(W) && W.damage_force && W.damtype == DAMAGE_TYPE_BURN) log_and_message_admins("[src] exploded due to being hit with a burning weapon ([W]) by [key_name(user)].") explode() else diff --git a/code/modules/modular_computers/computers/modular_computer/damage.dm b/code/modules/modular_computers/computers/modular_computer/damage.dm index 9a1f0c5cad0f..147ee701b526 100644 --- a/code/modules/modular_computers/computers/modular_computer/damage.dm +++ b/code/modules/modular_computers/computers/modular_computer/damage.dm @@ -54,9 +54,9 @@ /obj/item/modular_computer/on_bullet_act(obj/projectile/proj, impact_flags, list/bullet_act_args) . = ..() switch(proj.damage_type) - if(BRUTE) + if(DAMAGE_TYPE_BRUTE) take_damage_legacy(proj.damage_force, proj.damage_force / 2) - if(HALLOSS) + if(DAMAGE_TYPE_HALLOSS) take_damage_legacy(proj.damage_force, proj.damage_force / 3, 0) - if(BURN) + if(DAMAGE_TYPE_BURN) take_damage_legacy(proj.damage_force, proj.damage_force / 1.5) diff --git a/code/modules/organs/external/external.dm b/code/modules/organs/external/external.dm index ded3e53b1096..e1bed09a1c9f 100644 --- a/code/modules/organs/external/external.dm +++ b/code/modules/organs/external/external.dm @@ -398,11 +398,11 @@ if(can_inflict_brute >= brute) if(can_cut) if(sharp && !edge) - create_wound( PIERCE, brute ) + create_wound( WOUND_TYPE_PIERCE, brute ) else - create_wound( CUT, brute ) + create_wound( WOUND_TYPE_CUT, brute ) else - create_wound( BRUISE, brute ) + create_wound( WOUND_TYPE_BRUISE, brute ) else if(!(damage_mode & DAMAGE_MODE_NO_OVERFLOW)) var/overflow_brute = brute - can_inflict_brute // keep allowing it, but, diminishing returns @@ -412,24 +412,24 @@ overflow_brute -= damage_anyways_brute if(can_cut) if(sharp && !edge) - create_wound( PIERCE, damage_anyways_brute ) + create_wound( WOUND_TYPE_PIERCE, damage_anyways_brute ) else - create_wound( CUT, damage_anyways_brute ) + create_wound( WOUND_TYPE_CUT, damage_anyways_brute ) else - create_wound( BRUISE, damage_anyways_brute ) + create_wound( WOUND_TYPE_BRUISE, damage_anyways_brute ) // rest goes into shock owner.shock_stage += overflow_brute * 0.33 if(burn) var/can_inflict_burn = max(0, max_damage - burn_dam) if(can_inflict_burn >= burn) - create_wound( BURN, burn ) + create_wound( WOUND_TYPE_BURN, burn ) else var/overflow_burn = burn - can_inflict_burn var/damage_anyways_burn = !(damage_mode & DAMAGE_MODE_NO_OVERFLOW) && ( \ overflow_burn * min(1, 1 / ((max(burn_dam, max_damage) + damage_softcap_intensifier) / (damage_softcap_intensifier + max_damage))) \ ) overflow_burn -= damage_anyways_burn - create_wound(BURN, damage_anyways_burn + can_inflict_burn) + create_wound(WOUND_TYPE_BURN, damage_anyways_burn + can_inflict_burn) // rest goes into shock owner.shock_stage += overflow_burn * 0.33 @@ -504,7 +504,7 @@ break // heal brute damage - if(W.damage_type == BURN) + if(W.wound_type == WOUND_TYPE_BURN) burn = W.heal_damage(burn) else brute = W.heal_damage(brute) @@ -527,9 +527,9 @@ var/damage_amount switch(damage_type) - if(BRUTE) + if(DAMAGE_TYPE_BRUTE) damage_amount = brute_dam - if(BURN) + if(DAMAGE_TYPE_BURN) damage_amount = burn_dam if("omni") damage_amount = max(brute_dam,burn_dam) @@ -562,9 +562,9 @@ return FALSE switch(damage_type) - if(BRUTE) + if(DAMAGE_TYPE_BRUTE) src.heal_damage(repair_amount, 0, 0, 1) - if(BURN) + if(DAMAGE_TYPE_BURN) src.heal_damage(0, repair_amount, 0, 1) if("omni") src.heal_damage(repair_amount, repair_amount, 0, 1) @@ -849,7 +849,7 @@ Note that amputating the affected organ does in fact remove the infection from t //update damage counts for(var/datum/wound/W as anything in wounds) if(!W.internal) //so IB doesn't count towards crit/paincrit - if(W.damage_type == BURN) + if(W.wound_type == WOUND_TYPE_BURN) burn_dam += W.damage else brute_dam += W.damage @@ -862,7 +862,7 @@ Note that amputating the affected organ does in fact remove the infection from t wound_tally += W.amount - //things tend to bleed if they are CUT OPEN + //things tend to bleed if they are WOUND_TYPE_CUT OPEN if (open && !clamped && (H && H.should_have_organ(O_HEART))) status |= ORGAN_BLEEDING @@ -1270,7 +1270,7 @@ Note that amputating the affected organ does in fact remove the infection from t if(!owner || loc != owner) return if(owner.species.reagent_tag == IS_SLIME) - create_wound( CUT, 15 ) //fixes proms being bugged into paincrit;instead whatever would embed now just takes a chunk out + create_wound( WOUND_TYPE_CUT, 15 ) //fixes proms being bugged into paincrit;instead whatever would embed now just takes a chunk out src.visible_message("[owner] has been seriously wounded by [W]!") W.add_blood(owner) return 0 @@ -1429,7 +1429,7 @@ Note that amputating the affected organ does in fact remove the infection from t if(W.internal && !open) continue // can't see internal wounds var/this_wound_desc = W.desc - if(W.damage_type == BURN && W.salved) + if(W.wound_type == WOUND_TYPE_BURN && W.salved) this_wound_desc = "salved [this_wound_desc]" if(W.bleeding()) diff --git a/code/modules/organs/external/wound.dm b/code/modules/organs/external/wound.dm index b9d9f52431ff..a56c1f153e98 100644 --- a/code/modules/organs/external/wound.dm +++ b/code/modules/organs/external/wound.dm @@ -3,26 +3,26 @@ * * todo: better documentation */ -/obj/item/organ/external/proc/create_wound(var/type = CUT, var/damage) +/obj/item/organ/external/proc/create_wound(var/type = WOUND_TYPE_CUT, var/damage) if(damage == 0) return //moved this before the open_wound check so that having many small wounds for example doesn't somehow protect you from taking internal damage (because of the return) //Possibly trigger an internal wound, too. var/local_damage = brute_dam + burn_dam + damage - if((damage > 15) && (type != BURN) && (local_damage > 30) && prob(damage) && (robotic < ORGAN_ROBOT) && !(species.species_flags & NO_BLOOD)) + if((damage > 15) && (type != WOUND_TYPE_BURN) && (local_damage > 30) && prob(damage) && (robotic < ORGAN_ROBOT) && !(species.species_flags & NO_BLOOD)) create_specific_wound(/datum/wound/internal_bleeding, min(damage - 15, 15)) owner.custom_pain("You feel something rip in your [name]!", 50) //Burn damage can cause fluid loss due to blistering and cook-off - if((damage > 5 || damage + burn_dam >= 15) && type == BURN && (robotic < ORGAN_ROBOT) && !(species.species_flags & NO_BLOOD)) + if((damage > 5 || damage + burn_dam >= 15) && type == WOUND_TYPE_BURN && (robotic < ORGAN_ROBOT) && !(species.species_flags & NO_BLOOD)) var/fluid_loss = 0.4 * (damage/(owner.getMaxHealth() - config_legacy.health_threshold_dead)) * owner.species.blood_volume*(1 - owner.species.blood_level_fatal) owner.remove_blood(fluid_loss) // first check whether we can widen an existing wound if(length(wounds) > 0 && prob(max(50+(wound_tally-1)*10,90))) - if((type == CUT || type == BRUISE) && damage >= 5) + if((type == WOUND_TYPE_CUT || type == WOUND_TYPE_BRUISE) && damage >= 5) //we need to make sure that the wound we are going to worsen is compatible with the type of damage... var/list/compatible_wounds = list() for (var/datum/wound/W as anything in wounds) @@ -188,8 +188,8 @@ var/internal = FALSE // maximum stage at which bleeding should still happen. Beyond this stage bleeding is prevented. var/max_bleeding_stage = 0 - // one of CUT, PIERCE, BRUISE, BURN - var/damage_type = CUT + // one of WOUND_TYPE_CUT, WOUND_TYPE_PIERCE, WOUND_TYPE_BRUISE, WOUND_TYPE_BURN + var/wound_type = WOUND_TYPE_CUT // whether this wound needs a bandage/salve to heal at all // the maximum amount of damage that this wound can have and still autoheal var/autoheal_cutoff = 10 @@ -243,9 +243,9 @@ // checks whether the wound has been appropriately treated /datum/wound/proc/is_treated() - if(damage_type == BRUISE || damage_type == CUT || damage_type == PIERCE) + if(wound_type == WOUND_TYPE_BRUISE || wound_type == WOUND_TYPE_CUT || wound_type == WOUND_TYPE_PIERCE) return bandaged - else if(damage_type == BURN) + else if(wound_type == WOUND_TYPE_BURN) return salved // Checks whether other other can be merged into src. @@ -254,7 +254,7 @@ return 0 if (other.current_stage != src.current_stage) return 0 - if (other.damage_type != src.damage_type) + if (other.wound_type != src.wound_type) return 0 if (!(other.can_autoheal()) != !(src.can_autoheal())) return 0 @@ -295,7 +295,7 @@ return FALSE if (is_treated() && damage < 25) //anything less than a flesh wound (or equivalent) isn't infectable if treated properly return FALSE - if (damage_type == BRUISE && !bleeding()) //bruises only infectable if bleeding + if (wound_type == WOUND_TYPE_BRUISE && !bleeding()) //bruises only infectable if bleeding return FALSE @@ -303,12 +303,12 @@ return TRUE var/dam_coef = round(damage/10) - switch (damage_type) - if (BRUISE) + switch (wound_type) + if (WOUND_TYPE_BRUISE) return prob(dam_coef*5) - if (BURN) + if (WOUND_TYPE_BURN) return prob(dam_coef*10) - if (CUT) + if (WOUND_TYPE_CUT) return prob(dam_coef*20) return FALSE @@ -355,8 +355,8 @@ // returns whether this wound can absorb the given amount of damage. // this will prevent large amounts of damage being trapped in less severe wound types -/datum/wound/proc/can_worsen(damage_type, damage) - if (src.damage_type != damage_type) +/datum/wound/proc/can_worsen(woud_type, damage) + if (src.wound_type != woud_type) return 0 //incompatible damage types if (src.amount > 1) @@ -392,9 +392,9 @@ //the damage amount for the stage with the same name as the wound. //e.g. /datum/wound/cut/deep should only be applied for 15 damage and up, //because in it's stages list, "deep cut" = 15. -/proc/get_wound_type(type = CUT, damage) +/proc/get_wound_type(type = WOUND_TYPE_CUT, damage) switch(type) - if(CUT) + if(WOUND_TYPE_CUT) switch(damage) if(70 to INFINITY) return /datum/wound/cut/massive @@ -408,7 +408,7 @@ return /datum/wound/cut/deep if(0 to 15) return /datum/wound/cut/small - if(PIERCE) + if(WOUND_TYPE_PIERCE) switch(damage) if(60 to INFINITY) return /datum/wound/puncture/massive @@ -420,9 +420,9 @@ return /datum/wound/puncture/flesh if(0 to 15) return /datum/wound/puncture/small - if(BRUISE) + if(WOUND_TYPE_BRUISE) return /datum/wound/bruise - if(BURN) + if(WOUND_TYPE_BURN) switch(damage) if(50 to INFINITY) return /datum/wound/burn/carbonised diff --git a/code/modules/organs/external/wounds/amputation.dm b/code/modules/organs/external/wounds/amputation.dm index 559f5cdff37b..6ad2f319899e 100644 --- a/code/modules/organs/external/wounds/amputation.dm +++ b/code/modules/organs/external/wounds/amputation.dm @@ -7,7 +7,7 @@ switch(losstype) if(DROPLIMB_EDGE, DROPLIMB_BLUNT) - damage_type = CUT + wound_type = WOUND_TYPE_CUT max_bleeding_stage = 3 //clotted stump and above can bleed. stages = list( "ripped stump" = damage_amt*1.3, @@ -16,7 +16,7 @@ "scarred stump" = 0 ) if(DROPLIMB_BURN) - damage_type = BURN + wound_type = WOUND_TYPE_BURN stages = list( "ripped charred stump" = damage_amt*1.3, "charred stump" = damage_amt, diff --git a/code/modules/organs/external/wounds/brute.dm b/code/modules/organs/external/wounds/brute.dm index e891b7bf1404..b28d2a5ad171 100644 --- a/code/modules/organs/external/wounds/brute.dm +++ b/code/modules/organs/external/wounds/brute.dm @@ -1,7 +1,7 @@ /** CUTS **/ /datum/wound/cut bleed_threshold = 5 - damage_type = CUT + wound_type = WOUND_TYPE_CUT /datum/wound/cut/small // link wound descriptions to amounts of damage @@ -33,35 +33,35 @@ /** PUNCTURES **/ /datum/wound/puncture bleed_threshold = 5 - damage_type = PIERCE + wound_type = WOUND_TYPE_PIERCE -/datum/wound/puncture/can_worsen(damage_type, damage) +/datum/wound/puncture/can_worsen(woud_type, damage) return 0 //puncture wounds cannot be enlargened /datum/wound/puncture/small max_bleeding_stage = 2 stages = list("puncture" = 5, "healing puncture" = 2, "small scab" = 0) - damage_type = PIERCE + wound_type = WOUND_TYPE_PIERCE /datum/wound/puncture/flesh max_bleeding_stage = 2 stages = list("puncture wound" = 15, "blood soaked clot" = 5, "large scab" = 2, "small round scar" = 0) - damage_type = PIERCE + wound_type = WOUND_TYPE_PIERCE /datum/wound/puncture/gaping max_bleeding_stage = 3 stages = list("gaping hole" = 30, "large blood soaked clot" = 15, "blood soaked clot" = 10, "small angry scar" = 5, "small round scar" = 0) - damage_type = PIERCE + wound_type = WOUND_TYPE_PIERCE /datum/wound/puncture/gaping_big max_bleeding_stage = 3 stages = list("big gaping hole" = 50, "healing gaping hole" = 20, "large blood soaked clot" = 15, "large angry scar" = 10, "large round scar" = 0) - damage_type = PIERCE + wound_type = WOUND_TYPE_PIERCE /datum/wound/puncture/massive max_bleeding_stage = 3 stages = list("massive wound" = 60, "massive healing wound" = 30, "massive blood soaked clot" = 25, "massive angry scar" = 10, "massive jagged scar" = 0) - damage_type = PIERCE + wound_type = WOUND_TYPE_PIERCE /** BRUISES **/ /datum/wound/bruise @@ -69,4 +69,4 @@ "moderate bruise" = 20, "small bruise" = 10, "tiny bruise" = 5) bleed_threshold = 20 max_bleeding_stage = 2 //only huge bruise and above can bleed. - damage_type = BRUISE + wound_type = WOUND_TYPE_BRUISE diff --git a/code/modules/organs/external/wounds/burn.dm b/code/modules/organs/external/wounds/burn.dm index c6354a23a2d3..5378fa7235d6 100644 --- a/code/modules/organs/external/wounds/burn.dm +++ b/code/modules/organs/external/wounds/burn.dm @@ -1,6 +1,6 @@ /** BURNS **/ /datum/wound/burn - damage_type = BURN + wound_type = WOUND_TYPE_BURN max_bleeding_stage = 0 /datum/wound/burn/bleeding() diff --git a/code/modules/organs/internal/subtypes/heart.dm b/code/modules/organs/internal/subtypes/heart.dm index 7411fe2fd6da..cf8750917cc3 100644 --- a/code/modules/organs/internal/subtypes/heart.dm +++ b/code/modules/organs/internal/subtypes/heart.dm @@ -19,7 +19,7 @@ if (. >= 2) if(prob(1)) owner.custom_pain("A stabbing pain rolls through your chest!",1) - owner.apply_damage(damage = 25, damagetype = HALLOSS, def_zone = parent_organ) + owner.apply_damage(damage = 25, damagetype = DAMAGE_TYPE_HALLOSS, def_zone = parent_organ) /obj/item/organ/internal/heart/robotize() ..() diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 6c44c94cc9d3..21443c6f6e00 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -192,7 +192,7 @@ edge = 1 set_weight_class(active_w_class) playsound(src, 'sound/weapons/saberon.ogg', 15, 1) - damtype = SEARING + damtype = DAMAGE_TYPE_SEARING item_flags |= ITEM_THROW_UNCATCHABLE attack_verb |= list(\ @@ -214,7 +214,7 @@ sharp = initial(sharp) edge = initial(edge) set_weight_class(initial(w_class)) - damtype = BRUTE + damtype = DAMAGE_TYPE_BRUTE item_flags &= ~ITEM_THROW_UNCATCHABLE /obj/item/pen/blade/blue diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 1fb24c0571e5..e0d015625a91 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -588,7 +588,7 @@ GLOBAL_LIST_INIT(possible_cable_coil_colours, list( var/use_amt = min(src.amount, CEILING(S.burn_dam / 20, 1), 5) if(can_use(use_amt)) - if(S.robo_repair(5*use_amt, BURN, "some damaged wiring", src, user)) + if(S.robo_repair(5*use_amt, DAMAGE_TYPE_BURN, "some damaged wiring", src, user)) use(use_amt) return return ..() diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 6c1603b29ed7..2d39339f3b83 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -609,7 +609,7 @@ /obj/machinery/power/rtg/abductor/on_bullet_act(obj/projectile/proj, impact_flags, list/bullet_act_args) . = ..() - if(!going_kaboom && istype(proj) && !proj.nodamage && ((proj.damage_type == BURN) || (proj.damage_type == BRUTE))) + if(!going_kaboom && istype(proj) && !proj.nodamage && ((proj.damage_type == DAMAGE_TYPE_BURN) || (proj.damage_type == DAMAGE_TYPE_BRUTE))) log_and_message_admins("[ADMIN_LOOKUPFLW(proj.firer)] triggered an Abductor Core explosion at [x],[y],[z] via projectile.") asplod() diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index b8855840d8c2..0f214b043d92 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -754,11 +754,11 @@ // return // in_chamber.on_hit(M) -// if(in_chamber.damage_type != HALLOSS && !in_chamber.nodamage) +// if(in_chamber.damage_type != DAMAGE_TYPE_HALLOSS && !in_chamber.nodamage) // log_and_message_admins("[key_name(user)] commited suicide using \a [src]") // user.apply_damage(in_chamber.damage_force*2.5, in_chamber.damage_type, "head", used_weapon = "Point blank shot in the mouth with \a [in_chamber]", sharp=1) // user.death() -// else if(in_chamber.damage_type == HALLOSS) +// else if(in_chamber.damage_type == DAMAGE_TYPE_HALLOSS) // to_chat(user, "Ow...") // user.apply_effect(110,AGONY,0) // qdel(in_chamber) diff --git a/code/modules/projectiles/guns/ballistic/microbattery/revolver_cells.dm b/code/modules/projectiles/guns/ballistic/microbattery/revolver_cells.dm index ad64c9ff383e..dd98d6edcfec 100644 --- a/code/modules/projectiles/guns/ballistic/microbattery/revolver_cells.dm +++ b/code/modules/projectiles/guns/ballistic/microbattery/revolver_cells.dm @@ -87,7 +87,7 @@ icon_state = "omnilaser" nodamage = 1 agony = 5 - damage_type = HALLOSS + damage_type = DAMAGE_TYPE_HALLOSS light_color = "#00CC33" muzzle_type = /obj/effect/projectile/muzzle/laser_omni diff --git a/code/modules/projectiles/guns/energy/particle.dm b/code/modules/projectiles/guns/energy/particle.dm index 0f748741ae03..1a230c11a3d5 100644 --- a/code/modules/projectiles/guns/energy/particle.dm +++ b/code/modules/projectiles/guns/energy/particle.dm @@ -174,7 +174,7 @@ icon = 'icons/obj/projectiles_vr.dmi' icon_state = "particle" damage_force = 40 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN damage_flag = ARMOR_ENERGY embed_chance = 0 diff --git a/code/modules/projectiles/guns/legacy_vr_guns/pummeler.dm b/code/modules/projectiles/guns/legacy_vr_guns/pummeler.dm index da545d3156c0..3a26adbbacaf 100644 --- a/code/modules/projectiles/guns/legacy_vr_guns/pummeler.dm +++ b/code/modules/projectiles/guns/legacy_vr_guns/pummeler.dm @@ -30,7 +30,7 @@ name = "sonic blast" icon_state = "sound" damage_force = 5 - damage_type = BRUTE + damage_type = DAMAGE_TYPE_BRUTE damage_flag = ARMOR_MELEE embed_chance = 0 vacuum_traversal = 0 diff --git a/code/modules/projectiles/guns/legacy_vr_guns/sickshot.dm b/code/modules/projectiles/guns/legacy_vr_guns/sickshot.dm index 8619942623d3..0b851cdbae8d 100644 --- a/code/modules/projectiles/guns/legacy_vr_guns/sickshot.dm +++ b/code/modules/projectiles/guns/legacy_vr_guns/sickshot.dm @@ -28,7 +28,7 @@ icon_state = "sound" damage_force = 5 armor_penetration = 30 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN damage_flag = ARMOR_MELEE embed_chance = 0 vacuum_traversal = 0 diff --git a/code/modules/projectiles/guns/vox.dm b/code/modules/projectiles/guns/vox.dm index b9426a4e3590..3ef5d6f19358 100644 --- a/code/modules/projectiles/guns/vox.dm +++ b/code/modules/projectiles/guns/vox.dm @@ -78,7 +78,7 @@ nodamage = 1 taser_effect = 1 agony = 55 - damage_type = HALLOSS + damage_type = DAMAGE_TYPE_HALLOSS light_color = "#8837A3" muzzle_type = /obj/effect/projectile/muzzle/darkmatterstun @@ -91,7 +91,7 @@ fire_sound = 'sound/weapons/eLuger.ogg' damage_force = 35 armor_penetration = 35 - damage_type = BRUTE + damage_type = DAMAGE_TYPE_BRUTE damage_flag = ARMOR_ENERGY light_color = "#8837A3" @@ -107,7 +107,7 @@ fire_sound = 'sound/weapons/eLuger.ogg' damage_force = 20 armor_penetration = 35 - damage_type = BRUTE + damage_type = DAMAGE_TYPE_BRUTE damage_flag = ARMOR_ENERGY light_color = "#8837A3" @@ -140,7 +140,7 @@ fire_sound = 'sound/effects/basscannon.ogg' damage_force = 5 armor_penetration = 30 - damage_type = BRUTE + damage_type = DAMAGE_TYPE_BRUTE damage_flag = ARMOR_MELEE embed_chance = 0 vacuum_traversal = 0 diff --git a/code/modules/projectiles/projectile/projectile.dm b/code/modules/projectiles/projectile/projectile.dm index 22f6957f6458..184778fbc77f 100644 --- a/code/modules/projectiles/projectile/projectile.dm +++ b/code/modules/projectiles/projectile/projectile.dm @@ -290,7 +290,7 @@ /// damage tier - goes hand in hand with [damage_armor] var/damage_tier = BULLET_TIER_DEFAULT /// todo: legacy - BRUTE, BURN, TOX, OXY, CLONE, HALLOSS, ELECTROCUTE, BIOACID are the only things that should be in here - var/damage_type = BRUTE + var/damage_type = DAMAGE_TYPE_BRUTE /// armor flag for damage - goes hand in hand with [damage_tier] var/damage_flag = ARMOR_BULLET /// damage mode - see [code/__DEFINES/combat/damage.dm] @@ -512,12 +512,12 @@ //Checks if the projectile is eligible for embedding. Not that it necessarily will. /obj/projectile/proc/can_embed() //embed must be enabled and damage type must be brute - if(embed_chance == 0 || damage_type != BRUTE) + if(embed_chance == 0 || damage_type != DAMAGE_TYPE_BRUTE) return 0 return 1 /obj/projectile/proc/get_structure_damage() - if(damage_type == BRUTE || damage_type == BURN) + if(damage_type == DAMAGE_TYPE_BRUTE || damage_type == DAMAGE_TYPE_BURN) return damage_force return 0 @@ -964,7 +964,7 @@ */ /obj/projectile/proc/on_impact(atom/target, impact_flags, def_zone, efficiency = 1) //! legacy shit - if(damage_force && damage_type == BURN) + if(damage_force && damage_type == DAMAGE_TYPE_BURN) var/turf/T = get_turf(target) if(T) T.hotspot_expose(700, 5) diff --git a/code/modules/projectiles/projectile/subtypes/animate.dm b/code/modules/projectiles/projectile/subtypes/animate.dm index 3f09f36a370f..885253b8cf7a 100644 --- a/code/modules/projectiles/projectile/subtypes/animate.dm +++ b/code/modules/projectiles/projectile/subtypes/animate.dm @@ -2,7 +2,7 @@ name = "bolt of animation" icon_state = "ice_1" damage_force = 0 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN nodamage = 1 damage_flag = ARMOR_ENERGY light_range = 2 diff --git a/code/modules/projectiles/projectile/subtypes/arc.dm b/code/modules/projectiles/projectile/subtypes/arc.dm index 743ecdc05f75..805b9fd726cf 100644 --- a/code/modules/projectiles/projectile/subtypes/arc.dm +++ b/code/modules/projectiles/projectile/subtypes/arc.dm @@ -18,7 +18,7 @@ name = "energy missile" icon_state = "force_missile" damage_force = 15 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN /obj/projectile/arc/blue_energy/on_impact(atom/target, impact_flags, def_zone, efficiency) . = ..() diff --git a/code/modules/projectiles/projectile/subtypes/beam/beams.dm b/code/modules/projectiles/projectile/subtypes/beam/beams.dm index 37133be7eacd..e005a675ee5a 100644 --- a/code/modules/projectiles/projectile/subtypes/beam/beams.dm +++ b/code/modules/projectiles/projectile/subtypes/beam/beams.dm @@ -4,7 +4,7 @@ fire_sound = 'sound/weapons/weaponsounds_laserstrong.ogg' pass_flags = ATOM_PASS_TABLE | ATOM_PASS_GLASS | ATOM_PASS_GRILLE damage_force = 40 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN damage_flag = ARMOR_LASER projectile_type = PROJECTILE_TYPE_BEAM | PROJECTILE_TYPE_PHOTONIC eyeblur = 4 @@ -24,7 +24,7 @@ name = "laser" icon_state = "laser" damage_force = 0 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN damage_flag = ARMOR_LASER eyeblur = 2 impact_sounds = null @@ -145,7 +145,7 @@ name = "lasertag beam" damage_force = 0 eyeblur = 0 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN damage_flag = ARMOR_LASER combustion = FALSE @@ -216,7 +216,7 @@ nodamage = 1 taser_effect = 1 agony = 40 - damage_type = HALLOSS + damage_type = DAMAGE_TYPE_HALLOSS light_color = "#FFFFFF" impact_sounds = null @@ -244,7 +244,7 @@ nodamage = 1 taser_effect = 1 agony = 30 - damage_type = HALLOSS + damage_type = DAMAGE_TYPE_HALLOSS light_color = "#FFFFFF" combustion = FALSE @@ -290,7 +290,7 @@ /obj/projectile/beam/shock name = "shock beam" icon_state = "lightning" - damage_type = ELECTROCUTE + damage_type = DAMAGE_TYPE_ELECTROCUTE muzzle_type = /obj/effect/projectile/muzzle/lightning tracer_type = /obj/effect/projectile/tracer/lightning @@ -316,7 +316,7 @@ name = "point defense salvo" icon_state = "laser" damage_force = 15 - damage_type = ELECTROCUTE //You should be safe inside a voidsuit + damage_type = DAMAGE_TYPE_ELECTROCUTE //You should be safe inside a voidsuit sharp = FALSE //"Wide" spectrum beam light_color = "#A9980A" diff --git a/code/modules/projectiles/projectile/subtypes/beam/beams_vr.dm b/code/modules/projectiles/projectile/subtypes/beam/beams_vr.dm index dab42cccdf8f..5b0c9128aecd 100644 --- a/code/modules/projectiles/projectile/subtypes/beam/beams_vr.dm +++ b/code/modules/projectiles/projectile/subtypes/beam/beams_vr.dm @@ -4,7 +4,7 @@ nodamage = 1 taser_effect = 1 agony = 100 //One shot stuns for the time being until adjustments are fully made. - damage_type = HALLOSS + damage_type = DAMAGE_TYPE_HALLOSS light_color = "#00CECE" muzzle_type = /obj/effect/projectile/muzzle/laser_omni @@ -19,7 +19,7 @@ icon_state = "xray" nodamage = 1 agony = 5 - damage_type = HALLOSS + damage_type = DAMAGE_TYPE_HALLOSS light_color = "#00CC33" muzzle_type = /obj/effect/projectile/muzzle/xray @@ -51,7 +51,7 @@ icon_state = "healbeam" damage_force = 0 //stops it damaging walls nodamage = TRUE - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN damage_flag = ARMOR_LASER light_color = "#80F5FF" diff --git a/code/modules/projectiles/projectile/subtypes/beam/blaster.dm b/code/modules/projectiles/projectile/subtypes/beam/blaster.dm index 38e8e9609c2f..9367ad73e774 100644 --- a/code/modules/projectiles/projectile/subtypes/beam/blaster.dm +++ b/code/modules/projectiles/projectile/subtypes/beam/blaster.dm @@ -2,7 +2,7 @@ hitscan = FALSE icon_state = "laser" damage_force = 20 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN damage_flag = ARMOR_LASER /obj/projectile/beam/blaster/pellet diff --git a/code/modules/projectiles/projectile/subtypes/blob.dm b/code/modules/projectiles/projectile/subtypes/blob.dm index 0e6371173b74..e139651d4c4f 100644 --- a/code/modules/projectiles/projectile/subtypes/blob.dm +++ b/code/modules/projectiles/projectile/subtypes/blob.dm @@ -3,7 +3,7 @@ icon_state = "declone" damage_force = 3 armor_penetration = 40 - damage_type = BRUTE + damage_type = DAMAGE_TYPE_BRUTE damage_flag = ARMOR_MELEE pass_flags = ATOM_PASS_TABLE | ATOM_PASS_BLOB fire_sound = 'sound/effects/slime_squish.ogg' @@ -46,7 +46,7 @@ reagents.add_reagent(reagent, reagent_vol) /obj/projectile/energy/blob/toxic - damage_type = TOX + damage_type = DAMAGE_TYPE_TOX damage_flag = ARMOR_BIO my_chems = list("amatoxin") @@ -54,7 +54,7 @@ splatter = TRUE /obj/projectile/energy/blob/acid - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN damage_flag = ARMOR_BIO my_chems = list("sacid", "mold") diff --git a/code/modules/projectiles/projectile/subtypes/bullets.dm b/code/modules/projectiles/projectile/subtypes/bullets.dm index 3a02c4d664d4..69ca1e19592b 100644 --- a/code/modules/projectiles/projectile/subtypes/bullets.dm +++ b/code/modules/projectiles/projectile/subtypes/bullets.dm @@ -3,7 +3,7 @@ icon_state = "bullet" fire_sound = 'sound/weapons/weaponsounds_rifleshot.ogg' damage_force = 60 - damage_type = BRUTE + damage_type = DAMAGE_TYPE_BRUTE nodamage = 0 damage_flag = ARMOR_BULLET embed_chance = 20 //Modified in the actual embed process, but this should keep embed chance about the same @@ -319,12 +319,12 @@ /obj/projectile/bullet/suffocationbullet//How does this even work? name = "co bullet" damage_force = 20 - damage_type = OXY + damage_type = DAMAGE_TYPE_OXY /obj/projectile/bullet/cyanideround name = "poison bullet" damage_force = 40 - damage_type = TOX + damage_type = DAMAGE_TYPE_TOX /obj/projectile/bullet/cyanideround/jezzail name = "toxic penetrator shard" @@ -332,7 +332,7 @@ armor_penetration = 20 agony = 5 embed_chance = 1 - damage_type = TOX + damage_type = DAMAGE_TYPE_TOX /obj/projectile/bullet/burstbullet name = "exploding bullet" @@ -447,7 +447,7 @@ name = "incendiary bullet" icon_state = "bullet_alt" damage_force = 15 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN incendiary = 1 flammability = 2 @@ -455,7 +455,7 @@ name = "dragonsbreath pellet" icon_state = "bullet_alt" damage_force = 10 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN incendiary = 1 flammability = 2 @@ -482,7 +482,7 @@ name = "12.7mm phoron slug" icon_state = "bullet_alt" damage_force = 60 - damage_type = BRUTE + damage_type = DAMAGE_TYPE_BRUTE incendiary = 1 flammability = 4 armor_penetration = 40 @@ -503,7 +503,7 @@ icon_state = "bullet_alt" damage_force = 40 armor_penetration = 30 - damage_type = BRUTE + damage_type = DAMAGE_TYPE_BRUTE incendiary = 1 flammability = 4 legacy_penetrating = 1 @@ -517,7 +517,7 @@ /obj/projectile/bullet/pistol/cap // Just the primer, such as a cap gun. name = "cap" - damage_type = HALLOSS + damage_type = DAMAGE_TYPE_HALLOSS fire_sound = 'sound/effects/snap.ogg' damage_force = 0 nodamage = 1 @@ -534,7 +534,7 @@ /obj/projectile/bullet/blank name = "blank" - damage_type = HALLOSS + damage_type = DAMAGE_TYPE_HALLOSS fire_sound = 'sound/weapons/weaponsounds_rifleshot.ogg' // Blanks still make loud noises. damage_force = 0 nodamage = 1 diff --git a/code/modules/projectiles/projectile/subtypes/change.dm b/code/modules/projectiles/projectile/subtypes/change.dm index 6b9c73ce7691..cbc6cf284ece 100644 --- a/code/modules/projectiles/projectile/subtypes/change.dm +++ b/code/modules/projectiles/projectile/subtypes/change.dm @@ -2,7 +2,7 @@ name = "bolt of change" icon_state = "ice_1" damage_force = 0 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN nodamage = 1 damage_flag = ARMOR_ENERGY diff --git a/code/modules/projectiles/projectile/subtypes/energy.dm b/code/modules/projectiles/projectile/subtypes/energy.dm index 389f63b6ab49..77a194b55623 100644 --- a/code/modules/projectiles/projectile/subtypes/energy.dm +++ b/code/modules/projectiles/projectile/subtypes/energy.dm @@ -2,7 +2,7 @@ name = "energy" icon_state = "spark" damage_force = 0 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN damage_flag = ARMOR_ENERGY projectile_type = PROJECTILE_TYPE_ENERGY var/flash_strength = 10 @@ -92,7 +92,7 @@ icon_state = "declone" fire_sound = 'sound/weapons/pulse3.ogg' nodamage = 1 - damage_type = CLONE + damage_type = DAMAGE_TYPE_CLONE irradiate = 40 light_range = 2 light_power = 0.5 @@ -104,7 +104,7 @@ name = "dart" icon_state = "toxin" damage_force = 5 - damage_type = TOX + damage_type = DAMAGE_TYPE_TOX agony = 120 damage_flag = ARMOR_ENERGY @@ -114,7 +114,7 @@ name = "bolt" icon_state = "cbbolt" damage_force = 10 - damage_type = TOX + damage_type = DAMAGE_TYPE_TOX agony = 40 stutter = 10 @@ -127,7 +127,7 @@ icon_state = "neurotoxin" fire_sound = 'sound/effects/splat.ogg' damage_force = 40 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN agony = 10 damage_flag = ARMOR_BIO armor_penetration = 25 // It's acid @@ -139,7 +139,7 @@ icon_state = "neurotoxin" fire_sound = 'sound/effects/splat.ogg' damage_force = 5 - damage_type = BIOACID + damage_type = DAMAGE_TYPE_BIOACID agony = 23 damage_flag = ARMOR_BIO armor_penetration = 25 // It's acid-based @@ -151,7 +151,7 @@ icon_state = "neurotoxin" fire_sound = 'sound/effects/splat.ogg' damage_force = 20 - damage_type = BIOACID + damage_type = DAMAGE_TYPE_BIOACID agony = 30 damage_flag = ARMOR_BIO armor_penetration = 25 // It's acid-based @@ -162,7 +162,7 @@ icon_state = "energy" fire_sound = 'sound/effects/stealthoff.ogg' damage_force = 20 - damage_type = TOX + damage_type = DAMAGE_TYPE_TOX irradiate = 20 light_range = 2 light_power = 0.5 @@ -178,7 +178,7 @@ range = WORLD_ICON_SIZE * 4 damage_force = 5 agony = 55 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN vacuum_traversal = 0 //Projectile disappears in empty space /obj/projectile/energy/plasmastun/proc/bang(var/mob/living/carbon/M) @@ -218,7 +218,7 @@ damage_force = 5 armor_penetration = 75 pass_flags = ATOM_PASS_TABLE | ATOM_PASS_GLASS | ATOM_PASS_GRILLE - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN damage_flag = ARMOR_ENERGY light_color = "#0000FF" diff --git a/code/modules/projectiles/projectile/subtypes/hook.dm b/code/modules/projectiles/projectile/subtypes/hook.dm index df45961bb1ae..0929b49a84da 100644 --- a/code/modules/projectiles/projectile/subtypes/hook.dm +++ b/code/modules/projectiles/projectile/subtypes/hook.dm @@ -10,7 +10,7 @@ damage_force = 5 speed = 7.5 * WORLD_ICON_SIZE - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN damage_flag = ARMOR_ENERGY armor_penetration = 15 @@ -44,7 +44,7 @@ agony = 20 if(INTENT_GRAB) damage_flag = ARMOR_MELEE - damage_type = HALLOSS + damage_type = DAMAGE_TYPE_HALLOSS if(INTENT_DISARM) damage_flag = ARMOR_MELEE if(prob(30)) // A chance for a successful hit to either knock someone down, or cause minor disorientation. @@ -54,7 +54,7 @@ eyeblur = 3 if(INTENT_HELP) silenced = 1 - damage_type = HALLOSS + damage_type = DAMAGE_TYPE_HALLOSS ..() // Does the regular launching stuff. diff --git a/code/modules/projectiles/projectile/subtypes/magnetic.dm b/code/modules/projectiles/projectile/subtypes/magnetic.dm index b2f4cc70b2f4..a5b8e298266f 100644 --- a/code/modules/projectiles/projectile/subtypes/magnetic.dm +++ b/code/modules/projectiles/projectile/subtypes/magnetic.dm @@ -34,7 +34,7 @@ weaken = 0 stun = 0 damage_force = 30 - damage_type = SEARING + damage_type = DAMAGE_TYPE_SEARING embed_chance = 0 /obj/projectile/bullet/magnetic/heated/weak diff --git a/code/modules/projectiles/projectile/subtypes/reusable.dm b/code/modules/projectiles/projectile/subtypes/reusable.dm index dd8167c41b2d..7bf2425a3940 100644 --- a/code/modules/projectiles/projectile/subtypes/reusable.dm +++ b/code/modules/projectiles/projectile/subtypes/reusable.dm @@ -89,5 +89,5 @@ name = "riot dart" desc = "A flexible projectile made out of hardened orange foam with a red plastic tip." damage_force = 10 - damage_type = HALLOSS + damage_type = DAMAGE_TYPE_HALLOSS ammo_type = /obj/item/ammo_casing/foam/riot diff --git a/code/modules/projectiles/projectile/subtypes/special.dm b/code/modules/projectiles/projectile/subtypes/special.dm index 4a9a66057a41..7eef692d2f94 100644 --- a/code/modules/projectiles/projectile/subtypes/special.dm +++ b/code/modules/projectiles/projectile/subtypes/special.dm @@ -3,7 +3,7 @@ icon_state = "ion" fire_sound = 'sound/weapons/Laser.ogg' damage_force = 0 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN nodamage = 1 damage_flag = ARMOR_ENERGY light_range = 2 @@ -56,7 +56,7 @@ icon_state = "ice_2" fire_sound = 'sound/weapons/pulse3.ogg' damage_force = 0 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN pass_flags = ATOM_PASS_TABLE | ATOM_PASS_GLASS | ATOM_PASS_GRILLE nodamage = 1 damage_flag = ARMOR_ENERGY // It actually checks heat/cold protection. @@ -103,7 +103,7 @@ icon = 'icons/obj/meteor.dmi' icon_state = "smallf" damage_force = 0 - damage_type = BRUTE + damage_type = DAMAGE_TYPE_BRUTE nodamage = 1 damage_flag = ARMOR_BULLET @@ -122,7 +122,7 @@ /obj/projectile/meteor/slug name = "meteor" damage_force = 25 - damage_type = BRUTE + damage_type = DAMAGE_TYPE_BRUTE nodamage = 0 /obj/projectile/energy/floramut @@ -130,7 +130,7 @@ icon_state = "energy" fire_sound = 'sound/effects/stealthoff.ogg' damage_force = 0 - damage_type = TOX + damage_type = DAMAGE_TYPE_TOX nodamage = 1 damage_flag = ARMOR_ENERGY light_range = 2 @@ -179,7 +179,7 @@ icon_state = "energy2" fire_sound = 'sound/effects/stealthoff.ogg' damage_force = 0 - damage_type = TOX + damage_type = DAMAGE_TYPE_TOX nodamage = 1 damage_flag = ARMOR_ENERGY var/singleton/plantgene/gene = null @@ -189,7 +189,7 @@ icon_state = "energy2" fire_sound = 'sound/effects/stealthoff.ogg' damage_force = 0 - damage_type = TOX + damage_type = DAMAGE_TYPE_TOX nodamage = 1 damage_flag = ARMOR_ENERGY light_range = 2 @@ -226,7 +226,7 @@ damage_force = 1 // stop trying to murderbone with a fake gun dumbass!!! embed_chance = 0 // nope nodamage = 1 - damage_type = HALLOSS + damage_type = DAMAGE_TYPE_HALLOSS muzzle_type = /obj/effect/projectile/muzzle/bullet /obj/projectile/bola @@ -234,7 +234,7 @@ icon_state = "bola" damage_force = 5 embed_chance = 0 //Nada. - damage_type = HALLOSS + damage_type = DAMAGE_TYPE_HALLOSS muzzle_type = null combustion = FALSE @@ -255,7 +255,7 @@ icon_state = "bola" damage_force = 10 embed_chance = 0 //Nada. - damage_type = BRUTE + damage_type = DAMAGE_TYPE_BRUTE muzzle_type = null combustion = FALSE @@ -277,7 +277,7 @@ fire_sound = 'sound/weapons/gauss_shoot.ogg' pass_flags = ATOM_PASS_TABLE | ATOM_PASS_GRILLE damage_force = 70 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN damage_flag = ARMOR_LASER light_range = 4 light_power = 3 @@ -305,25 +305,25 @@ if(target_armor >= 60) var/turf/T = get_step(H, pick(GLOB.alldirs - src.dir)) H.throw_at_old(T, 1, 1, src) - H.apply_damage(20, BURN, def_zone) + H.apply_damage(20, DAMAGE_TYPE_BURN, def_zone) if(target_limb) armor_special = 2 target_limb.fracture() else if(target_armor >= 45) - H.apply_damage(15, BURN, def_zone) + H.apply_damage(15, DAMAGE_TYPE_BURN, def_zone) if(target_limb) armor_special = 1 target_limb.dislocate() else if(target_armor >= 30) - H.apply_damage(10, BURN, def_zone) + H.apply_damage(10, DAMAGE_TYPE_BURN, def_zone) if(prob(30) && target_limb) armor_special = 1 target_limb.dislocate() else if(target_armor >= 15) - H.apply_damage(5, BURN, def_zone) + H.apply_damage(5, DAMAGE_TYPE_BURN, def_zone) if(prob(15) && target_limb) armor_special = 1 target_limb.dislocate() @@ -357,7 +357,7 @@ /obj/projectile/bullet/honker/lethal damage_force = 20 nodamage = FALSE - damage_type = BRUTE + damage_type = DAMAGE_TYPE_BRUTE /obj/projectile/bullet/honker/lethal/Initialize(mapload) . = ..() @@ -372,19 +372,19 @@ //Bio-Organic /obj/projectile/bullet/organic damage_force = 10 - damage_type = BRUTE + damage_type = DAMAGE_TYPE_BRUTE damage_flag = ARMOR_BULLET impact_sounds = 'sound/effects/splat.ogg' icon_state = "organic" /obj/projectile/bullet/organic/wax - damage_type = HALLOSS + damage_type = DAMAGE_TYPE_HALLOSS color = "#E6E685" icon_state = "organic" /obj/projectile/bullet/organic/stinger damage_force = 15 - damage_type = TOX + damage_type = DAMAGE_TYPE_TOX impact_sounds = 'sound/weapons/bladeslice.ogg' icon_state = "SpearFlight" @@ -393,7 +393,7 @@ name ="plasma bolt" icon_state= "fuel-tritium" damage_force = 50 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN damage_flag = ARMOR_ENERGY light_range = 4 light_power = 3 diff --git a/code/modules/projectiles/unsorted/magic.dm b/code/modules/projectiles/unsorted/magic.dm index 5eabd3194d3a..2783e38b19d5 100644 --- a/code/modules/projectiles/unsorted/magic.dm +++ b/code/modules/projectiles/unsorted/magic.dm @@ -2,7 +2,7 @@ name = "bolt of nothing" icon_state = "energy" damage_force = 0 - damage_type = OXY + damage_type = DAMAGE_TYPE_OXY nodamage = 1 armor_penetration = 100 var/magic = TRUE @@ -28,7 +28,7 @@ name = "bolt of resurrection" icon_state = "ion" damage_force = 0 - damage_type = OXY + damage_type = DAMAGE_TYPE_OXY nodamage = 1 /obj/projectile/magic/resurrection/on_impact(atom/target, impact_flags, def_zone, efficiency) @@ -51,7 +51,7 @@ name = "bolt of teleportation" icon_state = "bluespace" damage_force = 0 - damage_type = OXY + damage_type = DAMAGE_TYPE_OXY nodamage = 1 var/inner_tele_radius = 0 var/outer_tele_radius = 6 @@ -82,7 +82,7 @@ name = "bolt of door creation" icon_state = "energy" damage_force = 0 - damage_type = OXY + damage_type = DAMAGE_TYPE_OXY nodamage = 1 var/list/door_types = list(/obj/structure/simple_door/wood, /obj/structure/simple_door/iron, /obj/structure/simple_door/silver, /obj/structure/simple_door/gold, /obj/structure/simple_door/uranium, /obj/structure/simple_door/sandstone, /obj/structure/simple_door/phoron, /obj/structure/simple_door/diamond) @@ -113,7 +113,7 @@ name = "bolt of change" icon_state = "ice_1" damage_force = 0 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN nodamage = 1 /obj/projectile/magic/change/on_hit(atom/change) @@ -262,7 +262,7 @@ name = "bolt of animation" icon_state = "red_1" damage_force = 0 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN nodamage = 1 /obj/projectile/magic/animate/on_hit(atom/target, blocked = FALSE) @@ -308,7 +308,7 @@ name = "blade energy" icon_state = "lavastaff" damage_force = 15 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN sharp = TRUE magic = TRUE @@ -328,7 +328,7 @@ name = "arcane bolt" icon_state = "arcane_barrage" damage_force = 20 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN nodamage = 0 armor_penetration = 0 magic = TRUE @@ -436,7 +436,7 @@ name = "lightning bolt" icon_state = "tesla_projectile" //Better sprites are REALLY needed and appreciated!~ damage_force = 15 - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN nodamage = 0 magic = TRUE @@ -470,7 +470,7 @@ name = "bolt of fireball" icon_state = "fireball" damage_force = 10 - damage_type = BRUTE + damage_type = DAMAGE_TYPE_BRUTE nodamage = 0 //explosion values @@ -542,7 +542,7 @@ name = "enchanted card" desc = "A piece of paper enchanted to give it extreme durability and stiffness, along with a very hot burn to anyone unfortunate enough to get hit by a charged one." icon_state = "spellcard" - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN damage_force = 2 /obj/projectile/magic/spellcard/book @@ -550,7 +550,7 @@ name = "enchanted page" desc = "A piece of paper enchanted to give it extreme durability and stiffness, along with a very hot burn to anyone unfortunate enough to get hit by a charged one." icon_state = "spellcard" - damage_type = BURN + damage_type = DAMAGE_TYPE_BURN damage_force = 12 magic = TRUE diff --git a/code/modules/reagents/chemistry/reagents/Chemistry-Topical.dm b/code/modules/reagents/chemistry/reagents/Chemistry-Topical.dm index a2833e2f6f97..76fe7a487c03 100644 --- a/code/modules/reagents/chemistry/reagents/Chemistry-Topical.dm +++ b/code/modules/reagents/chemistry/reagents/Chemistry-Topical.dm @@ -117,7 +117,7 @@ /datum/reagent/topical/neurolaze/affect_blood(mob/living/carbon/M, alien, removed) if(alien != IS_DIONA) - M.apply_damage(5 * removed, HALLOSS)//holodeck boxing glove damage + M.apply_damage(5 * removed, DAMAGE_TYPE_HALLOSS)//holodeck boxing glove damage M.make_jittery(200) /datum/reagent/topical/neurolaze/affect_ingest(mob/living/carbon/M, alien, removed) diff --git a/code/modules/shieldgen/energy_shield.dm b/code/modules/shieldgen/energy_shield.dm index 009e9bbb5b8e..4416de28d33b 100644 --- a/code/modules/shieldgen/energy_shield.dm +++ b/code/modules/shieldgen/energy_shield.dm @@ -240,9 +240,9 @@ /obj/effect/shield/on_bullet_act(obj/projectile/proj, impact_flags, list/bullet_act_args) impact_flags &= ~PROJECTILE_IMPACT_FLAGS_SHOULD_NOT_HIT . = ..() - if(proj.damage_type == BURN) + if(proj.damage_type == DAMAGE_TYPE_BURN) take_damage_legacy(proj.get_structure_damage(), SHIELD_DAMTYPE_HEAT) - else if (proj.damage_type == BRUTE) + else if (proj.damage_type == DAMAGE_TYPE_BRUTE) take_damage_legacy(proj.get_structure_damage(), SHIELD_DAMTYPE_PHYSICAL) else //TODO - This will never happen because of get_structure_damage() only returning values for BRUTE and BURN damage types take_damage_legacy(proj.get_structure_damage(), SHIELD_DAMTYPE_EM) @@ -254,9 +254,9 @@ if(gen.check_flag(MODEFLAG_HYPERKINETIC)) user.visible_message("\The [user] hits \the [src] with \the [I]!") - if(I.damtype == BURN) + if(I.damtype == DAMAGE_TYPE_BURN) take_damage_legacy(I.damage_force, SHIELD_DAMTYPE_HEAT) - else if (I.damtype == BRUTE) + else if (I.damtype == DAMAGE_TYPE_BRUTE) take_damage_legacy(I.damage_force, SHIELD_DAMTYPE_PHYSICAL) else take_damage_legacy(I.damage_force, SHIELD_DAMTYPE_EM) diff --git a/code/modules/species/station/alraune.dm b/code/modules/species/station/alraune.dm index caa505abd8a9..107e48cc6570 100644 --- a/code/modules/species/station/alraune.dm +++ b/code/modules/species/station/alraune.dm @@ -293,24 +293,24 @@ var/bodypart = pick(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND,BP_TORSO,BP_GROIN,BP_HEAD) if(breath.temperature >= breath_heat_level_1) if(breath.temperature < breath_heat_level_2) - H.apply_damage(HEAT_GAS_DAMAGE_LEVEL_1, BURN, bodypart, used_weapon = "Excessive Heat") + H.apply_damage(HEAT_GAS_DAMAGE_LEVEL_1, DAMAGE_TYPE_BURN, bodypart, used_weapon = "Excessive Heat") H.fire_alert = max(H.fire_alert, 2) else if(breath.temperature < breath_heat_level_3) - H.apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, BURN, bodypart, used_weapon = "Excessive Heat") + H.apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, DAMAGE_TYPE_BURN, bodypart, used_weapon = "Excessive Heat") H.fire_alert = max(H.fire_alert, 2) else - H.apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, bodypart, used_weapon = "Excessive Heat") + H.apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, DAMAGE_TYPE_BURN, bodypart, used_weapon = "Excessive Heat") H.fire_alert = max(H.fire_alert, 2) else if(breath.temperature <= breath_cold_level_1) if(breath.temperature > breath_cold_level_2) - H.apply_damage(COLD_GAS_DAMAGE_LEVEL_1, BURN, bodypart, used_weapon = "Excessive Cold") + H.apply_damage(COLD_GAS_DAMAGE_LEVEL_1, DAMAGE_TYPE_BURN, bodypart, used_weapon = "Excessive Cold") H.fire_alert = max(H.fire_alert, 1) else if(breath.temperature > breath_cold_level_3) - H.apply_damage(COLD_GAS_DAMAGE_LEVEL_2, BURN, bodypart, used_weapon = "Excessive Cold") + H.apply_damage(COLD_GAS_DAMAGE_LEVEL_2, DAMAGE_TYPE_BURN, bodypart, used_weapon = "Excessive Cold") H.fire_alert = max(H.fire_alert, 1) else - H.apply_damage(COLD_GAS_DAMAGE_LEVEL_3, BURN, bodypart, used_weapon = "Excessive Cold") + H.apply_damage(COLD_GAS_DAMAGE_LEVEL_3, DAMAGE_TYPE_BURN, bodypart, used_weapon = "Excessive Cold") H.fire_alert = max(H.fire_alert, 1) diff --git a/code/modules/species/station/standard/zaddat.dm b/code/modules/species/station/standard/zaddat.dm index 8cc4aebd4b2a..911a4a28ec52 100644 --- a/code/modules/species/station/standard/zaddat.dm +++ b/code/modules/species/station/standard/zaddat.dm @@ -137,4 +137,4 @@ for(var/K in damageable) if(!(K in covered)) - H.apply_damage(light_amount/4, BURN, K, 0, 0, "Abnormal growths") + H.apply_damage(light_amount/4, DAMAGE_TYPE_BURN, K, 0, 0, "Abnormal growths") diff --git a/code/modules/species/station/station_special_abilities.dm b/code/modules/species/station/station_special_abilities.dm index 2dacabfb4c66..191540472b40 100644 --- a/code/modules/species/station/station_special_abilities.dm +++ b/code/modules/species/station/station_special_abilities.dm @@ -396,7 +396,7 @@ if(src.nutrition > 901) //prevent going into the fat ranges of nutrition needlessly and prevents minmaxing certain racial traits/abilities that rely on nutrition via farming one victim src.nutrition = 900 if(B.nutrition < 100) - B.apply_damage(15, BRUTE, BP_TORSO) // if they have nothing to give, this just harms them + B.apply_damage(15, DAMAGE_TYPE_BRUTE, BP_TORSO) // if they have nothing to give, this just harms them B.bitten = 1 //debuff tracking for balance else if(!istype(B,/mob/living/carbon) && src.isSynthetic() || istype(B,/mob/living/carbon) && B.isSynthetic() && src.isSynthetic()) // for synths to feed on robots and other synths if(do_after(src, 50, B)) @@ -406,7 +406,7 @@ src.nutrition += 300 B.nutrition -= 150 if(B.nutrition < 100) - B.apply_damage(15, BRUTE, BP_TORSO) + B.apply_damage(15, DAMAGE_TYPE_BRUTE, BP_TORSO) else if(istype(B,/mob/living/silicon) && !istype(src,/mob/living/silicon)) if(do_after(src, 50, B)) to_chat(src, "You don't sense any viable blood...") @@ -474,7 +474,7 @@ C.nutrition = (C.nutrition + T.nutrition) T.nutrition = 0 //Completely drained of everything. var/damage_to_be_applied = T.species.total_health //Get their max health. - T.apply_damage(damage_to_be_applied, HALLOSS) //Knock em out. + T.apply_damage(damage_to_be_applied, DAMAGE_TYPE_HALLOSS) //Knock em out. C.absorbing_prey = 0 if(T.isSynthetic()) to_chat(C, "You have siphoned the power out of [T], causing them to crumple on the floor.") @@ -562,7 +562,7 @@ nutrition = (nutrition + T.nutrition) T.nutrition = 0 //Completely drained of everything. var/damage_to_be_applied = T.species.total_health //Get their max health. - T.apply_damage(damage_to_be_applied, HALLOSS) //Knock em out. + T.apply_damage(damage_to_be_applied, DAMAGE_TYPE_HALLOSS) //Knock em out. absorbing_prey = 0 //Clean this up before we return return if(T.isSynthetic()) @@ -573,7 +573,7 @@ to_chat(T, "An odd sensation flows through your body as you as [src] begins to drain you to dangerous levels!") if(51 to 98) if(T.stat == DEAD) - T.apply_damage(500, OXY) //Bit of fluff. + T.apply_damage(500, DAMAGE_TYPE_OXY) //Bit of fluff. absorbing_prey = 0 if(T.isSynthetic()) to_chat(src, "You have completely drained the power from [T], shutting them down for good.") @@ -591,7 +591,7 @@ if(drain_finalized != 1) stage = 51 if(100) //They shouldn't survive long enough to get here, but just in case. - T.apply_damage(500, OXY) //Kill them. + T.apply_damage(500, DAMAGE_TYPE_OXY) //Kill them. absorbing_prey = 0 if(T.isSynthetic()) to_chat(src, "You have completely drained the power from [T], shutting them down for good.") @@ -802,7 +802,7 @@ //Removing an internal organ if(T_int && T_int.damage >= 25) //Internal organ and it's been severely damaged - T.apply_damage(15, BRUTE, T_ext) //Damage the external organ they're going through. + T.apply_damage(15, DAMAGE_TYPE_BRUTE, T_ext) //Damage the external organ they're going through. T_int.removed() if(B) T_int.forceMove(B) //Move to pred's gut @@ -817,7 +817,7 @@ //Is it groin/chest? You can't remove those. if(T_ext.cannot_amputate) - T.apply_damage(25, BRUTE, T_ext) + T.apply_damage(25, DAMAGE_TYPE_BRUTE, T_ext) visible_message("[src] severely damages [T]'s [T_ext.name]!") else if(B) T_ext.forceMove(B) @@ -830,7 +830,7 @@ else if(T_int) T_int.take_damage(25 - T_int.damage) - T.apply_damage(25, BRUTE, T_ext) + T.apply_damage(25, DAMAGE_TYPE_BRUTE, T_ext) visible_message("[src] severely damages [T]'s [T_ext.name]!") add_attack_logs(src,T,"Shredded (hardvore)") diff --git a/code/modules/species/xenomorphs/alien_facehugger.dm b/code/modules/species/xenomorphs/alien_facehugger.dm index 5eb271e11ce5..61c8087010c9 100644 --- a/code/modules/species/xenomorphs/alien_facehugger.dm +++ b/code/modules/species/xenomorphs/alien_facehugger.dm @@ -167,8 +167,8 @@ var/const/MAX_ACTIVE_TIME = 400 if(target.isSynthetic()) visible_message(SPAN_DANGER("[src] tears across [target]'s body, but recoils!")) - target.apply_damage(10, BRUTE, BP_HEAD) - target.apply_damage(10, BRUTE, BP_TORSO) + target.apply_damage(10, DAMAGE_TYPE_BRUTE, BP_HEAD) + target.apply_damage(10, DAMAGE_TYPE_BRUTE, BP_TORSO) return // atleast you don't get gibbed target.equip_to_slot_if_possible(src, SLOT_ID_MASK, INV_OP_FLUFFLESS) diff --git a/code/modules/species/xenomorphs/alien_powers.dm b/code/modules/species/xenomorphs/alien_powers.dm index c913fe96d783..442ce88c3359 100644 --- a/code/modules/species/xenomorphs/alien_powers.dm +++ b/code/modules/species/xenomorphs/alien_powers.dm @@ -354,13 +354,13 @@ if(istype(G.affecting,/mob/living/carbon/human)) var/mob/living/carbon/human/H = G.affecting - H.apply_damage(50,BRUTE) + H.apply_damage(50,DAMAGE_TYPE_BRUTE) if(H.stat == 2) H.gib() else var/mob/living/M = G.affecting if(!istype(M)) return //wut - M.apply_damage(50,BRUTE) + M.apply_damage(50,DAMAGE_TYPE_BRUTE) if(M.stat == 2) M.gib() diff --git a/code/modules/spells/artifacts.dm b/code/modules/spells/artifacts.dm index 5145090d7dcb..d906ee6de3cf 100644 --- a/code/modules/spells/artifacts.dm +++ b/code/modules/spells/artifacts.dm @@ -8,7 +8,7 @@ throw_speed = 3 throw_range = 7 throw_force = 10 - damtype = BURN + damtype = DAMAGE_TYPE_BURN damage_force = 10 attack_sound = 'sound/items/welder2.ogg' diff --git a/code/modules/surgery/bones.dm b/code/modules/surgery/bones.dm index 5b703d1ddfee..734a788d43e9 100644 --- a/code/modules/surgery/bones.dm +++ b/code/modules/surgery/bones.dm @@ -88,7 +88,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!" , \ "Your hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!") - affected.create_wound(BRUISE, 5) + affected.create_wound(WOUND_TYPE_BRUISE, 5) /////////////////////////////////////////////////////////////// // Skull Mending Surgery @@ -127,7 +127,7 @@ user.visible_message("[user]'s hand slips, damaging [target]'s face with \the [tool]!" , \ "Your hand slips, damaging [target]'s face with \the [tool]!") var/obj/item/organ/external/head/h = affected - h.create_wound(BRUISE, 10) + h.create_wound(WOUND_TYPE_BRUISE, 10) h.disfigured = 1 /////////////////////////////////////////////////////////////// @@ -210,4 +210,4 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!" , \ "Your hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!") - affected.create_wound(BRUISE, 5) + affected.create_wound(WOUND_TYPE_BRUISE, 5) diff --git a/code/modules/surgery/encased.dm b/code/modules/surgery/encased.dm index 320dd1f6ec80..e64692c96d16 100644 --- a/code/modules/surgery/encased.dm +++ b/code/modules/surgery/encased.dm @@ -61,7 +61,7 @@ user.visible_message("[user]'s hand slips, cracking [target]'s [affected.encased] with \the [tool]!" , \ "Your hand slips, cracking [target]'s [affected.encased] with \the [tool]!" ) - affected.create_wound(CUT, 20) + affected.create_wound(WOUND_TYPE_CUT, 20) affected.fracture() /////////////////////////////////////////////////////////////// @@ -115,7 +115,7 @@ var/self_msg = "Your hand slips, cracking [target]'s [affected.encased]!" user.visible_message(msg, self_msg) - affected.create_wound(BRUISE, 20) + affected.create_wound(WOUND_TYPE_BRUISE, 20) affected.fracture() /////////////////////////////////////////////////////////////// @@ -170,7 +170,7 @@ var/self_msg = "Your hand slips, bending [target]'s [affected.encased] the wrong way!" user.visible_message(msg, self_msg) - affected.create_wound(BRUISE, 20) + affected.create_wound(WOUND_TYPE_BRUISE, 20) affected.fracture() /*if (prob(40)) //TODO: ORGAN REMOVAL UPDATE. @@ -265,8 +265,8 @@ user.visible_message("[user]'s hand slips, searing [target]'s [affected.encased] with \the [tool]!" , \ "Your hand slips, searing [target]'s [affected.encased] with \the [tool]!" ) - affected.create_wound(CUT, 20) - affected.create_wound(BURN, 15) + affected.create_wound(WOUND_TYPE_CUT, 20) + affected.create_wound(WOUND_TYPE_BURN, 15) if(prob(affected.damage)) affected.fracture() diff --git a/code/modules/surgery/external_repair.dm b/code/modules/surgery/external_repair.dm index 21ead1863712..416c1ba6a109 100644 --- a/code/modules/surgery/external_repair.dm +++ b/code/modules/surgery/external_repair.dm @@ -73,7 +73,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, dropping \the [tool] onto [target]'s [affected]!" , \ "Your hand slips, dropping \the [tool] onto [target]'s [affected]!" ) - affected.create_wound(BRUISE, 10) + affected.create_wound(WOUND_TYPE_BRUISE, 10) ////////////////////////////////////////////////////////////////// // BURN STEP // @@ -124,7 +124,7 @@ if(istype(tool, /obj/item/duct_tape_roll) || istype(tool, /obj/item/barrier_tape_roll)) user.visible_message("[user] finishes taping up [target]'s [affected] with \the [tool].", \ "You finish taping up [target]'s [affected] with \the [tool].") - affected.create_wound(BRUISE, 10) + affected.create_wound(WOUND_TYPE_BRUISE, 10) affected.heal_damage(0, 25, 0, 0) if(!(affected.burn_dam)) affected.burn_stage = 0 @@ -137,8 +137,8 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, tearing up [target]'s [affected] with \the [tool].", \ "Your hand slips, tearing up [target]'s [affected] with \the [tool].") - affected.create_wound(BRUISE, 10) - affected.create_wound(CUT, 5) + affected.create_wound(WOUND_TYPE_BRUISE, 10) + affected.create_wound(WOUND_TYPE_CUT, 5) if(istype(tool, /obj/item/stack) && prob(30)) var/obj/item/stack/T = tool T.use(1) @@ -194,7 +194,7 @@ if(istype(tool, /obj/item/duct_tape_roll) || istype(tool, /obj/item/barrier_tape_roll)) user.visible_message("[user] finishes taping up [target]'s [affected] with \the [tool].", \ "You finish taping up [target]'s [affected] with \the [tool].") - affected.create_wound(BRUISE, 10) + affected.create_wound(WOUND_TYPE_BRUISE, 10) affected.heal_damage(25, 0, 0, 0) if(!(affected.brute_dam)) affected.brute_stage = 0 @@ -207,8 +207,8 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, tearing up [target]'s [affected] with \the [tool].", \ "Your hand slips, tearing up [target]'s [affected] with \the [tool].") - affected.create_wound(BRUISE, 10) - affected.create_wound(CUT, 5) + affected.create_wound(WOUND_TYPE_BRUISE, 10) + affected.create_wound(WOUND_TYPE_CUT, 5) if(istype(tool, /obj/item/stack) && prob(30)) var/obj/item/stack/T = tool T.use(1) diff --git a/code/modules/surgery/face.dm b/code/modules/surgery/face.dm index b0e2eabfd619..b44987d47cf8 100644 --- a/code/modules/surgery/face.dm +++ b/code/modules/surgery/face.dm @@ -48,7 +48,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, slicing [target]'s throat wth \the [tool]!" , \ "Your hand slips, slicing [target]'s throat wth \the [tool]!" ) - affected.create_wound(CUT, 60) + affected.create_wound(WOUND_TYPE_CUT, 60) target.AdjustLosebreath(10) /////////////////////////////////////////////////////////////// @@ -117,7 +117,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, tearing skin on [target]'s face with \the [tool]!", \ "Your hand slips, tearing skin on [target]'s face with \the [tool]!") - target.apply_damage(10, BRUTE, affected, sharp=1, sharp=1) + target.apply_damage(10, DAMAGE_TYPE_BRUTE, affected, sharp=1, sharp=1) /////////////////////////////////////////////////////////////// // Face Cauterizing Surgery @@ -158,4 +158,4 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, leaving a small burn on [target]'s face with \the [tool]!", \ "Your hand slips, leaving a small burn on [target]'s face with \the [tool]!") - target.apply_damage(4, BURN, affected) + target.apply_damage(4, DAMAGE_TYPE_BURN, affected) diff --git a/code/modules/surgery/generic.dm b/code/modules/surgery/generic.dm index 4624eae98cc1..71be860aef84 100644 --- a/code/modules/surgery/generic.dm +++ b/code/modules/surgery/generic.dm @@ -59,13 +59,13 @@ if(istype(target) && target.should_have_organ(O_HEART)) affected.status |= ORGAN_BLEEDING - affected.create_wound(CUT, 1) + affected.create_wound(WOUND_TYPE_CUT, 1) /datum/surgery_step/generic/cut_open/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, slicing open [target]'s [affected.name] in the wrong place with \the [tool]!", \ "Your hand slips, slicing open [target]'s [affected.name] in the wrong place with \the [tool]!") - affected.create_wound(CUT, 10) + affected.create_wound(WOUND_TYPE_CUT, 10) /////////////////////////////////////////////////////////////// // Laser Scalpel Surgery @@ -102,7 +102,7 @@ //Could be cleaner ... affected.open = 1 - affected.create_wound(CUT, 1) + affected.create_wound(WOUND_TYPE_CUT, 1) affected.organ_clamp() spread_germs_to_organ(affected, user) @@ -110,8 +110,8 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips as the blade sputters, searing a long gash in [target]'s [affected.name] with \the [tool]!", \ "Your hand slips as the blade sputters, searing a long gash in [target]'s [affected.name] with \the [tool]!") - affected.create_wound(CUT, 7.5) - affected.create_wound(BURN, 12.5) + affected.create_wound(WOUND_TYPE_CUT, 7.5) + affected.create_wound(WOUND_TYPE_BURN, 12.5) /////////////////////////////////////////////////////////////// // Incision Management Surgery @@ -148,7 +148,7 @@ if(istype(target) && target.should_have_organ(O_HEART)) affected.status |= ORGAN_BLEEDING - affected.create_wound(CUT, 1) + affected.create_wound(WOUND_TYPE_CUT, 1) affected.organ_clamp() affected.open = 2 @@ -156,8 +156,8 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.name] with \the [tool]!", \ "Your hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.name] with \the [tool]!") - affected.create_wound(CUT, 20) - affected.create_wound(BURN, 15) + affected.create_wound(WOUND_TYPE_CUT, 20) + affected.create_wound(WOUND_TYPE_BURN, 15) /////////////////////////////////////////////////////////////// // Hemostat Surgery @@ -197,7 +197,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, tearing blood vessals and causing massive bleeding in [target]'s [affected.name] with \the [tool]!", \ "Your hand slips, tearing blood vessels and causing massive bleeding in [target]'s [affected.name] with \the [tool]!",) - affected.create_wound(CUT, 10) + affected.create_wound(WOUND_TYPE_CUT, 10) /////////////////////////////////////////////////////////////// // Retractor Surgery @@ -258,7 +258,7 @@ msg = "[user]'s hand slips, damaging several organs in [target]'s lower abdomen with \the [tool]!" self_msg = "Your hand slips, damaging several organs in [target]'s lower abdomen with \the [tool]!" user.visible_message(msg, self_msg) - target.apply_damage(12, BRUTE, affected, sharp=1) + target.apply_damage(12, DAMAGE_TYPE_BRUTE, affected, sharp=1) /////////////////////////////////////////////////////////////// // Cauterize Surgery @@ -300,7 +300,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!", \ "Your hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!") - target.apply_damage(3, BURN, affected) + target.apply_damage(3, DAMAGE_TYPE_BURN, affected) /////////////////////////////////////////////////////////////// // Amputation Surgery @@ -344,5 +344,5 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, sawing through the bone in [target]'s [affected.name] with \the [tool]!", \ "Your hand slips, sawwing through the bone in [target]'s [affected.name] with \the [tool]!") - affected.create_wound(CUT, 30) + affected.create_wound(WOUND_TYPE_CUT, 30) affected.fracture() diff --git a/code/modules/surgery/implant.dm b/code/modules/surgery/implant.dm index e0f11fce24b9..b6c00fe16c6d 100644 --- a/code/modules/surgery/implant.dm +++ b/code/modules/surgery/implant.dm @@ -37,7 +37,7 @@ var/obj/item/organ/external/chest/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, scraping around inside [target]'s [affected.name] with \the [tool]!", \ "Your hand slips, scraping around inside [target]'s [affected.name] with \the [tool]!") - affected.create_wound(CUT, 20) + affected.create_wound(WOUND_TYPE_CUT, 20) /////////////////////////////////////////////////////////////// // Space Making Surgery diff --git a/code/modules/surgery/limb_reattach.dm b/code/modules/surgery/limb_reattach.dm index be6cf7cde02d..a2c2e78d804d 100644 --- a/code/modules/surgery/limb_reattach.dm +++ b/code/modules/surgery/limb_reattach.dm @@ -66,7 +66,7 @@ var/obj/item/organ/external/E = tool user.visible_message(" [user]'s hand slips, damaging [target]'s [E.amputation_point]!", \ " Your hand slips, damaging [target]'s [E.amputation_point]!") - target.apply_damage(10, BRUTE, null, sharp=1) + target.apply_damage(10, DAMAGE_TYPE_BRUTE, null, sharp=1) /////////////////////////////////////////////////////////////// // Limb Connection Surgery @@ -106,7 +106,7 @@ var/obj/item/organ/external/E = tool user.visible_message(" [user]'s hand slips, damaging [target]'s [E.amputation_point]!", \ " Your hand slips, damaging [target]'s [E.amputation_point]!") - target.apply_damage(10, BRUTE, null, sharp=1) + target.apply_damage(10, DAMAGE_TYPE_BRUTE, null, sharp=1) /////////////////////////////////////////////////////////////// // Robolimb Attachment Surgery @@ -157,4 +157,4 @@ /datum/surgery_step/limb/mechanize/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message(" [user]'s hand slips, damaging [target]'s flesh!", \ " Your hand slips, damaging [target]'s flesh!") - target.apply_damage(10, BRUTE, null, sharp=1) + target.apply_damage(10, DAMAGE_TYPE_BRUTE, null, sharp=1) diff --git a/code/modules/surgery/neck.dm b/code/modules/surgery/neck.dm index 3f37c72a569f..069187ac9438 100644 --- a/code/modules/surgery/neck.dm +++ b/code/modules/surgery/neck.dm @@ -48,7 +48,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, tearing at [target]'s brainstem with \the [tool]!" , \ "Your hand slips, tearing at [target]'s brainstem with \the [tool]!" ) - affected.create_wound(PIERCE, 10) + affected.create_wound(WOUND_TYPE_PIERCE, 10) target.adjust_unconscious(20 * 10) ///////////////////////////// @@ -88,7 +88,7 @@ //var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] almost loses their grip on the [tool]!" , \ "Your hand slips and nearly shreds [target]'s brainstem with \the [tool]!" ) - /*affected.create_wound(PIERCE, 10) + /*affected.create_wound(WOUND_TYPE_PIERCE, 10) target.adjust_unconscious(20 * 15) spawn() for(var/obj/item/organ/internal/brain/O in affected.internal_organs) @@ -128,7 +128,7 @@ //var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, gouging [target]'s brainstem with \the [tool]!" , \ "Your hand slips, gouging [target]'s brainstem with \the [tool]!" ) - /*affected.create_wound(CUT, 5) + /*affected.create_wound(WOUND_TYPE_CUT, 5) target.adjust_unconscious(20 * 10) spawn() for(var/obj/item/organ/internal/brain/O in affected.internal_organs) //If there's more than one... @@ -168,7 +168,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, tearing at [target]'s spinal cord with \the [tool]!" , \ "Your hand slips, tearing at [target]'s spinal cord with \the [tool]!" ) - affected.create_wound(PIERCE, 5) + affected.create_wound(WOUND_TYPE_PIERCE, 5) target.adjust_unconscious(20 * 20) spawn() for(var/obj/item/organ/internal/brain/O in affected.internal_organs) @@ -206,7 +206,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, tearing at [target]'s spinal cord with \the [tool]!" , \ "Your hand slips, tearing at [target]'s spinal cord with \the [tool]!" ) - affected.create_wound(PIERCE, 5) + affected.create_wound(WOUND_TYPE_PIERCE, 5) target.adjust_unconscious(20 * 15) spawn() for(var/obj/item/organ/internal/brain/O in affected.internal_organs) @@ -246,7 +246,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, gouging [target]'s brainstem with \the [tool]!" , \ "Your hand slips, gouging [target]'s brainstem with \the [tool]!" ) - affected.create_wound(CUT, 5) + affected.create_wound(WOUND_TYPE_CUT, 5) target.adjust_unconscious(20 * 30) spawn() for(var/obj/item/organ/internal/brain/O in affected.internal_organs) diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index d7f5f8503c1d..39794ddcb5b5 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -134,7 +134,7 @@ else if (istype(tool, /obj/item/stack/medical/bruise_pack)) dam_amt = 5 target.adjustToxLoss(10) - affected.create_wound(CUT, 5) + affected.create_wound(WOUND_TYPE_CUT, 5) for(var/obj/item/organ/I in affected.internal_organs) if(I && I.damage > 0) @@ -201,7 +201,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!", \ "Your hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!") - affected.create_wound(CUT, rand(30,50), 1) + affected.create_wound(WOUND_TYPE_CUT, rand(30,50), 1) /////////////////////////////////////////////////////////////// // Organ Removal Surgery @@ -260,7 +260,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, damaging [target]'s [affected.name] with \the [tool]!", \ "Your hand slips, damaging [target]'s [affected.name] with \the [tool]!") - affected.create_wound(BRUISE, 20) + affected.create_wound(WOUND_TYPE_BRUISE, 20) /////////////////////////////////////////////////////////////// // Organ Replacement Surgery @@ -391,7 +391,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!", \ "Your hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!") - affected.create_wound(BRUISE, 20) + affected.create_wound(WOUND_TYPE_BRUISE, 20) /////////////////////////////////////////////////////////////// // Organ Ripping Surgery @@ -450,7 +450,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, damaging [target]'s [affected.name] with \the [tool]!", \ "Your hand slips, damaging [target]'s [affected.name] with \the [tool]!") - affected.create_wound(BRUISE, 20) + affected.create_wound(WOUND_TYPE_BRUISE, 20) ////////////////////////////////////////////////////////////////// // HEART SURGERY // diff --git a/code/modules/surgery/other.dm b/code/modules/surgery/other.dm index 66e366fb1ef5..d8a31dbd9b64 100644 --- a/code/modules/surgery/other.dm +++ b/code/modules/surgery/other.dm @@ -112,7 +112,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!", \ "Your hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!") - affected.create_wound(CUT, 20, 1) + affected.create_wound(WOUND_TYPE_CUT, 20, 1) /////////////////////////////////////////////////////////////// // Necrosis Surgery Step 2 @@ -282,8 +282,8 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, and the mesh falls, with \the [tool] scraping [target]'s body.", \ "Your hand slips, and the mesh falls, with \the [tool] scraping [target]'s body.") - affected.create_wound(CUT, 15) - affected.create_wound(BRUISE, 10) + affected.create_wound(WOUND_TYPE_CUT, 15) + affected.create_wound(WOUND_TYPE_BRUISE, 10) ..() /datum/surgery_step/dehusk/relocateflesh @@ -314,8 +314,8 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] accidentally rips a massive chunk out of [target]'s flesh with \the [tool], causing massive damage.", \ "You accidentally rip a massive chunk out of [target]'s flesh with \the [tool], causing massive damage.") - affected.create_wound(CUT, 25) - affected.create_wound(BRUISE, 10) + affected.create_wound(WOUND_TYPE_CUT, 25) + affected.create_wound(WOUND_TYPE_BRUISE, 10) ..() /datum/surgery_step/dehusk/structfinish @@ -354,8 +354,8 @@ else if(istype(tool,/obj/item/surgical/FixOVein)) user.visible_message("[user] fails to finish the structure over the gaps in [target]'s flesh, doing more damage than good.", \ "You fail to finish the structure over the gaps in [target]'s flesh, doing more damage than good.") - affected.create_wound(CUT, 15) - affected.create_wound(BRUISE, 10) + affected.create_wound(WOUND_TYPE_CUT, 15) + affected.create_wound(WOUND_TYPE_BRUISE, 10) ..() /////////////////////////////////////////////////////////////// @@ -389,6 +389,6 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s hand slips, failing to finish the surgery, and damaging [target] with \the [tool].", \ "Your hand slips, failing to finish the surgery, and damaging [target] with \the [tool].") - affected.create_wound(CUT, 15) - affected.create_wound(BRUISE, 10) + affected.create_wound(WOUND_TYPE_CUT, 15) + affected.create_wound(WOUND_TYPE_BRUISE, 10) ..() diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm index 80f4ed95f6c1..b24a7dca4162 100644 --- a/code/modules/surgery/robotics.dm +++ b/code/modules/surgery/robotics.dm @@ -178,7 +178,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user]'s [tool.name] slips, damaging the internal structure of [target]'s [affected.name].", "Your [tool.name] slips, damaging the internal structure of [target]'s [affected.name].") - target.apply_damage(rand(5,10), BURN, affected) + target.apply_damage(rand(5,10), DAMAGE_TYPE_BURN, affected) /////////////////////////////////////////////////////////////// // Burn Repair Surgery @@ -226,7 +226,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] causes a short circuit in [target]'s [affected.name]!", "You cause a short circuit in [target]'s [affected.name]!") - target.apply_damage(rand(5,10), BURN, affected) + target.apply_damage(rand(5,10), DAMAGE_TYPE_BURN, affected) /////////////////////////////////////////////////////////////// // Robot Organ Surgery @@ -290,7 +290,7 @@ "Your hand slips, gumming up the mechanisms inside of [target]'s [affected.name] with \the [tool]!") target.adjustToxLoss(5) - affected.create_wound(CUT, 5) + affected.create_wound(WOUND_TYPE_CUT, 5) for(var/obj/item/organ/internal/I in affected.internal_organs) if(I) diff --git a/code/modules/tension/tension.dm b/code/modules/tension/tension.dm index 7dd781ed0de6..584c0e458fae 100644 --- a/code/modules/tension/tension.dm +++ b/code/modules/tension/tension.dm @@ -36,7 +36,7 @@ potential_damage = P.agony / 2 else potential_damage = P.damage_force - if(P.damage_type == HALLOSS) // Not sure if any projectiles do this, but can't be too safe. + if(P.damage_type == DAMAGE_TYPE_HALLOSS) // Not sure if any projectiles do this, but can't be too safe. potential_damage /= 2 // Rubber bullets, I guess. potential_damage += P.agony / 2 diff --git a/code/modules/vehicles/sealed/mecha/components/_component.dm b/code/modules/vehicles/sealed/mecha/components/_component.dm index 0d74f4469caf..00d8765145c9 100644 --- a/code/modules/vehicles/sealed/mecha/components/_component.dm +++ b/code/modules/vehicles/sealed/mecha/components/_component.dm @@ -67,7 +67,7 @@ integrity = clamp(integrity + amt, 0, integrity_max) return -/obj/item/mecha_parts/component/proc/damage_part(var/dam_amt = 0, var/type = BRUTE) +/obj/item/mecha_parts/component/proc/damage_part(var/dam_amt = 0, var/type = DAMAGE_TYPE_BRUTE) if(dam_amt <= 0) return FALSE diff --git a/code/modules/vehicles/sealed/mecha/equipment/tools/drill.dm b/code/modules/vehicles/sealed/mecha/equipment/tools/drill.dm index 6c65abee9a98..b71d64411122 100644 --- a/code/modules/vehicles/sealed/mecha/equipment/tools/drill.dm +++ b/code/modules/vehicles/sealed/mecha/equipment/tools/drill.dm @@ -59,7 +59,7 @@ add_attack_logs(user, target, "attacked", "[name]", "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])") var/drill_force = damage_force //Couldn't manage it otherwise. if(ishuman(target)) - target.apply_damage(drill_force, BRUTE) + target.apply_damage(drill_force, DAMAGE_TYPE_BRUTE) return else if(istype(target, /mob/living/simple_mob)) diff --git a/code/modules/vehicles/sealed/mecha/equipment/weapons/reticent.dm b/code/modules/vehicles/sealed/mecha/equipment/weapons/reticent.dm index 3375c5c04f1c..de4a155908e4 100644 --- a/code/modules/vehicles/sealed/mecha/equipment/weapons/reticent.dm +++ b/code/modules/vehicles/sealed/mecha/equipment/weapons/reticent.dm @@ -16,7 +16,7 @@ var/mob/living/M = target if(M.stat>1) return if(chassis.occupant_legacy.a_intent == INTENT_HARM || istype(chassis.occupant_legacy,/mob/living/carbon/brain)) //No tactile feedback for brains - M.apply_damage(dam_force, BRUTE) + M.apply_damage(dam_force, DAMAGE_TYPE_BRUTE) M.adjustOxyLoss(round(dam_force/2)) M.update_health() occupant_message("You pierce [target] with [src.name]. The blade goes all the way through.") @@ -24,7 +24,7 @@ chassis.visible_message("[chassis] stabs [target].") else if(chassis.occupant_legacy.a_intent == INTENT_DISARM && enable_special) playsound(src, 'sound/weapons/punchmiss.ogg', 10, 1, -2) - M.apply_damage(dam_force/2, BRUTE) + M.apply_damage(dam_force/2, DAMAGE_TYPE_BRUTE) M.adjustOxyLoss(round(dam_force/3)) M.update_health() occupant_message("You slaps [target] with the flat of [src.name]. Something cracks.") @@ -46,7 +46,7 @@ add_attack_logs(user, target, "attacked", "[name]", "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])") var/blade_force = force //Couldn't manage it otherwise. if(ishuman(target)) - target.apply_damage(blade_force, BRUTE) + target.apply_damage(blade_force, DAMAGE_TYPE_BRUTE) return else if(istype(target, /mob/living/simple_mob)) @@ -81,7 +81,7 @@ var/mob/living/M = target if(M.stat>1) return if(chassis.occupant_legacy.a_intent == INTENT_HARM || istype(chassis.occupant_legacy,/mob/living/carbon/brain)) //No tactile feedback for brains - M.apply_damage(dam_force, BURN) + M.apply_damage(dam_force, DAMAGE_TYPE_BURN) M.adjust_fire_stacks(1) M.update_health() occupant_message("You pierce [target] with [src.name]. The blade goes all the way through.") @@ -89,7 +89,7 @@ chassis.visible_message("[chassis] stabs [target].") else if(chassis.occupant_legacy.a_intent == INTENT_DISARM && enable_special) playsound(src, 'sound/weapons/punchmiss.ogg', 10, 1, -2) - M.apply_damage(dam_force/2, BRUTE) + M.apply_damage(dam_force/2, DAMAGE_TYPE_BRUTE) M.adjustOxyLoss(round(dam_force/3)) M.update_health() occupant_message("You slaps [target] with the flat of [src.name]. Something cracks.") diff --git a/code/modules/vehicles/sealed/mecha/mecha.dm b/code/modules/vehicles/sealed/mecha/mecha.dm index d6f4171eaeab..07953a03cb30 100644 --- a/code/modules/vehicles/sealed/mecha/mecha.dm +++ b/code/modules/vehicles/sealed/mecha/mecha.dm @@ -975,7 +975,7 @@ log_append_to_last("Took [damage] points of damage. Damage type: \"[type]\".",1) return -/obj/vehicle/sealed/mecha/proc/components_handle_damage(var/damage, var/type = BRUTE) +/obj/vehicle/sealed/mecha/proc/components_handle_damage(var/damage, var/type = DAMAGE_TYPE_BRUTE) var/obj/item/mecha_parts/component/armor/AC = internal_components[MECH_ARMOR] if(AC) @@ -1186,7 +1186,7 @@ src.log_append_to_last("Armor saved.") return - if(Proj.damage_type == HALLOSS) + if(Proj.damage_type == DAMAGE_TYPE_HALLOSS) use_power(Proj.agony * 5) if(!(Proj.nodamage)) diff --git a/code/modules/vehicles_legacy/Securitrain_vr.dm b/code/modules/vehicles_legacy/Securitrain_vr.dm index 81be49d1a6ba..7efc233c886f 100644 --- a/code/modules/vehicles_legacy/Securitrain_vr.dm +++ b/code/modules/vehicles_legacy/Securitrain_vr.dm @@ -171,7 +171,7 @@ M.apply_effects(5, 5) for(var/i = 0, i < rand(1,3), i++) - M.apply_damage(rand(1,5), BRUTE, pick(parts)) + M.apply_damage(rand(1,5), DAMAGE_TYPE_BRUTE, pick(parts)) /obj/vehicle_old/train/security/trolley/RunOver(var/mob/living/M) ..() diff --git a/code/modules/vehicles_legacy/cargo_train.dm b/code/modules/vehicles_legacy/cargo_train.dm index 084640716307..fe4876567db4 100644 --- a/code/modules/vehicles_legacy/cargo_train.dm +++ b/code/modules/vehicles_legacy/cargo_train.dm @@ -158,7 +158,7 @@ M.apply_effects(5, 5) for(var/i = 0, i < rand(1,3), i++) - M.apply_damage(rand(1,5), BRUTE, pick(parts)) + M.apply_damage(rand(1,5), DAMAGE_TYPE_BRUTE, pick(parts)) /obj/vehicle_old/train/trolley/RunOver(var/mob/living/M) ..() diff --git a/code/modules/vehicles_legacy/rover_vr.dm b/code/modules/vehicles_legacy/rover_vr.dm index ef0305f9abb4..32e4780d2037 100644 --- a/code/modules/vehicles_legacy/rover_vr.dm +++ b/code/modules/vehicles_legacy/rover_vr.dm @@ -172,7 +172,7 @@ M.apply_effects(5, 5) for(var/i = 0, i < rand(1,3), i++) - M.apply_damage(rand(1,5), BRUTE, pick(parts)) + M.apply_damage(rand(1,5), DAMAGE_TYPE_BRUTE, pick(parts)) /obj/vehicle_old/train/rover/trolley/RunOver(var/mob/living/M) ..() diff --git a/code/modules/virus2/effect.dm b/code/modules/virus2/effect.dm index 482b4900ce40..278a4667115d 100644 --- a/code/modules/virus2/effect.dm +++ b/code/modules/virus2/effect.dm @@ -143,7 +143,7 @@ var/datum/gender/TM = GLOB.gender_datums[mob.get_visible_gender()] if(prob(25)) mob.visible_message("[mob.name] is holding [TM.his] breath. It looks like [TM.his] ability to breath [TM.is] constricted!") - mob.apply_damage(15, OXY) + mob.apply_damage(15, DAMAGE_TYPE_OXY) // Nerfing from 15 to 10 /datum/disease2/effect/killertoxins @@ -163,7 +163,7 @@ /datum/disease2/effect/dna/activate(var/mob/living/carbon/mob,var/multiplier) mob.bodytemperature = max(mob.bodytemperature, 350) scramble(0,mob,10) - mob.apply_damage(10, CLONE) + mob.apply_damage(10, DAMAGE_TYPE_CLONE) /datum/disease2/effect/organs name = "Limb Paralysis" @@ -399,7 +399,7 @@ stage = 3 /datum/disease2/effect/mutation/activate(var/mob/living/carbon/mob,var/multiplier) - mob.apply_damage(2, CLONE) + mob.apply_damage(2, DAMAGE_TYPE_CLONE) /datum/disease2/effect/groan name = "Phantom Aches" diff --git a/code/modules/vore/fluffstuff/custom_items.dm b/code/modules/vore/fluffstuff/custom_items.dm index 2266c6708b9f..44bf48d4b155 100644 --- a/code/modules/vore/fluffstuff/custom_items.dm +++ b/code/modules/vore/fluffstuff/custom_items.dm @@ -169,7 +169,7 @@ damage_force = 10 throw_force = 3 w_class = WEIGHT_CLASS_NORMAL - damtype = HALLOSS + damtype = DAMAGE_TYPE_HALLOSS attack_verb = list("flogged", "whipped", "lashed", "disciplined", "chastised", "flayed") //General use @@ -1308,7 +1308,7 @@ item_icons = list(SLOT_ID_LEFT_HAND = 'icons/mob/items/lefthand_melee.dmi', SLOT_ID_RIGHT_HAND = 'icons/mob/items/righthand_melee.dmi', SLOT_ID_BACK = 'icons/vore/custom_items_vr.dmi', SLOT_ID_SUIT = 'icons/vore/custom_items_vr.dmi') var/active_state = "wolfgirlsword" allowed = list(/obj/item/shield/fluff/wolfgirlshield) - damtype = HALLOSS + damtype = DAMAGE_TYPE_HALLOSS /obj/item/melee/fluffstuff/wolfgirlsword/dropped(mob/user, flags, atom/newLoc) ..() @@ -1324,7 +1324,7 @@ sharp = 1 edge = 1 icon_state = "[active_state]_sharp" - damtype = BRUTE + damtype = DAMAGE_TYPE_BRUTE /obj/item/melee/fluffstuff/wolfgirlsword/deactivate(mob/living/user) diff --git a/code/modules/vore/resizing/resize_vr.dm b/code/modules/vore/resizing/resize_vr.dm index 575893221045..9852e887903e 100644 --- a/code/modules/vore/resizing/resize_vr.dm +++ b/code/modules/vore/resizing/resize_vr.dm @@ -338,7 +338,7 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2 //Perform some HALLOSS damage to the smaller. var/size_damage_multiplier = (src.size_multiplier - tmob.size_multiplier) var/damage = (rand(15,30)* size_damage_multiplier) //Since stunned is broken, let's do this. Rand 15-30 multiplied by 1 min or 1.75 max. 15 holo to 52.5 holo, depending on RNG and size differnece. - tmob.apply_damage(damage, HALLOSS) + tmob.apply_damage(damage, DAMAGE_TYPE_HALLOSS) tmob.resting = 1 //Log it for admins (as opposed to run which logs no damage) diff --git a/code/modules/xenoarcheaology/finds/special.dm b/code/modules/xenoarcheaology/finds/special.dm index 8a62c8d1f39a..c50af8d390e3 100644 --- a/code/modules/xenoarcheaology/finds/special.dm +++ b/code/modules/xenoarcheaology/finds/special.dm @@ -122,7 +122,7 @@ nearby_mobs.Add(M) var/target = pick(M.organs_by_name) - M.apply_damage(rand(5, 10), BRUTE, target) + M.apply_damage(rand(5, 10), DAMAGE_TYPE_BRUTE, target) to_chat(M, "The skin on your [parse_zone(target)] feels like it's ripping apart, and a stream of blood flies out.") var/obj/effect/debris/cleanable/blood/splatter/animated/B = new(M.loc) B.target_turf = pick(range(1, src)) diff --git a/code/modules/xenobio/items/weapons.dm b/code/modules/xenobio/items/weapons.dm index e3a2c4b73cde..7c0464aa4d39 100644 --- a/code/modules/xenobio/items/weapons.dm +++ b/code/modules/xenobio/items/weapons.dm @@ -26,7 +26,7 @@ var/mob/living/carbon/human/H = L if(H.species && H.species.get_species_id() == SPECIES_ID_PROMETHEAN) var/agony_to_apply = 60 - agonyforce - H.apply_damage(agony_to_apply, HALLOSS) + H.apply_damage(agony_to_apply, DAMAGE_TYPE_HALLOSS) return ..() // do normal effects too diff --git a/code/modules/xenobio2/mob/slime/slime.dm b/code/modules/xenobio2/mob/slime/slime.dm index 718151ae21cd..d593a554b158 100644 --- a/code/modules/xenobio2/mob/slime/slime.dm +++ b/code/modules/xenobio2/mob/slime/slime.dm @@ -86,7 +86,7 @@ Slime definitions, Life and New live here. languages += L speak += "[station_name()]?" traitdat.source = "Slime" - resistances[BURN] = 4 - resistances[BRUTE] = 0.2 - resistances[TOX] = 1.5 + resistances[DAMAGE_TYPE_BURN] = 4 + resistances[DAMAGE_TYPE_BRUTE] = 0.2 + resistances[DAMAGE_TYPE_TOX] = 1.5 GenerateChild() diff --git a/code/unit_tests/_unit_tests.dm b/code/unit_tests/_unit_tests.dm index 9f952dfd765d..93348b163c87 100644 --- a/code/unit_tests/_unit_tests.dm +++ b/code/unit_tests/_unit_tests.dm @@ -100,7 +100,6 @@ // #include "keybinding_init.dm" // #include "machine_disassembly.dm" #include "map_template_paths.dm" -// #include "medical_wounds.dm" // #include "merge_type.dm" // #include "metabolizing.dm" // #include "outfit_sanity.dm" diff --git a/code/unit_tests/medical_wounds.dm b/code/unit_tests/medical_wounds.dm deleted file mode 100644 index 75c08931f16c..000000000000 --- a/code/unit_tests/medical_wounds.dm +++ /dev/null @@ -1,87 +0,0 @@ -/// This test is used to make sure a flesh-and-bone base human can suffer all the types of wounds, and that suffering more severe wounds removes and replaces the lesser wound. Also tests that [/mob/living/carbon/proc/fully_heal] removes all wounds -/datum/unit_test/test_human_base/Run() - var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human) - - /// the limbs have no wound resistance like the chest and head do, so let's go with the r_arm - var/obj/item/bodypart/tested_part = victim.get_bodypart(BODY_ZONE_R_ARM) - /// In order of the wound types we're trying to inflict, what sharpness do we need to deal them? - var/list/sharps = list(SHARP_NONE, SHARP_EDGED, SHARP_POINTY, SHARP_NONE) - /// Since burn wounds need burn damage, duh - var/list/dam_types = list(BRUTE, BRUTE, BRUTE, BURN) - - var/i = 1 - var/list/iter_test_wound_list - - for(iter_test_wound_list in list(list(/datum/wound/blunt/moderate, /datum/wound/blunt/severe, /datum/wound/blunt/critical),\ - list(/datum/wound/slash/moderate, /datum/wound/slash/severe, /datum/wound/slash/critical),\ - list(/datum/wound/pierce/moderate, /datum/wound/pierce/severe, /datum/wound/pierce/critical),\ - list(/datum/wound/burn/moderate, /datum/wound/burn/severe, /datum/wound/burn/critical))) - - TEST_ASSERT_EQUAL(length(victim.all_wounds), 0, "Patient is somehow wounded before test") - var/datum/wound/iter_test_wound - var/threshold_penalty = 0 - - for(iter_test_wound in iter_test_wound_list) - var/threshold = initial(iter_test_wound.threshold_minimum) - threshold_penalty // just enough to guarantee the next tier of wound, given the existing wound threshold penalty - if(dam_types[i] == BRUTE) - tested_part.receive_damage(WOUND_MINIMUM_DAMAGE, 0, wound_bonus = threshold, sharpness=sharps[i]) - else if(dam_types[i] == BURN) - tested_part.receive_damage(0, WOUND_MINIMUM_DAMAGE, wound_bonus = threshold, sharpness=sharps[i]) - - TEST_ASSERT(length(victim.all_wounds), "Patient has no wounds when one wound is expected. Severity: [initial(iter_test_wound.severity)]") - TEST_ASSERT_EQUAL(length(victim.all_wounds), 1, "Patient has more than one wound when only one is expected. Severity: [initial(iter_test_wound.severity)]") - var/datum/wound/actual_wound = victim.all_wounds[1] - TEST_ASSERT_EQUAL(actual_wound.type, iter_test_wound, "Patient has wound of incorrect severity. Expected: [initial(iter_test_wound.name)] Got: [actual_wound]") - threshold_penalty = actual_wound.threshold_penalty - i++ - victim.fully_heal(TRUE) // should clear all wounds between types - - -/// This test is used for making sure species with bones but no flesh (skeletons, plasmamen) can only suffer BONE_WOUNDS, and nothing tagged with FLESH_WOUND (it's possible to require both) -/datum/unit_test/test_human_bone/Run() - var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human) - - /// the limbs have no wound resistance like the chest and head do, so let's go with the r_arm - var/obj/item/bodypart/tested_part = victim.get_bodypart(BODY_ZONE_R_ARM) - /// In order of the wound types we're trying to inflict, what sharpness do we need to deal them? - var/list/sharps = list(SHARP_NONE, SHARP_EDGED, SHARP_POINTY, SHARP_NONE) - /// Since burn wounds need burn damage, duh - var/list/dam_types = list(BRUTE, BRUTE, BRUTE, BURN) - - var/i = 1 - var/list/iter_test_wound_list - victim.dna.species.species_traits &= HAS_FLESH // take away the base human's flesh (ouchie!) ((not actually ouchie, this just affects their wounds and dismemberment handling)) - - for(iter_test_wound_list in list(list(/datum/wound/blunt/moderate, /datum/wound/blunt/severe, /datum/wound/blunt/critical),\ - list(/datum/wound/slash/moderate, /datum/wound/slash/severe, /datum/wound/slash/critical),\ - list(/datum/wound/pierce/moderate, /datum/wound/pierce/severe, /datum/wound/pierce/critical),\ - list(/datum/wound/burn/moderate, /datum/wound/burn/severe, /datum/wound/burn/critical))) - - TEST_ASSERT_EQUAL(length(victim.all_wounds), 0, "Patient is somehow wounded before test") - var/datum/wound/iter_test_wound - var/threshold_penalty = 0 - - for(iter_test_wound in iter_test_wound_list) - var/threshold = initial(iter_test_wound.threshold_minimum) - threshold_penalty // just enough to guarantee the next tier of wound, given the existing wound threshold penalty - if(dam_types[i] == BRUTE) - tested_part.receive_damage(WOUND_MINIMUM_DAMAGE, 0, wound_bonus = threshold, sharpness=sharps[i]) - else if(dam_types[i] == BURN) - tested_part.receive_damage(0, WOUND_MINIMUM_DAMAGE, wound_bonus = threshold, sharpness=sharps[i]) - - // so if we just tried to deal a flesh wound, make sure we didn't actually suffer it. We may have suffered a bone wound instead, but we just want to make sure we don't have a flesh wound - if(initial(iter_test_wound.wound_flags) & FLESH_WOUND) - if(!length(victim.all_wounds)) // not having a wound is good news - continue - else // we have to check that it's actually a bone wound and not the intended wound type - TEST_ASSERT_EQUAL(length(victim.all_wounds), 1, "Patient has more than one wound when only one is expected. Severity: [initial(iter_test_wound.severity)]") - var/datum/wound/actual_wound = victim.all_wounds[1] - TEST_ASSERT((actual_wound.wound_flags & ~FLESH_WOUND), "Patient has flesh wound despite no HAS_FLESH flag, expected either no wound or bone wound. Offending wound: [actual_wound]") - threshold_penalty = actual_wound.threshold_penalty - else // otherwise if it's a bone wound, check that we have it per usual - TEST_ASSERT(length(victim.all_wounds), "Patient has no wounds when one wound is expected. Severity: [initial(iter_test_wound.severity)]") - TEST_ASSERT_EQUAL(length(victim.all_wounds), 1, "Patient has more than one wound when only one is expected. Severity: [initial(iter_test_wound.severity)]") - var/datum/wound/actual_wound = victim.all_wounds[1] - TEST_ASSERT_EQUAL(actual_wound.type, iter_test_wound, "Patient has wound of incorrect severity. Expected: [initial(iter_test_wound.name)] Got: [actual_wound]") - threshold_penalty = actual_wound.threshold_penalty - i++ - victim.fully_heal(TRUE) // should clear all wounds between types