diff --git a/aurorastation.dme b/aurorastation.dme index 05b29221f0d..d9852a989b5 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -21,6 +21,7 @@ #include "code\__defines\_macros.dm" #include "code\__defines\admin.dm" #include "code\__defines\antagonist.dm" +#include "code\__defines\armor.dm" #include "code\__defines\atmos.dm" #include "code\__defines\battle_monsters.dm" #include "code\__defines\callback.dm" @@ -288,6 +289,7 @@ #include "code\datums\brain_damage\severe.dm" #include "code\datums\brain_damage\special_ed.dm" #include "code\datums\components\_component.dm" +#include "code\datums\components\armor\armor.dm" #include "code\datums\components\multitool\_multitool.dm" #include "code\datums\components\multitool\multitool.dm" #include "code\datums\components\multitool\circuitboards\circuitboards.dm" diff --git a/code/ZAS/Airflow.dm b/code/ZAS/Airflow.dm index 991f9b11334..e055e1a5897 100644 --- a/code/ZAS/Airflow.dm +++ b/code/ZAS/Airflow.dm @@ -2,8 +2,8 @@ Contains helper procs for airflow, handled in /connection_group. */ -mob/var/tmp/last_airflow_stun = 0 -mob/proc/airflow_stun() +/mob/var/tmp/last_airflow_stun = 0 +/mob/proc/airflow_stun() if(stat == 2) return 0 if(last_airflow_stun > world.time - vsc.airflow_stun_cooldown) return 0 @@ -19,18 +19,18 @@ mob/proc/airflow_stun() Weaken(5) last_airflow_stun = world.time -mob/living/silicon/airflow_stun() +/mob/living/silicon/airflow_stun() return -mob/living/carbon/slime/airflow_stun() +/mob/living/carbon/slime/airflow_stun() return -mob/living/carbon/human/airflow_stun() +/mob/living/carbon/human/airflow_stun() if(shoes) if(shoes.item_flags & NOSLIP) return 0 ..() -atom/movable/proc/check_airflow_movable(n) +/atom/movable/proc/check_airflow_movable(n) if(anchored && !ismob(src)) return 0 @@ -38,19 +38,19 @@ atom/movable/proc/check_airflow_movable(n) return 1 -mob/check_airflow_movable(n) +/mob/check_airflow_movable(n) if(n < vsc.airflow_heavy_pressure) return 0 return 1 -mob/abstract/observer/check_airflow_movable() +/mob/abstract/observer/check_airflow_movable() return 0 -mob/living/silicon/check_airflow_movable() +/mob/living/silicon/check_airflow_movable() return 0 -obj/item/check_airflow_movable(n) +/obj/item/check_airflow_movable(n) . = ..() switch(w_class) if(2) @@ -117,14 +117,9 @@ obj/item/check_airflow_movable(n) bloody_body(src) var/b_loss = airflow_speed * vsc.airflow_damage - var/blocked = run_armor_check(BP_HEAD,"melee") - apply_damage(b_loss/3, BRUTE, BP_HEAD, blocked, "Airflow") - - blocked = run_armor_check(BP_CHEST,"melee") - apply_damage(b_loss/3, BRUTE, BP_CHEST, blocked, "Airflow") - - blocked = run_armor_check(BP_GROIN,"melee") - apply_damage(b_loss/3, BRUTE, BP_GROIN, blocked, "Airflow") + apply_damage(b_loss/3, BRUTE, BP_HEAD, used_weapon = "Airflow") + apply_damage(b_loss/3, BRUTE, BP_CHEST, used_weapon = "Airflow") + apply_damage(b_loss/3, BRUTE, BP_GROIN, used_weapon = "Airflow") if(airflow_speed > 10) Paralyse(round(airflow_speed * vsc.airflow_stun)) diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm index eca56180197..6a17de540c1 100644 --- a/code/ZAS/Fire.dm +++ b/code/ZAS/Fire.dm @@ -452,13 +452,13 @@ datum/gas_mixture/proc/check_recombustability(list/fuel_objs) //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, "Fire") - apply_damage(2.5*mx*chest_exposure, BURN, BP_CHEST, 0, "Fire") - apply_damage(2.0*mx*groin_exposure, BURN, BP_GROIN, 0, "Fire") - apply_damage(0.6*mx*legs_exposure, BURN, BP_L_LEG, 0, "Fire") - apply_damage(0.6*mx*legs_exposure, BURN, BP_R_LEG, 0, "Fire") - apply_damage(0.4*mx*arms_exposure, BURN, BP_L_ARM, 0, "Fire") - apply_damage(0.4*mx*arms_exposure, BURN, BP_R_ARM, 0, "Fire") + apply_damage(2.5*mx*head_exposure, BURN, BP_HEAD, used_weapon = "Fire") + apply_damage(2.5*mx*chest_exposure, BURN, BP_CHEST, used_weapon = "Fire") + apply_damage(2.0*mx*groin_exposure, BURN, BP_GROIN, used_weapon = "Fire") + apply_damage(0.6*mx*legs_exposure, BURN, BP_L_LEG, used_weapon = "Fire") + apply_damage(0.6*mx*legs_exposure, BURN, BP_R_LEG, used_weapon = "Fire") + apply_damage(0.4*mx*arms_exposure, BURN, BP_L_ARM, used_weapon = "Fire") + apply_damage(0.4*mx*arms_exposure, BURN, BP_R_ARM, used_weapon = "Fire") #undef FIRE_LIGHT_1 diff --git a/code/__defines/armor.dm b/code/__defines/armor.dm new file mode 100644 index 00000000000..df211842e9d --- /dev/null +++ b/code/__defines/armor.dm @@ -0,0 +1,49 @@ +// Armor will turn attacks into less dangerous (e.g. turning cut into bruise), so keep that in mind when decided what armor value to use. +// Some levels are marked with what they intend to block in such way. +#define ARMOR_TYPE_STANDARD 1 +#define ARMOR_TYPE_EXOSUIT 2 + +#define ARMOR_BALLISTIC_MINOR 10 +#define ARMOR_BALLISTIC_SMALL 25 +#define ARMOR_BALLISTIC_PISTOL 50 //Blocks holdout and normal pistol ammo +#define ARMOR_BALLISTIC_RESISTANT 65 +#define ARMOR_BALLISTIC_RIFLE 80 //Blocks rifle rounds +#define ARMOR_BALLISTIC_AP 95 +#define ARMOR_BALLISTIC_HEAVY 110 + +#define ARMOR_LASER_MINOR 10 +#define ARMOR_LASER_SMALL 25 //Blocks small e-guns +#define ARMOR_LASER_HANDGUNS 40 //Blocks normal e-guns +#define ARMOR_LASER_MAJOR 50 +#define ARMOR_LASER_RIFLES 70 //Blocks laser rifles +#define ARMOR_LASER_HEAVY 100 + +#define ARMOR_MELEE_MINOR 5 +#define ARMOR_MELEE_SMALL 10 +#define ARMOR_MELEE_KNIVES 15 //Blocks most knives +#define ARMOR_MELEE_RESISTANT 30 //Blocks large weapons like swords and toolboxes +#define ARMOR_MELEE_MAJOR 50 +#define ARMOR_MELEE_VERY_HIGH 70 +#define ARMOR_MELEE_SHIELDED 100 + +#define ARMOR_BIO_MINOR 10 +#define ARMOR_BIO_SMALL 25 +#define ARMOR_BIO_RESISTANT 50 +#define ARMOR_BIO_STRONG 75 +#define ARMOR_BIO_SHIELDED 100 + +#define ARMOR_RAD_MINOR 10 +#define ARMOR_RAD_SMALL 25 +#define ARMOR_RAD_RESISTANT 40 +#define ARMOR_RAD_SHIELDED 100 + +#define ARMOR_BOMB_MINOR 10 +#define ARMOR_BOMB_PADDED 30 +#define ARMOR_BOMB_RESISTANT 60 +#define ARMOR_BOMB_SHIELDED 100 + +#define ARMOR_ENERGY_MINOR 10 +#define ARMOR_ENERGY_SMALL 25 +#define ARMOR_ENERGY_RESISTANT 40 +#define ARMOR_ENERGY_STRONG 75 +#define ARMOR_ENERGY_SHIELDED 100 \ No newline at end of file diff --git a/code/__defines/damage_organs.dm b/code/__defines/damage_organs.dm index 2ace904180a..d7243e67485 100644 --- a/code/__defines/damage_organs.dm +++ b/code/__defines/damage_organs.dm @@ -12,10 +12,13 @@ #define PIERCE "pierce" #define LASER "laser" -#define DAM_EDGE 1 -#define DAM_SHARP 2 -#define DAM_LASER 4 -#define DAM_BULLET 8 +#define DAM_EDGE 1 +#define DAM_SHARP 2 +#define DAM_LASER 4 +#define DAM_BULLET 8 +#define DAM_EXPLODE 16 +#define DAM_DISPERSED 32 // Makes apply_damage calls without specified zone distribute damage rather than randomly choose organ (for humans) +#define DAM_BIO 64 #define STUN "stun" #define WEAKEN "weaken" diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 95d35c24c31..d8a1fef9e2b 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -122,7 +122,7 @@ avoid code duplication. This includes items that may sometimes act as a standard return 1 -//Called when a weapon is used to make a successful melee attack on a mob. Returns the blocked result +//Called when a weapon is used to make a successful melee attack on a mob. Returns whether damage was dealt. /obj/item/proc/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone) var/power = force if(HULK in user.mutations) diff --git a/code/datums/components/armor/armor.dm b/code/datums/components/armor/armor.dm new file mode 100644 index 00000000000..d9ac8dafa7b --- /dev/null +++ b/code/datums/components/armor/armor.dm @@ -0,0 +1,111 @@ +/datum/component/armor + var/list/armor_values + var/full_block_message = "Your armor absorbs the blow!" + var/partial_block_message = "Your armor softens the blow!" + + // This controls how some armor types such as mech armor work. + var/armor_flags = ARMOR_TYPE_STANDARD + + // Armor 'works' for damages in range from 0 to [armor_range_mult * armor]. + // The lower the damage, the harder it gets blocked, tapering to 0 mitigation at [armor_range_mult * armor] + var/armor_range_mult = 2 + // [under_armor_mult] multiplies how strongly damage that is <= armor value is blocked. + // E.g. setting it to 0 will flat out block all damage below armor + var/under_armor_mult = 0.7 + // [over_armor_mult] multiplies how strongly damage that is > armor value is blocked. + // E.g. setting it to more than 1 will make mitigation drop off faster, effectively reducing the range of damage mitigation + var/over_armor_mult = 1 + +/datum/component/armor/Initialize(list/armor) + ..() + if(armor) + armor_values = armor.Copy() + +// Takes in incoming damage value +// Applies state changes to self, holder, and whatever else caused by damage mitigation +// Returns modified damage, a list to allow for flag modification or damage conversion, in the same format as the arguments. +/datum/component/armor/proc/apply_damage_modifications(damage, damage_type, damage_flags, mob/living/victim, armor_pen, silent = FALSE) + if(armor_flags & ARMOR_TYPE_EXOSUIT) + if(prob(get_blocked(damage_type, damage_flags, armor_pen) * 100)) //extra removal of sharp and edge on account of us being big robots + damage_flags &= ~(DAM_SHARP | DAM_EDGE) + + if(damage <= 0) + return args.Copy() + + var/blocked = get_blocked(damage_type, damage_flags, armor_pen, damage) + on_blocking(damage, damage_type, damage_flags, armor_pen, blocked) + + // Blocking values that mean the damage was under armor, so all dangerous flags are removed (edge/sharp) + var/armor_border_blocking = 1 - (under_armor_mult * 1/armor_range_mult) + if(blocked >= armor_border_blocking) + if(damage_flags & DAM_LASER) + damage *= FLUIDLOSS_CONC_BURN/FLUIDLOSS_WIDE_BURN + damage_flags &= ~(DAM_SHARP | DAM_EDGE | DAM_LASER) + if(damage_type == IRRADIATE) + damage = max(0, damage - 100 * blocked) + silent = TRUE + damage *= 1 - blocked + + if(!silent) + if(blocked > 0.7) + to_chat(victim, SPAN_NOTICE(full_block_message)) + else if(blocked > 0.2) + to_chat(victim, SPAN_NOTICE(partial_block_message)) + return args.Copy() + +/datum/component/armor/proc/on_blocking(damage, damage_type, damage_flags, armor_pen, blocked) + +// A simpler proc used as a helper for above but can also be used externally. Does not modify state. +/datum/component/armor/proc/get_blocked(damage_type, damage_flags, armor_pen = 0, damage = 5) + var/key = get_armor_key(damage_type, damage_flags) + if(!key) + return 0 + + var/armor = max(0, get_value(key) - armor_pen) + if(!armor) + return 0 + var/efficiency = min(damage / (armor_range_mult * armor), 1) + var/coef = damage <= armor ? under_armor_mult : over_armor_mult + return max(1 - coef * efficiency, 0) + +/datum/component/armor/proc/get_value(key) + if(isnull(armor_values[key])) + return 0 + return min(armor_values[key], 100) + +/datum/component/armor/proc/set_value(key, newval) + armor_values[key] = Clamp(newval, 0, 100) + +// There is a disconnect between legacy damage and armor code. This here helps bridge the gap. +/proc/get_armor_key(damage_type, damage_flags) + var/key + switch(damage_type) + if(BRUTE) + if(damage_flags & DAM_BULLET) + key = "bullet" + else if(damage_flags & DAM_EXPLODE) + key = "bomb" + else + key = "melee" + if(BURN) + if(damage_flags & DAM_LASER) + key = "laser" + else if(damage_flags & DAM_EXPLODE) + key = "bomb" + else + key = "energy" + if(TOX) + if(damage_flags & DAM_BIO) + key = "bio" // Otherwise just not blocked by default. + if(IRRADIATE) + key = "rad" + return key + +/datum/component/armor/toggle + var/active = TRUE + +/datum/component/armor/toggle/proc/toggle(new_state) + active = new_state + +/datum/component/armor/toggle/get_value(key) + return active ? ..() : 0 \ No newline at end of file diff --git a/code/datums/uplink/stealthy and inconspicuous weapons.dm b/code/datums/uplink/stealthy and inconspicuous weapons.dm index f28d50e3f19..0cae034bedb 100644 --- a/code/datums/uplink/stealthy and inconspicuous weapons.dm +++ b/code/datums/uplink/stealthy and inconspicuous weapons.dm @@ -40,7 +40,7 @@ item_cost = 5 path = /obj/item/clothing/ring/reagent/sleepy -/datum/uplink_item/item/stealthy_weapons/sharpened_trap +/datum/uplink_item/item/stealthy_weapons/bear_trap name = "Sharpened Bear Trap" - item_cost = 4 + item_cost = 5 path = /obj/item/trap/sharpened \ No newline at end of file diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index 225e6bf7268..d81223dd40e 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -84,7 +84,7 @@ if (targetIsHuman) var/mob/living/carbon/human/targethuman = target - armorpercent = targethuman.run_armor_check(target_zone,"melee") + armorpercent = targethuman.get_blocked_ratio(target_zone, BRUTE, damage = force)*100 wasblocked = targethuman.check_shields(force, src, user, target_zone, null) //returns 1 if it's a block var/damageamount = force diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index cafdcc29ccd..60f5c966d4b 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -454,7 +454,7 @@ else randmuti(src.connected.occupant) - src.connected.occupant.apply_effect(((src.radiation_intensity*3)+src.radiation_duration*3), IRRADIATE, blocked = 0) + src.connected.occupant.apply_damage(((src.radiation_intensity*3)+src.radiation_duration*3), IRRADIATE, damage_flags = DAM_DISPERSED) src.connected.locked = lock_state return 1 // return 1 forces an update to all Nano uis attached to src @@ -548,7 +548,7 @@ block = miniscrambletarget(num2text(selected_ui_target), src.radiation_intensity, src.radiation_duration) src.connected.occupant.dna.SetUISubBlock(src.selected_ui_block,src.selected_ui_subblock,block) src.connected.occupant.UpdateAppearance() - src.connected.occupant.apply_effect((src.radiation_intensity+src.radiation_duration), IRRADIATE, blocked = 0) + src.connected.occupant.apply_damage((src.radiation_intensity+src.radiation_duration), IRRADIATE, damage_flags = DAM_DISPERSED) else if (prob(20+src.radiation_intensity)) randmutb(src.connected.occupant) @@ -556,7 +556,7 @@ else randmuti(src.connected.occupant) src.connected.occupant.UpdateAppearance() - src.connected.occupant.apply_effect(((src.radiation_intensity*2)+src.radiation_duration), IRRADIATE, blocked = 0) + src.connected.occupant.apply_damage(((src.radiation_intensity*2)+src.radiation_duration), IRRADIATE, damage_flags = DAM_DISPERSED) src.connected.locked = lock_state return 1 // return 1 forces an update to all Nano uis attached to src @@ -613,10 +613,10 @@ //testing("Irradiated SE block [real_SE_block]:[src.selected_se_subblock] ([original_block] now [block]) [(real_SE_block!=selected_se_block) ? "(SHIFTED)":""]!") connected.occupant.dna.SetSESubBlock(real_SE_block,selected_se_subblock,block) - src.connected.occupant.apply_effect((src.radiation_intensity+src.radiation_duration), IRRADIATE, blocked = 0) + src.connected.occupant.apply_damage((src.radiation_intensity+src.radiation_duration), IRRADIATE, damage_flags = DAM_DISPERSED) domutcheck(src.connected.occupant,src.connected) else - src.connected.occupant.apply_effect(((src.radiation_intensity*2)+src.radiation_duration), IRRADIATE, blocked = 0) + src.connected.occupant.apply_damage(((src.radiation_intensity*2)+src.radiation_duration), IRRADIATE, damage_flags = DAM_DISPERSED) if (prob(80-src.radiation_duration)) //testing("Random bad mut!") randmutb(src.connected.occupant) @@ -738,7 +738,7 @@ src.connected.occupant.dna.SE = buf.dna.SE src.connected.occupant.dna.UpdateSE() domutcheck(src.connected.occupant,src.connected) - src.connected.occupant.apply_effect(rand(20,50), IRRADIATE, blocked = 0) + src.connected.occupant.apply_damage(rand(20,50), damage_flags = DAM_DISPERSED) return 1 if (bufferOption == "createInjector") diff --git a/code/game/gamemodes/cult/items/armor.dm b/code/game/gamemodes/cult/items/armor.dm index 1db756fd275..3a9109788bb 100644 --- a/code/game/gamemodes/cult/items/armor.dm +++ b/code/game/gamemodes/cult/items/armor.dm @@ -17,7 +17,14 @@ name = "eldritch voidsuit helmet" desc = "A bulky armored voidsuit helmet, bristling with menacing spikes. It looks space proof." icon_state = "cult_helmet" - armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_MAJOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) siemens_coefficient = 0 light_overlay = "helmet_light_dual_red" light_color = COLOR_RED_LIGHT @@ -33,7 +40,14 @@ w_class = ITEMSIZE_NORMAL allowed = list(/obj/item/book/tome, /obj/item/melee/cultblade, /obj/item/gun/energy/rifle/cult, /obj/item/tank, /obj/item/device/suit_cooling_unit) slowdown = 1 - armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_MAJOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) siemens_coefficient = 0 body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS|HANDS flags_inv = HIDEWRISTS|HIDEGLOVES|HIDEJUMPSUIT|HIDETAIL|HIDESHOES diff --git a/code/game/gamemodes/cult/items/clothes.dm b/code/game/gamemodes/cult/items/clothes.dm index fd6ec2a5292..2ec3521c19e 100644 --- a/code/game/gamemodes/cult/items/clothes.dm +++ b/code/game/gamemodes/cult/items/clothes.dm @@ -5,7 +5,13 @@ description_cult = "This can be reforged to become an eldritch voidsuit helmet." flags_inv = HIDEFACE|HIDEEARS|HIDEEYES body_parts_covered = HEAD|EYES - armor = list(melee = 50, bullet = 30, laser = 50, energy = 20, bomb = 25, bio = 10, rad = 0) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_MAJOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SMALL + ) cold_protection = HEAD min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE siemens_coefficient = 0 @@ -26,7 +32,13 @@ item_state = "cultrobes" body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS allowed = list(/obj/item/book/tome, /obj/item/melee/cultblade) - armor = list(melee = 50, bullet = 30, laser = 50, energy = 20, bomb = 25, bio = 10, rad = 0) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_MAJOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SMALL + ) flags_inv = HIDEJUMPSUIT siemens_coefficient = 0 @@ -47,8 +59,13 @@ force = 5 silent = 1 siemens_coefficient = 0.35 //antags don't get exceptions, it's just heavy armor by magical standards - armor = list(melee = 50, bullet = 30, laser = 50, energy = 20, bomb = 25, bio = 10, rad = 0) - + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_MAJOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SMALL + ) cold_protection = FEET min_cold_protection_temperature = SHOE_MIN_COLD_PROTECTION_TEMPERATURE heat_protection = FEET diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index cea3b711869..f03cc560f4d 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -10,9 +10,9 @@ var/hadevent = 0 if(isNotStationLevel(T.z)) continue - H.apply_effect((rand(15,75)),IRRADIATE, blocked = H.getarmor(null, "rad")) + H.apply_damage((rand(15,75)), IRRADIATE, damage_flags = DAM_DISPERSED) if (prob(5)) - H.apply_effect((rand(90,150)),IRRADIATE, blocked = H.getarmor(null, "rad")) + H.apply_damage((rand(90,150)), IRRADIATE, damage_flags = DAM_DISPERSED) if (prob(25)) if (prob(75)) randmutb(H) diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index cfff036086c..706b93d1cd3 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -262,7 +262,7 @@ /obj/effect/meteor/irradiated/meteor_effect() new /obj/effect/decal/cleanable/greenglow(get_turf(src)) for(var/mob/living/L in view(5, src)) - L.apply_effect(40, IRRADIATE, blocked = L.getarmor(null, "rad")) + L.apply_damage(40, IRRADIATE, damage_flags = DAM_DISPERSED) /obj/effect/meteor/golden name = "golden meteor" diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 081e4ec18ee..eb9a6abfb62 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -544,7 +544,7 @@ obj/machinery/door/airlock/glass_centcom/attackby(obj/item/I, mob/user) /obj/machinery/door/airlock/uranium/proc/radiate() for(var/mob/living/L in range (3,src)) - L.apply_effect(15,IRRADIATE, blocked = L.getarmor(null, "rad")) + L.apply_damage(15, IRRADIATE, damage_flags = DAM_DISPERSED) return //---Phoron door @@ -1485,7 +1485,8 @@ About the new airlock wires panel: /mob/living/airlock_crush(var/crush_damage) . = ..() for(var/i = 1, i <= AIRLOCK_CRUSH_DIVISOR, i++) - adjustBruteLoss(round(crush_damage / AIRLOCK_CRUSH_DIVISOR)) + apply_damage((crush_damage / AIRLOCK_CRUSH_DIVISOR), BRUTE) + SetStunned(5) SetWeakened(5) visible_message(SPAN_DANGER("[src] is crushed in the airlock!"), SPAN_DANGER("You are crushed in the airlock!"), SPAN_NOTICE("You hear airlock actuators momentarily struggle.")) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 3d417ab4585..9c9d721f469 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -399,11 +399,11 @@ if(src.health <= 0 && initialhealth > 0) src.set_broken() else if(src.health < src.maxhealth / 4 && initialhealth >= src.maxhealth / 4) - visible_message("\The [src] looks like it's about to break!" ) + visible_message(SPAN_WARNING("\The [src] looks like it's about to break!")) else if(src.health < src.maxhealth / 2 && initialhealth >= src.maxhealth / 2) - visible_message("\The [src] looks seriously damaged!" ) + visible_message(SPAN_WARNING("\The [src] looks seriously damaged!")) else if(src.health < src.maxhealth * 3/4 && initialhealth >= src.maxhealth * 3/4) - visible_message("\The [src] shows signs of damage!" ) + visible_message(SPAN_WARNING("\The [src] shows signs of damage!")) update_icon() return @@ -411,11 +411,11 @@ /obj/machinery/door/examine(mob/user) . = ..() if(src.health < src.maxhealth / 4) - to_chat(user, "\The [src] looks like it's about to break!") + to_chat(user, SPAN_WARNING("\The [src] looks like it's about to break!")) else if(src.health < src.maxhealth / 2) - to_chat(user, "\The [src] looks seriously damaged!") + to_chat(user, SPAN_WARNING("\The [src] looks seriously damaged!")) else if(src.health < src.maxhealth * 3/4) - to_chat(user, "\The [src] shows signs of damage!") + to_chat(user, SPAN_WARNING("\The [src] shows signs of damage!")) /obj/machinery/door/proc/set_broken() diff --git a/code/game/machinery/suit_cycler.dm b/code/game/machinery/suit_cycler.dm index c15136de39b..983fec6883f 100644 --- a/code/game/machinery/suit_cycler.dm +++ b/code/game/machinery/suit_cycler.dm @@ -509,7 +509,7 @@ occupant.take_organ_damage(0, radiation_level * 2 + rand(1, 3)) if(radiation_level > 1) occupant.take_organ_damage(0, radiation_level + rand(1, 3)) - occupant.apply_effect(radiation_level * 10, IRRADIATE) + occupant.apply_damage(radiation_level * 10, IRRADIATE, damage_flags = DAM_DISPERSED) /obj/machinery/suit_cycler/proc/finished_job() visible_message("[icon2html(src, viewers(get_turf(src)))] \The [src] pings loudly.") diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 10fa8815cf1..8ea748f052f 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -41,7 +41,6 @@ var/slowdown = 0 // How much clothing is slowing you down. Negative values speeds you up var/canremove = 1 //Mostly for Ninja code at this point but basically will not allow the item to be removed if set to 0. /N var/can_embed = 1//If zero, this item/weapon cannot become embedded in people when you hit them with it - var/list/armor //= list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) If null, object has 0 armor. var/list/allowed = null //suit storage stuff. var/obj/item/device/uplink/hidden/hidden_uplink // All items can have an uplink hidden inside, just remember to add the triggers. var/zoomdevicename //name used for message when binoculars/scope is used @@ -57,6 +56,9 @@ ///Sound uses when dropping the item, or when its thrown. var/drop_sound = /decl/sound_category/generic_drop_sound // drop sound - this is the default + var/list/armor + var/armor_degradation_speed //How fast armor will degrade, multiplier to blocked damage to get armor damage value. + //Item_state definition moved to /obj //var/item_state = null // Used to specify the item state for the on-mob overlays. var/item_state_slots //overrides the default item_state for particular slots. @@ -95,6 +97,14 @@ var/lock_picking_level = 0 //used to determine whether something can pick a lock, and how well. // Its vital that if you make new power tools or new recipies that you include this +/obj/item/Initialize() + . = ..() + if(islist(armor)) + for(var/type in armor) + if(armor[type]) + AddComponent(/datum/component/armor, armor, armor_degradation_speed) + break + /obj/item/Destroy() if(ismob(loc)) var/mob/m = loc diff --git a/code/game/objects/items/devices/lighting/glowstick.dm b/code/game/objects/items/devices/lighting/glowstick.dm index 3c758126d2b..c6d6b1e8d58 100644 --- a/code/game/objects/items/devices/lighting/glowstick.dm +++ b/code/game/objects/items/devices/lighting/glowstick.dm @@ -43,7 +43,7 @@ to_chat(user, SPAN_WARNING("You break \the [src] apart, spilling its contents everywhere!")) fuel = 0 new /obj/effect/decal/cleanable/greenglow(get_turf(user)) - user.apply_effect((rand(15,30)),IRRADIATE,blocked = user.getarmor(null, "rad")) + user.apply_damage(rand(15,30), IRRADIATE, damage_flags = DAM_DISPERSED) qdel(src) return diff --git a/code/game/objects/items/weapons/material/caltrops.dm b/code/game/objects/items/weapons/material/caltrops.dm index 02b7d5b590d..30dd1c4c76f 100644 --- a/code/game/objects/items/weapons/material/caltrops.dm +++ b/code/game/objects/items/weapons/material/caltrops.dm @@ -49,9 +49,7 @@ damage_coef -= 0.2 return - var/armor_block = H.run_armor_check(affecting, "melee") - - if(H.apply_damage(25 * damage_coef, BRUTE, affecting, armor_block)) + if(H.apply_damage(25 * damage_coef, BRUTE, affecting)) H.updatehealth() if(H.can_feel_pain()) diff --git a/code/game/objects/items/weapons/material/material_armor.dm b/code/game/objects/items/weapons/material/material_armor.dm index a915db14382..f07465c629b 100644 --- a/code/game/objects/items/weapons/material/material_armor.dm +++ b/code/game/objects/items/weapons/material/material_armor.dm @@ -32,7 +32,9 @@ Protectiveness | Armor % icon_state = "material_armor" item_state = "material_armor" contained_sprite = 1 - armor = list(melee = 5, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_MINOR + ) pocket_slots = 1 /obj/item/clothing/suit/armor/material/makeshift/plasteel @@ -96,7 +98,9 @@ Protectiveness | Armor % ) icon_state = "bucket" item_state = "bucket" - armor = list(melee = 5, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_MINOR + ) contained_sprite = 1 /obj/item/clothing/head/helmet/bucket/wood diff --git a/code/game/objects/items/weapons/material/swords.dm b/code/game/objects/items/weapons/material/swords.dm index b4d45c30d1a..4deada6e5bb 100644 --- a/code/game/objects/items/weapons/material/swords.dm +++ b/code/game/objects/items/weapons/material/swords.dm @@ -36,7 +36,7 @@ return 0 /obj/item/material/sword/perform_technique(var/mob/living/carbon/human/target, var/mob/living/carbon/human/user, var/target_zone) - var/armor_reduction = target.run_armor_check(target_zone,"melee") + var/armor_reduction = target.get_blocked_ratio(target_zone, BRUTE, DAM_EDGE|DAM_SHARP, damage = force)*100 var/obj/item/organ/external/affecting = target.get_organ(target_zone) if(!affecting) return diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index b9895184a2a..57a230d40b4 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -195,10 +195,6 @@ if(status) deductcharge(hitcost) - if(ishuman(L)) - var/mob/living/carbon/human/H = L - H.forcesay(hit_appends) - return 1 /obj/item/melee/baton/emp_act(severity) diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index fdaab3ed4ce..021a7e07ddb 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -102,9 +102,7 @@ if(user.a_intent == I_DISARM) if(ishuman(target)) var/mob/living/carbon/human/T = target - var/armor = T.run_armor_check(target_zone,"melee") - - T.apply_damage(40, PAIN, target_zone, armor) + T.apply_damage(40, PAIN, target_zone) return else return ..() diff --git a/code/game/objects/items/weapons/traps.dm b/code/game/objects/items/weapons/traps.dm index 2fda26da7d5..123e85f7d72 100644 --- a/code/game/objects/items/weapons/traps.dm +++ b/code/game/objects/items/weapons/traps.dm @@ -15,7 +15,7 @@ matter = list(DEFAULT_WALL_MATERIAL = 18750) var/deployed = FALSE var/time_to_escape = 60 - var/ignore_armor = FALSE + var/activated_armor_penetration = 0 /obj/item/trap/proc/can_use(mob/user) return (user.IsAdvancedToolUser() && !issilicon(user) && !user.stat && !user.restrained()) @@ -98,18 +98,9 @@ else target_zone = pick(BP_L_FOOT, BP_R_FOOT, BP_L_LEG, BP_R_LEG) - if(!ignore_armor) - //armor - var/blocked = L.run_armor_check(target_zone, "melee") - if(blocked >= 100) - return - var/success = L.apply_damage(30, BRUTE, target_zone, blocked, src) - if(!success) - return FALSE - else - var/success = L.apply_damage(30, BRUTE, target_zone, 0, src) - if(!success) - return FALSE + var/success = L.apply_damage(30, BRUTE, target_zone, used_weapon = src, armor_pen = activated_armor_penetration) + if(!success) + return FALSE var/did_trap = TRUE if(ishuman(L)) @@ -156,7 +147,7 @@ /obj/item/trap/sharpened name = "sharpened mechanical trap" desc_antag = "This device has an even higher chance of penetrating armor and locking foes in place." - ignore_armor = TRUE + activated_armor_penetration = 100 /obj/item/trap/animal name = "small trap" diff --git a/code/game/objects/items/weapons/vaurca_items.dm b/code/game/objects/items/weapons/vaurca_items.dm index c167dc0ffb1..d9c351b5028 100644 --- a/code/game/objects/items/weapons/vaurca_items.dm +++ b/code/game/objects/items/weapons/vaurca_items.dm @@ -243,7 +243,7 @@ species_restricted = list(BODYTYPE_VAURCA,BODYTYPE_VAURCA_WARFORM) sprite_sheets = list( BODYTYPE_VAURCA_WARFORM = 'icons/mob/species/warriorform/shoes.dmi' - ) + ) action_button_name = "Toggle the magclaws" @@ -257,8 +257,13 @@ slowdown = -1 species_restricted = list(BODYTYPE_VAURCA) - armor = list(melee = 50, bullet = 20, laser = 50, energy = 30, bomb = 45, bio = 100, rad = 10) - + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_SMALL, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED + ) /obj/item/clothing/head/helmet/space/void/scout name = "scout helmet" desc = "A helmet designed for K'laxan scouts, made of lightweight sturdy material that does not restrict movement." @@ -268,8 +273,13 @@ item_state = "helm_scout" species_restricted = list(BODYTYPE_VAURCA) - armor = list(melee = 40, bullet = 20, laser = 40, energy = 30, bomb = 45, bio = 100, rad = 10) - + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_SMALL, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED + ) light_overlay = "helmet_light_dual_green" light_color = "#3e7c3e" @@ -282,8 +292,14 @@ desc = "A design perfected by the Zo'ra, this helmet is commonly used by frontline warriors of a hive. Ablative design deflects lasers away from the body while providing moderate physical protection." species_restricted = list(BODYTYPE_VAURCA) - armor = list(melee = 40, bullet = 40, laser = 60, energy = 50, bomb = 45, bio = 100, rad = 10) - + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_RESISTANT, + laser = ARMOR_LASER_MAJOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_MINOR + ) /obj/item/clothing/head/helmet/space/void/commando name = "commando helmet" desc = "A design perfected by the Zo'ra, this helmet is commonly used by frontline warriors of a hive. Ablative design deflects lasers away from the body while providing moderate physical protection." @@ -293,7 +309,14 @@ item_state = "helm_commando" species_restricted = list(BODYTYPE_VAURCA) - armor = list(melee = 30, bullet = 30, laser = 60, energy = 50, bomb = 45, bio = 100, rad = 10) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_RESISTANT, + laser = ARMOR_LASER_MAJOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_MINOR + ) light_overlay = "helmet_light_dual_green" light_color = "#3e7c3e" @@ -307,7 +330,13 @@ gas_filter_strength = 3 w_class = ITEMSIZE_SMALL filtered_gases = list(GAS_NITROGEN, GAS_N2O) - armor = list(melee = 25, bullet = 10, laser = 25, energy = 25, bomb = 0, bio = 50, rad = 15) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_SMALL, + bio = ARMOR_BIO_STRONG, + rad = ARMOR_RAD_MINOR + ) icon = 'icons/obj/vaurca_items.dmi' icon_state = "m_metalg" item_state = "m_metalg" diff --git a/code/game/objects/structures/simple_doors.dm b/code/game/objects/structures/simple_doors.dm index dd4f67715d0..62d028afedb 100644 --- a/code/game/objects/structures/simple_doors.dm +++ b/code/game/objects/structures/simple_doors.dm @@ -211,7 +211,7 @@ if(!material.radioactivity) return for(var/mob/living/L in range(1,src)) - L.apply_effect(round(material.radioactivity/3),IRRADIATE,0) + L.apply_damage(round(material.radioactivity/3),IRRADIATE, damage_flags = DAM_DISPERSED) /obj/structure/simple_door/iron/New(var/newloc,var/material_name, var/complexity) ..(newloc, MATERIAL_IRON, complexity) 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 ee098df1d86..4cfd357a8a1 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -157,21 +157,19 @@ var/mob/living/occupant = unbuckle_mob() var/def_zone = ran_zone() - var/blocked = occupant.run_armor_check(def_zone, "melee") occupant.throw_at(A, 3, propelled) - 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) + occupant.apply_effect(6, STUN) + occupant.apply_effect(6, WEAKEN) + occupant.apply_effect(6, STUTTER) + occupant.apply_damage(10, BRUTE, def_zone) playsound(src.loc, "punch", 50, 1, -1) - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/victim = A def_zone = ran_zone() - blocked = victim.run_armor_check(def_zone, "melee") - 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) + victim.apply_effect(6, STUN) + victim.apply_effect(6, WEAKEN) + victim.apply_effect(6, STUTTER) + victim.apply_damage(10, BRUTE, def_zone) 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/stools.dm b/code/game/objects/structures/stool_bed_chair_nest/stools.dm index 18372c7f59f..1bb7f9023cb 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/stools.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/stools.dm @@ -115,8 +115,8 @@ dismantle() qdel(src) - var/blocked = target.run_armor_check(hit_zone, "melee") - target.Weaken(10 * BLOCKED_MULT(blocked)) + var/blocked = target.get_blocked_ratio(hit_zone, BRUTE) + target.Weaken(10 * (1 - blocked)) target.apply_damage(20, BRUTE, hit_zone, blocked, src) return 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 906dc7ec5b6..2375bc0b86d 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm @@ -150,21 +150,19 @@ occupant.throw_at(A, 3, propelled) var/def_zone = ran_zone() - var/blocked = occupant.run_armor_check(def_zone, "melee") occupant.throw_at(A, 3, propelled) - 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) + occupant.apply_effect(6, STUN) + occupant.apply_effect(6, WEAKEN) + occupant.apply_effect(6, STUTTER) + occupant.apply_damage(10, BRUTE, def_zone) playsound(src.loc, "punch", 50, 1, -1) - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/victim = A def_zone = ran_zone() - blocked = victim.run_armor_check(def_zone, "melee") - 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) + victim.apply_effect(6, STUN) + victim.apply_effect(6, WEAKEN) + victim.apply_effect(6, STUTTER) + victim.apply_damage(10, BRUTE, def_zone) if(pulling) occupant.visible_message("[pulling] has thrusted \the [name] into \the [A], throwing \the [occupant] out of it!") diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 109c10ae0c0..0a66c80d5ff 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -119,8 +119,7 @@ to_chat(user, SPAN_NOTICE("[GM.name] needs to be on the urinal.")) return user.visible_message(SPAN_DANGER("[user] slams [GM.name] into the [src]!"), SPAN_NOTICE("You slam [GM.name] into the [src]!")) - var/blocked = GM.run_armor_check("melee") - GM.apply_damage(8, def_zone = BP_HEAD, blocked = blocked, used_weapon = "blunt force") + GM.apply_damage(8, def_zone = BP_HEAD, used_weapon = "blunt force") user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN * 1.5) else to_chat(user, SPAN_NOTICE("You need a tighter grip.")) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 16564efe830..288bc9de225 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -278,22 +278,21 @@ qdel(G) //gotta delete it here because if window breaks, it won't get deleted var/def_zone = ran_zone(BP_HEAD, 20) - var/blocked = M.run_armor_check(def_zone, "melee") switch (state) if(1) M.visible_message(SPAN_WARNING("[user] slams [M] against \the [src]!")) - M.apply_damage(7, damtype, def_zone, blocked, src) + M.apply_damage(7, damtype, def_zone, used_weapon = src) hit(10) if(2) M.visible_message(SPAN_DANGER("[user] bashes [M] against \the [src]!")) if (prob(50)) M.Weaken(1) - M.apply_damage(10, damtype, def_zone, blocked, src) + M.apply_damage(10, damtype, def_zone, used_weapon = src) hit(25) if(3) M.visible_message(SPAN_DANGER("[user] crushes [M] against \the [src]!")) M.Weaken(5) - M.apply_damage(20, damtype, def_zone, blocked, src) + M.apply_damage(20, damtype, def_zone, used_weapon = src) hit(50) /obj/structure/window/proc/hit(var/damage, var/sound_effect = 1) diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 55b03632561..121b82f146f 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -241,7 +241,7 @@ return for(var/mob/living/L in range(3,src)) - L.apply_effect(total_radiation, IRRADIATE, blocked = L.getarmor(null, "rad")) + L.apply_damage(total_radiation, IRRADIATE, damage_flags = DAM_DISPERSED) return total_radiation /turf/simulated/wall/proc/burn(temperature) diff --git a/code/global.dm b/code/global.dm index c07d74d10ff..2d7cd23401f 100644 --- a/code/global.dm +++ b/code/global.dm @@ -20,9 +20,6 @@ var/global/datum/universal_state/universe = new var/global/list/global_map = null -// Noises made when hit while typing. -var/list/hit_appends = list("-OOF", "-ACK", "-UGH", "-HRNK", "-HURGH", "-GLORF") - var/diary = null var/diary_runtime = null var/diary_date_string = null diff --git a/code/modules/clothing/gloves/arm_guard.dm b/code/modules/clothing/gloves/arm_guard.dm index 8bcf782a267..80e4c0f9721 100644 --- a/code/modules/clothing/gloves/arm_guard.dm +++ b/code/modules/clothing/gloves/arm_guard.dm @@ -3,7 +3,13 @@ desc = "These arm guards will protect your hands and arms." icon_state = "arm_guards_riot" body_parts_covered = HANDS|ARMS - armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_MAJOR, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_MINOR + ) punch_force = 3 w_class = ITEMSIZE_NORMAL siemens_coefficient = 0.35 @@ -23,18 +29,33 @@ desc = "These arm guards will protect your hands and arms from energy weapons." icon_state = "arm_guards_laser" siemens_coefficient = 0 - armor = list(melee = 25, bullet = 25, laser = 80, energy = 40, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_KNIVES, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_RIFLES, + energy = ARMOR_ENERGY_RESISTANT + ) /obj/item/clothing/gloves/arm_guard/bulletproof name = "ballistic arm guards" desc = "These arm guards will protect your hands and arms from ballistic weapons." icon_state = "arm_guards_bullet" - armor = list(melee = 25, bullet = 80, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_KNIVES, + bullet = ARMOR_BALLISTIC_RIFLE, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR + ) /obj/item/clothing/gloves/arm_guard/riot name = "riot arm guards" desc = "These arm guards will protect your hands and arms from close combat weapons." - armor = list(melee = 80, bullet = 20, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR + ) /obj/item/clothing/gloves/arm_guard/mercs name = "heavy arm guards" @@ -43,5 +64,11 @@ item_state = "armguards" icon_state = "armguards" contained_sprite = TRUE - armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 40, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_RESISTANT, + bomb = ARMOR_BOMB_PADDED + ) species_restricted = null diff --git a/code/modules/clothing/gloves/miscellaneous.dm b/code/modules/clothing/gloves/miscellaneous.dm index 18be219ac4b..6b1dcd4e6e3 100644 --- a/code/modules/clothing/gloves/miscellaneous.dm +++ b/code/modules/clothing/gloves/miscellaneous.dm @@ -219,7 +219,13 @@ icon_state = "warping_claws" item_state = "warping_claws" attack_verb = list("ripped", "torn", "cut") - armor = list(melee = 50, bullet = 15, laser = 15, energy = 10, bomb = 10, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_MINOR, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_MINOR + ) siemens_coefficient = 1 force = 5 punch_force = 10 diff --git a/code/modules/clothing/head/hardhat.dm b/code/modules/clothing/head/hardhat.dm index 3de0eb754ac..24d1c0df1f3 100644 --- a/code/modules/clothing/head/hardhat.dm +++ b/code/modules/clothing/head/hardhat.dm @@ -5,7 +5,15 @@ action_button_name = "Toggle Headlamp" brightness_on = 4 //luminosity when on light_overlay = "hardhat_light" - armor = list(melee = 30, bullet = 5, laser = 20,energy = 10, bomb = 20, bio = 10, rad = 20) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_MINOR, + rad = ARMOR_RAD_MINOR + ) flags_inv = 0 w_class = ITEMSIZE_NORMAL siemens_coefficient = 0.9 @@ -45,4 +53,3 @@ icon_state = "helmet_paramed" item_state = "helmet_paramed" light_overlay = "EMS_light" - armor = list(melee = 30, bullet = 15, laser = 20,energy = 10, bomb = 20, bio = 10, rad = 20) diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index 580df89225f..7d496d433e2 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -7,7 +7,13 @@ slot_r_hand_str = "helmet" ) item_flags = THICKMATERIAL - armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_RESISTANT, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED + ) flags_inv = HIDEEARS|BLOCKHEADHAIR cold_protection = HEAD min_cold_protection_temperature = HELMET_MIN_COLD_PROTECTION_TEMPERATURE @@ -61,7 +67,6 @@ desc_fluff = "What the heck did you just hecking say about me, you little honker? I'll have you know I graduated top of my class in the Sol Army, and I've been involved in numerous secret raids on the Jargon Federation, and I have over 300 confirmed kills. I am trained in gorilla warfare and I'm the top sniper in the entire Sol armed forces. You are nothing to me but just another target. I will wipe you the heck out with precision the likes of which has never been seen before on Biesel, mark my hecking words." icon_state = "hoshelmet" item_state = "hoshelmet" - armor = list(melee = 62, bullet = 50, laser = 50, energy = 35, bomb = 10, bio = 2, rad = 0) /obj/item/clothing/head/helmet/hos/dermal name = "dermal armor patch" @@ -86,7 +91,10 @@ desc = "It's a helmet specifically designed to protect against close range attacks." icon_state = "riot" body_parts_covered = HEAD|FACE|EYES //face shield - armor = list(melee = 80, bullet = 20, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_MINOR + ) siemens_coefficient = 0.35 flags_inv = HIDEEARS action_button_name = "Toggle Visor" @@ -109,14 +117,24 @@ name = "ablative helmet" desc = "A helmet made from advanced materials which protects against concentrated energy weapons." icon_state = "helmet_reflect" - armor = list(melee = 25, bullet = 25, laser = 80, energy = 40, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_SMALL, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_RIFLES, + energy = ARMOR_ENERGY_RESISTANT + ) siemens_coefficient = 0 /obj/item/clothing/head/helmet/ballistic name = "ballistic helmet" desc = "A helmet with reinforced plating to protect against ballistic projectiles." icon_state = "helmet_bulletproof" - armor = list(melee = 25, bullet = 80, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_MINOR, + bullet = ARMOR_BALLISTIC_AP, + laser = ARMOR_LASER_SMALL, + bomb = ARMOR_BOMB_PADDED + ) siemens_coefficient = 0.35 /obj/item/clothing/head/helmet/merc @@ -126,7 +144,13 @@ item_state = "helmet" icon_state = "helmet" contained_sprite = TRUE - armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 40, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_RIFLE, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_RESISTANT, + bomb = ARMOR_BOMB_PADDED + ) siemens_coefficient = 0.35 /obj/item/clothing/head/helmet/swat @@ -134,7 +158,13 @@ desc = "They're often used by highly trained Swat Members." icon_state = "swat" item_state = "swat" - armor = list(melee = 80, bullet = 60, laser = 50,energy = 25, bomb = 50, bio = 10, rad = 0) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_RESISTANT, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_RESISTANT, + bomb = ARMOR_BOMB_PADDED + ) flags_inv = HIDEEARS|HIDEEYES|HIDEFACE cold_protection = HEAD min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE @@ -167,7 +197,13 @@ name = "\improper Thunderdome helmet" desc = "'Let the battle commence!'" icon_state = "thunderdome" - armor = list(melee = 80, bullet = 60, laser = 50,energy = 10, bomb = 25, bio = 10, rad = 0) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_RESISTANT, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_RESISTANT, + bomb = ARMOR_BOMB_PADDED + ) cold_protection = HEAD min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE siemens_coefficient = 1 @@ -188,8 +224,14 @@ sprite_sheets = list( BODYTYPE_TAJARA = 'icons/mob/species/tajaran/helmet.dmi', BODYTYPE_UNATHI = 'icons/mob/species/unathi/helmet.dmi' - ) - armor = list(melee = 62, bullet = 50, laser = 50,energy = 35, bomb = 10, bio = 2, rad = 0) + ) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_RIFLE, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_RESISTANT, + bomb = ARMOR_BOMB_PADDED + ) siemens_coefficient = 0.35 @@ -197,7 +239,13 @@ name = "augment array" desc = "A helmet with optical and cranial augments coupled to it." icon_state = "v62" - armor = list(melee = 80, bullet = 60, laser = 50,energy = 25, bomb = 50, bio = 10, rad = 0) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_RESISTANT, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_RESISTANT, + bomb = ARMOR_BOMB_PADDED + ) flags_inv = HIDEEARS|HIDEEYES body_parts_covered = HEAD|EYES cold_protection = HEAD @@ -208,7 +256,12 @@ name = "IAC helmet" desc = "This helmet is meant to protect the wearer from light debris, scrapes and bumps in a disaster situation, this lightweight helmet doesn't offer any significant protection from attacks or severe accidents. It's not recommended for use as armor and it's definitely not spaceworthy." icon_state = "iac_helmet" - armor = list(melee = 6, bullet = 10, laser = 10, energy = 3, bomb = 5, bio = 15, rad = 0) + armor = list( + melee = ARMOR_MELEE_MINOR, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_MINOR, + bio = ARMOR_BIO_MINOR + ) flags_inv = HIDEEARS /obj/item/clothing/head/helmet/unathi @@ -219,7 +272,13 @@ item_state = "unathi_helmet" contained_sprite = TRUE species_restricted = list(BODYTYPE_UNATHI) - armor = list(melee = 65, bullet = 30, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED + ) siemens_coefficient = 0.35 /obj/item/clothing/head/helmet/unathi/hegemony @@ -227,7 +286,14 @@ desc = "A highly armored helmet designated to be worn by an Unathi, a newer variant commonly worn by the Hegemony Levies." icon_state = "hegemony_helmet" item_state = "hegemony_helmet" - armor = list(melee = 70, bullet = 40, laser = 55, energy = 15, bomb = 25, bio = 0, rad = 40) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED, + rad = ARMOR_RAD_MINOR + ) /obj/item/clothing/head/helmet/unathi/klax name = "klaxan hopeful helmet" @@ -236,7 +302,14 @@ icon_state = "klax_hopeful_helmet" item_state = "klax_hopeful_helmet" species_restricted = list(BODYTYPE_VAURCA) - armor = list(melee = 70, bullet = 40, laser = 55, energy = 15, bomb = 25, bio = 0, rad = 40) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_RESISTANT, + bomb = ARMOR_BOMB_PADDED, + rad = ARMOR_RAD_RESISTANT + ) siemens_coefficient = 0.35 /obj/item/clothing/head/helmet/tank @@ -245,7 +318,9 @@ icon_state = "tank" flags_inv = BLOCKHEADHAIR color = "#5f5f5f" - armor = list(melee = 25, bullet = 5, laser = 5, energy = 10, bomb = 5, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_KNIVES + ) siemens_coefficient = 0.75 /obj/item/clothing/head/helmet/tank/olive @@ -265,8 +340,14 @@ item_state_slots = list( slot_l_hand_str = "syndicate-helm-green", slot_r_hand_str = "syndicate-helm-green" - ) - armor = list(melee = 62, bullet = 50, laser = 50,energy = 35, bomb = 10, bio = 2, rad = 0) + ) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_RIFLE, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_RESISTANT, + bomb = ARMOR_BIO_MINOR + ) siemens_coefficient = 0.35 //Commander @@ -298,13 +379,19 @@ icon_state = "legion_helmet" body_parts_covered = HEAD|FACE|EYES flags_inv = HIDEEARS|HIDEEYES|BLOCKHEADHAIR - armor = list(melee = 50, bullet = 30, laser = 30, energy = 15, bomb = 40, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED + ) siemens_coefficient = 0.35 sprite_sheets = list( "Tajara" = 'icons/mob/species/tajaran/helmet.dmi', "Unathi" = 'icons/mob/species/unathi/helmet.dmi', "Machine" = 'icons/mob/species/machine/helmet.dmi' - ) + ) action_button_name = "Toggle Helmet Light" light_overlay = "helmet_light_dual" @@ -319,7 +406,13 @@ icon_state = "legion_pilot_up" body_parts_covered = null flags_inv = BLOCKHEADHAIR - armor = list(melee = 40, bullet = 20, laser = 20, energy = 10, bomb = 40, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_KNIVES, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED + ) camera = /obj/machinery/camera/network/tcfl siemens_coefficient = 0.35 action_button_name = "Flip Pilot Visor" diff --git a/code/modules/clothing/head/jobs.dm b/code/modules/clothing/head/jobs.dm index 6f99a3faf7a..233c7244119 100644 --- a/code/modules/clothing/head/jobs.dm +++ b/code/modules/clothing/head/jobs.dm @@ -59,7 +59,11 @@ slot_r_hand_str = "det_hat" ) allowed = list(/obj/item/reagent_containers/food/snacks/candy_corn, /obj/item/pen) - armor = list(melee = 50, bullet = 5, laser = 25,energy = 10, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR + ) siemens_coefficient = 0.75 /obj/item/clothing/head/det/grey diff --git a/code/modules/clothing/head/misc.dm b/code/modules/clothing/head/misc.dm index 2d3f34741bd..24d79abca03 100644 --- a/code/modules/clothing/head/misc.dm +++ b/code/modules/clothing/head/misc.dm @@ -535,8 +535,9 @@ icon_state = "greyutility" item_state = "greyutility" contained_sprite = 1 - armor = list(melee = 10, bullet = 10, laser = 10,energy = 0, bomb = 0, bio = 0, rad = 0) - + armor = list( + melee = ARMOR_MELEE_MINOR + ) /obj/item/clothing/head/navy/marine name = "sol marine utility cover" desc = "An eight pointed cover issued to Sol Alliance marines as part of their field uniform." @@ -591,7 +592,13 @@ icon = 'icons/obj/sol_uniform.dmi' icon_state = "helmet_tac_sol" item_state = "helmet_tac_sol" - armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 40, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_RESISTANT, + laser = ARMOR_LASER_MAJOR, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED + ) contained_sprite = 1 /obj/item/clothing/head/nonla diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index 6fbd6708c25..efb4fb0b8ba 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -22,7 +22,9 @@ ) matter = list(DEFAULT_WALL_MATERIAL = 3000, MATERIAL_GLASS = 1000) var/up = 0 - armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_SMALL + ) flags_inv = (HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE) body_parts_covered = HEAD|FACE|EYES action_button_name = "Flip Welding Mask" diff --git a/code/modules/clothing/head/xenos/tajara.dm b/code/modules/clothing/head/xenos/tajara.dm index fcb5b15e830..b052d12cf45 100644 --- a/code/modules/clothing/head/xenos/tajara.dm +++ b/code/modules/clothing/head/xenos/tajara.dm @@ -93,7 +93,12 @@ body_parts_covered = HEAD|FACE|EYES flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|BLOCKHAIR species_restricted = list(BODYTYPE_TAJARA) - armor = list(melee = 60, bullet = 50, laser = 20, energy = 10, bomb = 5, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR + ) allow_hair_covering = FALSE desc_fluff = "The Feudal Era of Amohda is famous for the steel swords which became common. Many renowned swordsmen and famous warriors would travel the land fighting duels of \ single combat in their quests to become the greatest swordsman. Modern Amohda is a mix between loyalists to the NKA and to the DPRA, with almost universal praise for a return to \ @@ -108,4 +113,9 @@ icon_state = "kettle" item_state = "kettle" contained_sprite = TRUE - armor = list(melee = 50, bullet = 50, laser = 20, energy = 10, bomb = 5, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR + ) diff --git a/code/modules/clothing/masks/boxing.dm b/code/modules/clothing/masks/boxing.dm index e82325aaef0..5a0c47c9dba 100644 --- a/code/modules/clothing/masks/boxing.dm +++ b/code/modules/clothing/masks/boxing.dm @@ -55,7 +55,9 @@ icon_state = "balaclava_blue" item_state = "balaclava_blue" germ_level = 0 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 0) + armor = list( + bio = ARMOR_BIO_STRONG + ) /obj/item/clothing/mask/luchador name = "luchador mask" diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index 386dbc77b28..2d2a5591a16 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -12,7 +12,9 @@ siemens_coefficient = 0.9 var/gas_filter_strength = 1 //For gas mask filters var/list/filtered_gases = list(GAS_PHORON, GAS_N2O) - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 75, rad = 0) + armor = list( + bio = ARMOR_BIO_STRONG + ) /obj/item/clothing/mask/gas/filter_air(datum/gas_mixture/air) var/datum/gas_mixture/filtered = new @@ -45,7 +47,9 @@ desc = "A modernised version of the classic design, this mask will not only filter out phoron but it can also be connected to an air supply." icon_state = "plaguedoctor" item_state = "plaguedoctor" - armor = list(melee = 0, bullet = 0, laser = 2,energy = 2, bomb = 0, bio = 90, rad = 0) + armor = list( + bio = ARMOR_BIO_SHIELDED + ) body_parts_covered = HEAD|FACE|EYES /obj/item/clothing/mask/gas/swat @@ -112,4 +116,9 @@ icon_state = "fullgas" item_state = "fullgas" w_class = ITEMSIZE_SMALL - armor = list(melee = 25, bullet = 10, laser = 25, energy = 25, bomb = 0, bio = 50, rad = 15) + armor = list( + melee = ARMOR_MELEE_SMALL, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_MINOR, + bio = ARMOR_BIO_STRONG + ) \ No newline at end of file diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index 62d38b6ca95..1f67af9e232 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -37,7 +37,9 @@ item_flags = FLEXIBLEMATERIAL gas_transfer_coefficient = 0.90 permeability_coefficient = 0.01 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 0) + armor = list( + bio = ARMOR_BIO_RESISTANT + ) down_gas_transfer_coefficient = 1 down_body_parts_covered = null adjustable = TRUE @@ -57,7 +59,9 @@ item_flags = FLEXIBLEMATERIAL gas_transfer_coefficient = 0.90 permeability_coefficient = 0.01 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 15, rad = 0) + armor = list( + bio = ARMOR_BIO_MINOR + ) down_gas_transfer_coefficient = 1 down_body_parts_covered = null adjustable = TRUE @@ -72,7 +76,9 @@ item_flags = FLEXIBLEMATERIAL gas_transfer_coefficient = 0.90 permeability_coefficient = 0.01 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 15, rad = 10) + armor = list( + bio = ARMOR_BIO_MINOR + ) down_gas_transfer_coefficient = 1 down_body_parts_covered = null adjustable = TRUE diff --git a/code/modules/clothing/shoes/colour.dm b/code/modules/clothing/shoes/colour.dm index 8adfa9121db..a96ea6ec83b 100644 --- a/code/modules/clothing/shoes/colour.dm +++ b/code/modules/clothing/shoes/colour.dm @@ -99,7 +99,9 @@ desc = "A pair of green and white shoes intended for safety around patients." icon_state = "doctor" item_state = "green" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 80, rad = 0) + armor = list( + bio = ARMOR_BIO_RESISTANT + ) /obj/item/clothing/shoes/science name = "scientist shoes" @@ -115,7 +117,9 @@ icon_state = "chemist" item_state = "orange" permeability_coefficient = 0.01 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 90, rad = 0) + armor = list( + bio = ARMOR_BIO_RESISTANT + ) /obj/item/clothing/shoes/biochem name = "protective shoes" @@ -123,7 +127,9 @@ icon_state = "biochem" item_state = "red" permeability_coefficient = 0.01 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 90, rad = 0) + armor = list( + bio = ARMOR_BIO_RESISTANT + ) /obj/item/clothing/shoes/psych name = "psychologist shoes" @@ -131,7 +137,9 @@ icon_state = "psych" item_state = "blue" permeability_coefficient = 0.01 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 90, rad = 0) + armor = list( + bio = ARMOR_BIO_RESISTANT + ) /obj/item/clothing/shoes/surgeon name = "surgeon shoes" @@ -139,7 +147,9 @@ icon_state = "surgeon" item_state = "blue" permeability_coefficient = 0.01 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 90, rad = 0) + armor = list( + bio = ARMOR_BIO_RESISTANT + ) /obj/item/clothing/shoes/trauma name = "trauma physician shoes" @@ -147,7 +157,9 @@ icon_state = "trauma" item_state = "black" permeability_coefficient = 0.01 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 90, rad = 0) + armor = list( + bio = ARMOR_BIO_RESISTANT + ) /obj/item/clothing/shoes/flats desc = "A pair of black, low-heeled women's flats." diff --git a/code/modules/clothing/shoes/jobs.dm b/code/modules/clothing/shoes/jobs.dm index f9542fd32d5..109534e2c8d 100644 --- a/code/modules/clothing/shoes/jobs.dm +++ b/code/modules/clothing/shoes/jobs.dm @@ -16,7 +16,9 @@ icon_state = "jackboots" item_state = "jackboots" force = 3 - armor = list(melee = 20, bullet = 5, laser = 5, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_KNIVES + ) siemens_coefficient = 0.75 can_hold_knife = TRUE build_from_parts = TRUE @@ -59,7 +61,12 @@ icon_state = "workboots" item_state = "workboots" force = 3 - armor = list(melee = 40, bullet = 0, laser = 0, energy = 15, bomb = 20, bio = 0, rad = 20) + armor = list( + melee = ARMOR_MELEE_KNIVES, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_MINOR, + rad = ARMOR_RAD_MINOR + ) siemens_coefficient = 0.75 can_hold_knife = TRUE build_from_parts = TRUE diff --git a/code/modules/clothing/shoes/leg_guard.dm b/code/modules/clothing/shoes/leg_guard.dm index d0851ff04b7..bb8fc28515f 100644 --- a/code/modules/clothing/shoes/leg_guard.dm +++ b/code/modules/clothing/shoes/leg_guard.dm @@ -5,7 +5,13 @@ item_state = "jackboots" body_parts_covered = LEGS|FEET w_class = ITEMSIZE_NORMAL - armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_KNIVES, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED + ) siemens_coefficient = 0.35 force = 3 drop_sound = 'sound/items/drop/boots.ogg' @@ -24,18 +30,36 @@ desc = "These will protect your legs and feet from energy weapons." icon_state = "leg_guards_laser" siemens_coefficient = 0 - armor = list(melee = 25, bullet = 25, laser = 80, energy = 40, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_KNIVES, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_RIFLES, + energy = ARMOR_ENERGY_RESISTANT, + bomb = ARMOR_BOMB_PADDED + ) /obj/item/clothing/shoes/leg_guard/bulletproof name = "ballistic leg guards" desc = "These will protect your legs and feet from ballistic weapons." icon_state = "leg_guards_bullet" - armor = list(melee = 25, bullet = 80, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_KNIVES, + bullet = ARMOR_BALLISTIC_RIFLE, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED + ) /obj/item/clothing/shoes/leg_guard/riot name = "riot leg guards" desc = "These will protect your legs and feet from close combat weapons." - armor = list(melee = 80, bullet = 20, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED + ) /obj/item/clothing/shoes/leg_guard/merc name = "heavy leg guards" @@ -44,5 +68,11 @@ item_state = "legguards" icon_state = "legguards" contained_sprite = TRUE - armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 40, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_RESISTANT, + bomb = ARMOR_BOMB_PADDED + ) species_restricted = null diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index 1dcd5b52414..9c9d287242f 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -23,7 +23,14 @@ icon_state = "swat" item_state = "swat" force = 5 - armor = list(melee = 80, bullet = 60, laser = 50,energy = 25, bomb = 50, bio = 10, rad = 0) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_RIFLE, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_RESISTANT, + bio = ARMOR_BIO_MINOR + ) item_flags = NOSLIP siemens_coefficient = 0.5 can_hold_knife = TRUE @@ -38,7 +45,14 @@ icon_state = "jungle" item_state = "jungle" force = 5 - armor = list(melee = 80, bullet = 60, laser = 50,energy = 25, bomb = 50, bio = 10, rad = 0) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_RIFLE, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_RESISTANT, + bio = ARMOR_BIO_MINOR + ) item_flags = NOSLIP siemens_coefficient = 0.35 can_hold_knife = TRUE @@ -208,7 +222,10 @@ obj/item/clothing/shoes/sandal/clogs min_cold_protection_temperature = SHOE_MIN_COLD_PROTECTION_TEMPERATURE heat_protection = FEET|LEGS max_heat_protection_temperature = SHOE_MAX_HEAT_PROTECTION_TEMPERATURE - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list( + melee = ARMOR_MELEE_MINOR, + bio = ARMOR_BIO_MINOR + ) siemens_coefficient = 0.75 can_hold_knife = TRUE build_from_parts = TRUE @@ -227,7 +244,9 @@ obj/item/clothing/shoes/sandal/clogs icon_state = "caligae" item_state = "caligae" force = 5 - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_MINOR + ) body_parts_covered = FEET|LEGS species_restricted = null sprite_sheets = list( @@ -254,7 +273,9 @@ obj/item/clothing/shoes/sandal/clogs desc = "The standard Unathi marching footwear. These are made for heavier conditions, featuring tough and waterproof eel-leather covering, offering far greater protection." desc_fluff = "These traditional Unathi footwear have remained relatively unchanged in principle, with improved materials and construction being the only notable change. This pair is reinforced with leather of the Zazehal, a Moghesian species of eel that can grow up to twenty five feet long. Typically, Zazehal Festivals are thrown every month of the warm season in which Unathi strew freshly killed birds across the shoreline and collect these creatures with baskets. The fungi that grow on their skin is harvested and used as an exotic seasoning, and their skin is used for its' incredibly durable, shark-like leather." icon_state = "eelcaligae" - armor = list(melee = 40, bullet = 0, laser = 0, energy = 15, bomb = 20, bio = 0, rad = 20) + armor = list( + melee = ARMOR_MELEE_KNIVES + ) siemens_coefficient = 0.75 /obj/item/clothing/shoes/carp @@ -274,4 +295,6 @@ obj/item/clothing/shoes/sandal/clogs icon_state = "surgeon" item_state = "blue" permeability_coefficient = 0.01 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 90, rad = 0) + armor = list( + bio = ARMOR_BIO_RESISTANT + ) diff --git a/code/modules/clothing/shoes/vaurca.dm b/code/modules/clothing/shoes/vaurca.dm index 97447d9d514..4934628d5d6 100644 --- a/code/modules/clothing/shoes/vaurca.dm +++ b/code/modules/clothing/shoes/vaurca.dm @@ -4,7 +4,9 @@ icon = 'icons/obj/vaurca_items.dmi' icon_state = "vaurca_shoes" item_state = "vaurca_shoes" - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_MINOR + ) body_parts_covered = FEET species_restricted = list(BODYTYPE_VAURCA) contained_sprite = TRUE diff --git a/code/modules/clothing/spacesuits/miscellaneous.dm b/code/modules/clothing/spacesuits/miscellaneous.dm index acc6958a4b8..400acf3a15a 100644 --- a/code/modules/clothing/spacesuits/miscellaneous.dm +++ b/code/modules/clothing/spacesuits/miscellaneous.dm @@ -8,7 +8,15 @@ slot_l_hand_str = "syndicate-helm-black-red", slot_r_hand_str = "syndicate-helm-black-red" ) - armor = list(melee = 65, bullet = 55, laser = 35,energy = 20, bomb = 30, bio = 100, rad = 60) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_RESISTANT, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL flags_inv = BLOCKHAIR siemens_coefficient = 0.6 @@ -21,7 +29,11 @@ icon_state = "beret_sec" item_state = "beret_sec" contained_sprite = TRUE - armor = list(melee = 65, bullet = 55, laser = 35,energy = 20, bomb = 30, bio = 30, rad = 30) + armor = list( + melee = ARMOR_MELEE_KNIVES, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_MINOR + ) item_flags = STOPPRESSUREDAMAGE flags_inv = BLOCKHAIR siemens_coefficient = 0.9 @@ -51,7 +63,15 @@ desc = "Yarr." icon_state = "pirate" item_state = "pirate" - armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SMALL, + rad = ARMOR_RAD_MINOR + ) item_flags = STOPPRESSUREDAMAGE flags_inv = BLOCKHAIR body_parts_covered = 0 @@ -65,7 +85,15 @@ w_class = ITEMSIZE_NORMAL allowed = list(/obj/item/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/handcuffs,/obj/item/tank/emergency_oxygen) slowdown = 0 - armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SMALL, + rad = ARMOR_RAD_MINOR + ) siemens_coefficient = 0.4 body_parts_covered = UPPER_TORSO|ARMS diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index a8a528911bb..7c74120d050 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -7,7 +7,6 @@ */ /obj/item/rig - name = "hardsuit control module" icon = 'icons/obj/rig_modules.dmi' desc = "A back-mounted hardsuit deployment and control mechanism." @@ -17,7 +16,15 @@ w_class = ITEMSIZE_LARGE // These values are passed on to all component pieces. - armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 20) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_MINOR + ) min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE siemens_coefficient = 0.35 diff --git a/code/modules/clothing/spacesuits/rig/suits/alien.dm b/code/modules/clothing/spacesuits/rig/suits/alien.dm index d33cae10a1d..af3d3f4fab6 100644 --- a/code/modules/clothing/spacesuits/rig/suits/alien.dm +++ b/code/modules/clothing/spacesuits/rig/suits/alien.dm @@ -3,7 +3,15 @@ desc = "A cheap NT knock-off of an Unathi battle-hardsuit. Looks like a fish, moves like a fish, steers like a cow." suit_type = "NT breacher" icon_state = "breacher_rig_cheap" - armor = list(melee = 60, bullet = 60, laser = 60, energy = 60, bomb = 70, bio = 100, rad = 50) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_RIFLE, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_RESISTANT, + bomb = ARMOR_BOMB_RESISTANT, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_MINOR + ) siemens_coefficient = 0.1 emp_protection = -20 slowdown = 6 @@ -22,7 +30,15 @@ desc = "An authentic Unathi breacher chassis. Huge, bulky and absurdly heavy. It must be like wearing a tank." suit_type = "breacher chassis" icon_state = "breacher_rig" - armor = list(melee = 90, bullet = 90, laser = 90, energy = 90, bomb = 90, bio = 100, rad = 80) //Takes TEN TIMES as much damage to stop someone in a breacher. In exchange, it's slow. + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_AP, + laser = ARMOR_LASER_MAJOR, + energy = ARMOR_ENERGY_STRONG, + bomb = ARMOR_BOMB_RESISTANT, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SMALL + ) siemens_coefficient = 0.1 vision_restriction = 0 slowdown = 4 @@ -46,7 +62,15 @@ desc = "An ancient piece of equipment from a bygone age, This highly advanced Vaurcan technology rarely sees use outside of a battlefield." suit_type = "combat exoskeleton" icon_state = "vaurca_rig" - armor = list(melee = 65, bullet = 65, laser = 100, energy = 100, bomb = 90, bio = 100, rad = 80) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_HEAVY, + energy = ARMOR_ENERGY_SHIELDED, + bomb = ARMOR_BOMB_SHIELDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) siemens_coefficient = 0.1 vision_restriction = 0 slowdown = 2 @@ -88,7 +112,15 @@ special unit designated to withstand the numerical disadvantages and prolonged engagements special forces of the Republic often faces." suit_type = "tesla suit" icon_state = "tesla_rig" - armor = list(melee = 70, bullet = 50, laser = 35, energy = 15, bomb = 55, bio = 100, rad = 60) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_RESISTANT, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) siemens_coefficient = 0.1 vision_restriction = 0 slowdown = 2 diff --git a/code/modules/clothing/spacesuits/rig/suits/combat.dm b/code/modules/clothing/spacesuits/rig/suits/combat.dm index 5f47a4ab528..84e3bb893dd 100644 --- a/code/modules/clothing/spacesuits/rig/suits/combat.dm +++ b/code/modules/clothing/spacesuits/rig/suits/combat.dm @@ -3,7 +3,15 @@ desc = "A sleek and dangerous hardsuit for active combat." icon_state = "combat_rig" suit_type = "combat hardsuit" - armor = list(melee = 70, bullet = 55, laser = 45, energy = 15, bomb = 75, bio = 100, rad = 60) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) siemens_coefficient = 0.1 offline_slowdown = 3 offline_vision_restriction = TINT_HEAVY @@ -35,7 +43,15 @@ desc = "A powerful hardsuit designed for military operations." icon_state = "military_rig" suit_type = "military hardsuit" - armor = list(melee = 80, bullet = 75, laser = 60, energy = 15, bomb = 80, bio = 100, rad = 30) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_RESISTANT, + laser = ARMOR_LASER_MAJOR, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_SHIELDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) siemens_coefficient = 0.1 offline_slowdown = 3 offline_vision_restriction = TINT_HEAVY @@ -87,7 +103,15 @@ desc = "An old repurposed construction exoskeleton redesigned for combat. Its colors and insignias match those of the Tau Ceti Foreign Legion." icon_state = "legion_rig" suit_type = "retrofitted military hardsuit" - armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 40, bio = 100, rad = 30) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_RESISTANT, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) siemens_coefficient = 0.35 slowdown = 2 offline_slowdown = 4 @@ -131,7 +155,15 @@ desc = "A favorite of Coalition rangers, the Gunslinger suit is a sturdy hardsuit meant to provide the user absolute situational awareness." icon_state = "gunslinger" suit_type = "gunslinger hardsuit" - armor = list(melee = 50, bullet = 60, laser = 40, energy = 30, bomb = 30, bio = 100, rad = 60) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_RESISTANT, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) siemens_coefficient = 0.1 offline_slowdown = 2 offline_vision_restriction = TINT_HEAVY @@ -171,7 +203,15 @@ desc = "An expensive hardsuit utilized by Eridani security contractors to field heavy weapons and coordinate non-lethal takedowns directly. Usually seen spearheading police raids." icon_state = "strikesuit" suit_type = "strike hardsuit" - armor = list(melee = 80, bullet = 45, laser = 45, energy = 25, bomb = 25, bio = 100, rad = 100) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SHIELDED + ) siemens_coefficient = 0.1 offline_slowdown = 2 offline_vision_restriction = TINT_HEAVY @@ -213,7 +253,15 @@ desc = "An advanced Elyran hardsuit specialized in scorched earth tactics." icon_state = "elyran_rig" suit_type = "elyran battlesuit" - armor = list(melee = 60, bullet = 40, laser = 60, energy = 60, bomb = 25, bio = 100, rad = 100) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_MAJOR, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SHIELDED + ) siemens_coefficient = 0.1 offline_slowdown = 2 offline_vision_restriction = TINT_HEAVY @@ -255,7 +303,15 @@ desc = "A powerful niche-function hardsuit utilized by Ceres' Lance to apprehend synthetics. Unstoppable in the right circumstances, and nothing more than a burden anywhere else." icon_state = "bunker" suit_type = "bunker suit" - armor = list(melee = 80, bullet = 80, laser = 80, energy = 80, bomb = 25, bio = 25, rad = 25) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_RIFLE, + laser = ARMOR_LASER_RIFLES, + energy = ARMOR_ENERGY_SHIELDED, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SMALL + ) offline_vision_restriction = TINT_HEAVY emp_protection = -30 slowdown = 8 @@ -284,7 +340,15 @@ desc = "An off-shoot of the core Bunker Suit design, utilized by the Imperial Dominian military and painted accordingly. This is a powerful suit specializing in melee confrontations." icon_state = "jinxiang" suit_type = "jinxiang combat suit" - armor = list(melee = 80, bullet = 40, laser = 30, energy = 20, bomb = 15, bio = 100, rad = 25) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_MINOR, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SMALL + ) offline_vision_restriction = TINT_HEAVY offline_slowdown = 10 diff --git a/code/modules/clothing/spacesuits/rig/suits/ert.dm b/code/modules/clothing/spacesuits/rig/suits/ert.dm index 337c0731cb4..9ec99723b72 100644 --- a/code/modules/clothing/spacesuits/rig/suits/ert.dm +++ b/code/modules/clothing/spacesuits/rig/suits/ert.dm @@ -10,7 +10,15 @@ emp_protection = 35 helm_type = /obj/item/clothing/head/helmet/space/rig/ert req_access = list(access_cent_specops) - armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 100, rad = 100) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SHIELDED + ) siemens_coefficient = 0.1 allowed = list( /obj/item/device/flashlight, /obj/item/tank, /obj/item/device/t_scanner, /obj/item/rfd/construction, /obj/item/crowbar, \ @@ -33,7 +41,15 @@ suit_type = "ERT engineer" icon_state = "ert_engineer_rig" emp_protection = 30 - armor = list(melee = 55, bullet = 45, laser = 30, energy = 15, bomb = 30, bio = 100, rad = 100) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SHIELDED + ) glove_type = /obj/item/clothing/gloves/rig/eva initial_modules = list( /obj/item/rig_module/ai_container, @@ -51,7 +67,15 @@ suit_type = "ERT medic" icon_state = "ert_medical_rig" emp_protection = 30 - armor = list(melee = 55, bullet = 45, laser = 30, energy = 15, bomb = 30, bio = 100, rad = 100) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SHIELDED + ) initial_modules = list( /obj/item/rig_module/ai_container, /obj/item/rig_module/vision/medhud, @@ -69,7 +93,15 @@ suit_type = "ERT security" icon_state = "ert_security_rig" emp_protection = 30 - armor = list(melee = 65, bullet = 55, laser = 40, energy = 15, bomb = 30, bio = 100, rad = 80) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SHIELDED + ) initial_modules = list( /obj/item/rig_module/ai_container, /obj/item/rig_module/vision/sechud, @@ -93,7 +125,15 @@ /obj/item/rig_module/device/decompiler, /obj/item/rig_module/actuators ) - armor = list(melee = 55, bullet = 45, laser = 30, energy = 15, bomb = 30, bio = 100, rad = 100) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SHIELDED + ) allowed_module_types = MODULE_GENERAL | MODULE_LIGHT_COMBAT | MODULE_HEAVY_COMBAT | MODULE_SPECIAL /obj/item/rig/ert/assetprotection @@ -101,7 +141,15 @@ desc = "A heavy suit worn by the highest level of Asset Protection, don't mess with the person wearing this. Armored and space ready." suit_type = "heavy asset protection" icon_state = "asset_protection_rig" - armor = list(melee = 80, bullet = 75, laser = 60, energy = 40, bomb = 80, bio = 100, rad =100) + armor = list( + melee = ARMOR_MELEE_SHIELDED, + bullet = ARMOR_BALLISTIC_RIFLE, + laser = ARMOR_LASER_RIFLES, + energy = ARMOR_ENERGY_STRONG, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SHIELDED + ) slowdown = 0 emp_protection = 50 diff --git a/code/modules/clothing/spacesuits/rig/suits/light.dm b/code/modules/clothing/spacesuits/rig/suits/light.dm index 1768c36b201..e7eab9c10e0 100644 --- a/code/modules/clothing/spacesuits/rig/suits/light.dm +++ b/code/modules/clothing/spacesuits/rig/suits/light.dm @@ -5,7 +5,13 @@ icon_state = "ninja_rig" suit_type = "light suit" allowed = list(/obj/item/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/handcuffs,/obj/item/tank,/obj/item/device/suit_cooling_unit,/obj/item/cell,/obj/item/material/twohanded/fireaxe) - armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_MAJOR, + energy = ARMOR_MELEE_MINOR, + bomb = ARMOR_BOMB_PADDED + ) emp_protection = 10 slowdown = 0 item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL @@ -92,7 +98,15 @@ suit_type = "stealth suit" desc = "A unique, vacuum-proof suit of nano-enhanced armor designed specifically for stealth operations." icon_state = "ninja_rig" - armor = list(melee = 50, bullet = 45, laser = 45, energy = 30, bomb = 35, bio = 100, rad = 100) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SHIELDED + ) emp_protection = 40 slowdown = 0 @@ -158,7 +172,15 @@ suit_type = "stealth" desc = "A highly advanced and expensive suit designed for covert operations." icon_state = "stealth_rig" - armor = list(melee = 45, bullet = 20, laser = 50, energy = 10, bomb = 25, bio = 30, rad = 20) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_MAJOR, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SMALL, + rad = ARMOR_RAD_SMALL + ) req_access = list(access_syndicate) @@ -175,7 +197,10 @@ desc = "A compact exoskeleton that hugs the body tightly and has various inbuilt utilities for life support." icon_state = "offworlder_rig" allowed = list(/obj/item/tank, /obj/item/device/flashlight) - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 5, rad = 5) + armor = list( + bio = ARMOR_BIO_MINOR, + rad = ARMOR_RAD_MINOR + ) airtight = 0 seal_delay = 5 helm_type = /obj/item/clothing/head/lightrig/offworlder @@ -207,7 +232,15 @@ desc = "A sleek hardsuit used by the Coalition forces of the Techno-Conglomerate." icon_state = "techno_rig" suit_type = "techno-conglomerate mobility hardsuit" - armor = list(melee = 40, bullet = 20, laser = 30, energy = 15, bomb = 40, bio = 100, rad = 100) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SHIELDED + ) item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL slowdown = -1 offline_slowdown = 0 diff --git a/code/modules/clothing/spacesuits/rig/suits/merc.dm b/code/modules/clothing/spacesuits/rig/suits/merc.dm index 69143e2e348..7b13529667f 100644 --- a/code/modules/clothing/spacesuits/rig/suits/merc.dm +++ b/code/modules/clothing/spacesuits/rig/suits/merc.dm @@ -8,7 +8,15 @@ desc = "A blood-red hardsuit featuring some fairly illegal technology." icon_state = "merc_rig" suit_type = "crimson hardsuit" - armor = list(melee = 80, bullet = 65, laser = 50, energy = 15, bomb = 80, bio = 100, rad = 60) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_RIFLE, + laser = ARMOR_LASER_MAJOR, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_RESISTANT, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SMALL + ) siemens_coefficient = 0.1 offline_slowdown = 3 offline_vision_restriction = TINT_HEAVY @@ -64,7 +72,15 @@ desc = "A combat hardsuit utilized by many private military companies, packing some seriously heavy plating." icon_state = "rhino" suit_type = "rhino hardsuit" - armor = list(melee = 80, bullet = 75, laser = 30, energy = 15, bomb = 80, bio = 100, rad = 60) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_RIFLE, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_RESISTANT, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SMALL + ) siemens_coefficient = 0.1 offline_slowdown = 3 offline_vision_restriction = TINT_HEAVY diff --git a/code/modules/clothing/spacesuits/rig/suits/station.dm b/code/modules/clothing/spacesuits/rig/suits/station.dm index 77e8968d771..2c3d1a9cd9a 100644 --- a/code/modules/clothing/spacesuits/rig/suits/station.dm +++ b/code/modules/clothing/spacesuits/rig/suits/station.dm @@ -65,7 +65,15 @@ suit_type = "industrial hardsuit" desc = "A heavy, powerful hardsuit used by construction crews and mining corporations." icon_state = "industrial_rig" - armor = list(melee = 60, bullet = 40, laser = 30, energy = 15, bomb = 30, bio = 100, rad = 50) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_MINOR, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) siemens_coefficient = 0.35 slowdown = 2 offline_slowdown = 7 @@ -104,7 +112,15 @@ suit_type = "EVA hardsuit" desc = "A light hardsuit for repairs and maintenance to the outside of habitats and vessels." icon_state = "eva_rig" - armor = list(melee = 30, bullet = 10, laser = 20, energy = 25, bomb = 20, bio = 100, rad = 100) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_MINOR, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SHIELDED + ) slowdown = 0 offline_slowdown = 3 offline_vision_restriction = TINT_HEAVY @@ -140,12 +156,19 @@ camera = /obj/machinery/camera/network/mercenary /obj/item/rig/ce - name = "advanced voidsuit control module" suit_type = "advanced voidsuit" desc = "An advanced voidsuit that protects against hazardous, low pressure environments. Shines with a high polish." icon_state = "ce_rig" - armor = list(melee = 40, bullet = 10, laser = 30,energy = 25, bomb = 40, bio = 100, rad = 100) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SHIELDED + ) slowdown = 0 offline_slowdown = 3 offline_vision_restriction = 0 @@ -177,12 +200,19 @@ siemens_coefficient = 0 /obj/item/rig/hazmat - name = "AMI control module" suit_type = "hazmat hardsuit" desc = "An Anomalous Material Interaction hardsuit that protects against the strangest energies the universe can throw at it." icon_state = "hazmat_rig" - armor = list(melee = 45, bullet = 5, laser = 40, energy = 65, bomb = 60, bio = 100, rad = 100) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_STRONG, + bomb = ARMOR_BOMB_RESISTANT, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SHIELDED + ) siemens_coefficient = 0.50 offline_vision_restriction = TINT_HEAVY emp_protection = 40 @@ -211,7 +241,15 @@ suit_type = "rescue hardsuit" desc = "A durable suit designed for medical rescue in high risk areas." icon_state = "medical_rig" - armor = list(melee = 30, bullet = 15, laser = 20, energy = 60, bomb = 30, bio = 100, rad = 100) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_RESISTANT, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SHIELDED + ) siemens_coefficient = 0.50 slowdown = 0 offline_slowdown = 2 @@ -243,7 +281,15 @@ suit_type = "hazard hardsuit" desc = "A security hardsuit designed for prolonged EVA in dangerous environments." icon_state = "hazard_rig" - armor = list(melee = 60, bullet = 45, laser = 30, energy = 15, bomb = 60, bio = 100, rad = 45) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_RESISTANT, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) offline_slowdown = 3 offline_vision_restriction = TINT_HEAVY @@ -279,7 +325,15 @@ suit_type = "diving suit" desc = "A heavy hardsuit designated for operations under the water, you are not sure what it is doing here however." icon_state = "diving_rig" - armor = list(melee = 30, bullet = 10, laser = 20, energy = 25, bomb = 20, bio = 100, rad = 100) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_RESISTANT, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SHIELDED + ) slowdown = 3 offline_slowdown = 4 offline_vision_restriction = TINT_HEAVY diff --git a/code/modules/clothing/spacesuits/rig/suits/terminator.dm b/code/modules/clothing/spacesuits/rig/suits/terminator.dm index d847a325afc..f50c7c2c1ce 100644 --- a/code/modules/clothing/spacesuits/rig/suits/terminator.dm +++ b/code/modules/clothing/spacesuits/rig/suits/terminator.dm @@ -3,8 +3,16 @@ desc = "A robust synth exoskeleton outfitted with state of the art infiltration tools. Creepy." icon_state = "terminator_rig" suit_type = "synthetic exoskeleton" - armor = list(melee = 80, bullet = 75, laser = 60, energy = 15, bomb = 80, bio = 100, rad = 30) - siemens_coefficient = 0.0 // Ok this is the only exception. Got it? Good. + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_RIFLE, + laser = ARMOR_LASER_RIFLES, + energy = ARMOR_MELEE_MINOR, + bomb = ARMOR_BOMB_SHIELDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) + siemens_coefficient = 0 // Ok this is the only exception. Got it? Good. offline_slowdown = 3 offline_vision_restriction = TINT_HEAVY has_sealed_state = TRUE diff --git a/code/modules/clothing/spacesuits/spacesuits.dm b/code/modules/clothing/spacesuits/spacesuits.dm index a82e8c9b532..e16b519bc6e 100644 --- a/code/modules/clothing/spacesuits/spacesuits.dm +++ b/code/modules/clothing/spacesuits/spacesuits.dm @@ -12,7 +12,10 @@ slot_r_hand_str = "s_helmet" ) permeability_coefficient = 0.01 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50) + armor = list( + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SMALL + ) flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|BLOCKHAIR body_parts_covered = HEAD|FACE|EYES cold_protection = HEAD @@ -41,8 +44,11 @@ body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS allowed = list(/obj/item/device/flashlight,/obj/item/tank/emergency_oxygen,/obj/item/device/suit_cooling_unit) slowdown = 3 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50) - flags_inv = HIDEWRISTS|HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL + armor = list( + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SMALL + ) + flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE siemens_coefficient = 0.5 diff --git a/code/modules/clothing/spacesuits/syndi.dm b/code/modules/clothing/spacesuits/syndi.dm index f5b4c15f7e0..0954ce7a668 100644 --- a/code/modules/clothing/spacesuits/syndi.dm +++ b/code/modules/clothing/spacesuits/syndi.dm @@ -4,7 +4,15 @@ icon_state = "syndicate" item_state = "syndicate" desc = "A crimson helmet sporting clean lines and durable plating. Engineered to look menacing." - armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_RESISTANT, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SMALL, + rad = ARMOR_RAD_MINOR + ) siemens_coefficient = 0.5 brightness_on = 6 @@ -16,7 +24,15 @@ w_class = ITEMSIZE_NORMAL allowed = list(/obj/item/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/melee/energy/sword,/obj/item/handcuffs,/obj/item/tank/emergency_oxygen) slowdown = 1 - armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_RESISTANT, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SMALL, + rad = ARMOR_RAD_MINOR + ) siemens_coefficient = 0.5 diff --git a/code/modules/clothing/spacesuits/void/alien.dm b/code/modules/clothing/spacesuits/void/alien.dm index 3e3aea0f8a3..cbf1b0fe402 100644 --- a/code/modules/clothing/spacesuits/void/alien.dm +++ b/code/modules/clothing/spacesuits/void/alien.dm @@ -1,7 +1,15 @@ /obj/item/clothing/head/helmet/space/void/skrell name = "skrellian helmet" desc = "Smoothly contoured and polished to a shine. Still looks like a fishbowl." - armor = list(melee = 20, bullet = 10, laser = 20,energy = 50, bomb = 50, bio = 100, rad = 100) + armor = list( + melee = ARMOR_MELEE_KNIVES, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_MINOR, + energy = ARMOR_ENERGY_RESISTANT, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SHIELDED + ) max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE species_restricted = list(BODYTYPE_SKRELL,BODYTYPE_HUMAN) siemens_coefficient = 0.5 @@ -16,7 +24,15 @@ /obj/item/clothing/suit/space/void/skrell name = "skrellian voidsuit" desc = "Seems like a wetsuit with reinforced plating seamlessly attached to it. Very chic." - armor = list(melee = 20, bullet = 10, laser = 20,energy = 50, bomb = 50, bio = 100, rad = 100) + armor = list( + melee = ARMOR_MELEE_KNIVES, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_MINOR, + energy = ARMOR_ENERGY_RESISTANT, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SHIELDED + ) allowed = list(/obj/item/device/flashlight,/obj/item/tank,/obj/item/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/pickaxe, /obj/item/rfd/construction) heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE @@ -38,7 +54,15 @@ desc = "A tajaran helmet used by the crew of the Republican Orbital Fleet." icon_state = "cosmo_suit" item_state = "cosmo_suit" - armor = list(melee = 50, bullet = 50, laser = 30, energy = 15, bomb = 40, bio = 100, rad = 60) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) species_restricted = list(BODYTYPE_TAJARA) refittable = FALSE desc_fluff = "The People's Republic of Adhomai enjoys having the only militarized spaceships of all the factions on Adhomai. Initially they relied on contracting outside \ @@ -51,7 +75,15 @@ desc = "A tajaran voidsuit used by the crew of the Republican Orbital Fleet." icon_state = "cosmo_suit" item_state = "cosmo_suit" - armor = list(melee = 50, bullet = 50, laser = 30, energy = 15, bomb = 40, bio = 100, rad = 60) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) allowed = list(/obj/item/tank,/obj/item/device/flashlight,/obj/item/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/melee/energy/sword,/obj/item/handcuffs) species_restricted = list(BODYTYPE_TAJARA) refittable = FALSE diff --git a/code/modules/clothing/spacesuits/void/captain.dm b/code/modules/clothing/spacesuits/void/captain.dm index 75663d952c0..d255f748201 100644 --- a/code/modules/clothing/spacesuits/void/captain.dm +++ b/code/modules/clothing/spacesuits/void/captain.dm @@ -4,7 +4,15 @@ icon_state = "capspace" item_state = "capspace" desc = "A special helmet designed for work in a hazardous, low-pressure environment. Only for the most fashionable of military figureheads." - armor = list(melee = 65, bullet = 50, laser = 50,energy = 25, bomb = 50, bio = 100, rad = 50) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_RESISTANT, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) siemens_coefficient = 0.35 /obj/item/clothing/suit/space/void/captain @@ -19,5 +27,13 @@ w_class = ITEMSIZE_LARGE allowed = list(/obj/item/tank, /obj/item/device/flashlight,/obj/item/gun/energy, /obj/item/gun/projectile, /obj/item/ammo_magazine, /obj/item/ammo_casing, /obj/item/melee/baton,/obj/item/handcuffs) slowdown = 1.5 - armor = list(melee = 65, bullet = 50, laser = 50, energy = 25, bomb = 50, bio = 100, rad = 50) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_RESISTANT, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) siemens_coefficient = 0.35 diff --git a/code/modules/clothing/spacesuits/void/merc.dm b/code/modules/clothing/spacesuits/void/merc.dm index 11d18b019e5..7b72b4313ab 100644 --- a/code/modules/clothing/spacesuits/void/merc.dm +++ b/code/modules/clothing/spacesuits/void/merc.dm @@ -8,7 +8,15 @@ slot_l_hand_str = "syndie_helm", slot_r_hand_str = "syndie_helm" ) - armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 60) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_RESISTANT, + laser = ARMOR_LASER_MAJOR, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SMALL + ) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_HUMAN, BODYTYPE_IPC_INDUSTRIAL, BODYTYPE_IPC_ZENGHU, BODYTYPE_IPC_BISHOP) light_overlay = "merc_voidsuit_lights" @@ -27,7 +35,15 @@ ) slowdown = 1 w_class = ITEMSIZE_NORMAL - armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 60) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_RESISTANT, + laser = ARMOR_LASER_MAJOR, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SMALL + ) allowed = list(/obj/item/device/flashlight,/obj/item/tank,/obj/item/device/suit_cooling_unit,/obj/item/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/melee/energy/sword,/obj/item/handcuffs) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_HUMAN, BODYTYPE_SKRELL, BODYTYPE_IPC_INDUSTRIAL, BODYTYPE_IPC_ZENGHU, BODYTYPE_IPC_BISHOP) diff --git a/code/modules/clothing/spacesuits/void/misc.dm b/code/modules/clothing/spacesuits/void/misc.dm index a7ef06e8224..8f2cb1925f3 100644 --- a/code/modules/clothing/spacesuits/void/misc.dm +++ b/code/modules/clothing/spacesuits/void/misc.dm @@ -3,7 +3,15 @@ desc = "A sleek black space helmet designed for combat. Looks to be uniform with Sol Alliance colors." icon_state = "sol_helmet" item_state = "sol_helmet" - armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 60) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_HUMAN) @@ -16,7 +24,15 @@ icon_state = "sol_suit" item_state = "sol_suit" slowdown = 1 - armor = list(melee = 70, bullet = 55, laser = 45, energy = 15, bomb = 40, bio = 100, rad = 60) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) allowed = list(/obj/item/device/flashlight,/obj/item/tank,/obj/item/device/suit_cooling_unit,/obj/item/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/melee/energy/sword,/obj/item/handcuffs) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_HUMAN) @@ -27,7 +43,15 @@ desc = "A helmet resembling an avian, built for the Human head. Heavy and plated with plasteel across its faces." icon_state = "vulture" item_state = "vulture" - armor = list(melee = 80, bullet = 70, laser = 20, energy = 5, bomb = 5, bio = 100, rad = 30) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_HUMAN) @@ -40,7 +64,15 @@ icon_state = "vulture" item_state = "vulture" slowdown = 3 - armor = list(melee = 80, bullet = 70, laser = 20, energy = 5, bomb = 5, bio = 100, rad = 30) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) allowed = list(/obj/item/device/flashlight,/obj/item/tank,/obj/item/device/suit_cooling_unit,/obj/item/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/melee/energy/sword,/obj/item/handcuffs) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_HUMAN) @@ -52,7 +84,15 @@ desc = "A silvery chrome, single visor space helmet with built-in peripherals and very bright fore lighting. A favorite of bounty hunters." icon_state = "eridani_suit" item_state = "eridani_suit" - armor = list(melee = 50, bullet = 50, laser = 40, energy = 50, bomb = 50, bio = 100, rad = 30) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_RESISTANT, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_HUMAN) w_class = ITEMSIZE_NORMAL @@ -64,7 +104,15 @@ desc = "A silvery chrome voidsuit with neon highlights. Utilized by Eridani private military and police." icon_state = "eridani_suit" item_state = "eridani_suit" - armor = list(melee = 50, bullet = 50, laser = 40, energy = 40, bomb = 50, bio = 100, rad = 30) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BOMB_RESISTANT, + rad = ARMOR_RAD_RESISTANT + ) allowed = list(/obj/item/tank,/obj/item/device/flashlight,/obj/item/device/suit_cooling_unit,/obj/item/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/melee/energy/sword,/obj/item/handcuffs) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_HUMAN) @@ -75,7 +123,15 @@ desc = "A slot-eyed space helmet, sleek and designed for military purposes. Colored in Elyran military camouflage." icon_state = "valkyrie" item_state = "valkyrie" - armor = list(melee = 60, bullet = 30, laser = 50, energy = 40, bomb = 60, bio = 100, rad = 100) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_SHIELDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SHIELDED + ) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_HUMAN) max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE + 10000 @@ -87,7 +143,15 @@ desc = "A pricey specialist voidsuit designed for atmospheric long jumping and combat. Colored in Elyran military camouflage." icon_state = "valkyrie" item_state = "valkyrie" - armor = list(melee = 60, bullet = 30, laser = 50, energy = 40, bomb = 60, bio = 100, rad = 100) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_SHIELDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SHIELDED + ) allowed = list(/obj/item/tank,/obj/item/device/flashlight,/obj/item/device/suit_cooling_unit,/obj/item/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/melee/energy/sword,/obj/item/handcuffs) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_HUMAN) @@ -99,7 +163,15 @@ desc = "A sleek helmet with a bright yellow visor, expertly made in and colored in the iconic branding of Ceres' Lance." icon_state = "lancer_suit" item_state = "lancer_suit" - armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 60) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_RESISTANT, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_HUMAN) refittable = FALSE @@ -111,7 +183,15 @@ item_state = "lancer_suit" slowdown = 1 w_class = ITEMSIZE_NORMAL - armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 60) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_RESISTANT, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) allowed = list(/obj/item/device/flashlight,/obj/item/tank,/obj/item/device/suit_cooling_unit,/obj/item/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/melee/energy/sword,/obj/item/handcuffs) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_HUMAN) @@ -126,7 +206,15 @@ item_state = "bansheehelm" contained_sprite = 1 - armor = list(melee = 35, bullet = 35, laser = 75,energy = 55, bomb = 25, bio = 100, rad = 10) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_RIFLES, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_MINOR + ) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_HUMAN, BODYTYPE_IPC_INDUSTRIAL, BODYTYPE_IPC_ZENGHU, BODYTYPE_IPC_BISHOP) light_overlay = "helmet_light_banshee" @@ -144,7 +232,15 @@ contained_sprite = 1 slowdown = 1 - armor = list(melee = 35, bullet = 35, laser = 75,energy = 55, bomb = 25, bio = 100, rad = 10) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_RIFLES, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_MINOR + ) allowed = list(/obj/item/device/flashlight,/obj/item/tank,/obj/item/device/suit_cooling_unit,/obj/item/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/melee/energy/sword,/obj/item/handcuffs) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_HUMAN, BODYTYPE_IPC_INDUSTRIAL, BODYTYPE_IPC_ZENGHU, BODYTYPE_IPC_BISHOP) @@ -160,7 +256,15 @@ item_state = "dragonhelm" contained_sprite = 1 - armor = list(melee = 45, bullet = 15, laser = 35,energy = 25, bomb = 55, bio = 100, rad = 100) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_RESISTANT, + bomb = ARMOR_BOMB_RESISTANT, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SHIELDED + ) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_HUMAN, BODYTYPE_IPC_INDUSTRIAL, BODYTYPE_IPC_ZENGHU, BODYTYPE_IPC_BISHOP) light_overlay = "helmet_light_dragon" @@ -178,7 +282,15 @@ contained_sprite = 1 slowdown = 1 - armor = list(melee = 60, bullet = 15, laser = 35,energy = 25, bomb = 55, bio = 100, rad = 100) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_RESISTANT, + bomb = ARMOR_BOMB_RESISTANT, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SHIELDED + ) allowed = list(/obj/item/device/flashlight,/obj/item/tank,/obj/item/device/suit_cooling_unit,/obj/item/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/melee/energy/sword,/obj/item/handcuffs) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_HUMAN, BODYTYPE_IPC_INDUSTRIAL, BODYTYPE_IPC_ZENGHU, BODYTYPE_IPC_BISHOP) @@ -194,7 +306,15 @@ item_state = "caimanhelm" contained_sprite = 1 - armor = list(melee = 75, bullet = 45, laser = 15,energy = 25, bomb = 75, bio = 100, rad = 15) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_RESISTANT, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_MINOR + ) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_HUMAN) light_overlay = "helmet_light_caiman" @@ -212,7 +332,15 @@ contained_sprite = 1 slowdown = 2 - armor = list(melee = 75, bullet = 45, laser = 15,energy = 25, bomb = 75, bio = 100, rad = 15) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_RESISTANT, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_MINOR + ) allowed = list(/obj/item/device/flashlight,/obj/item/tank,/obj/item/device/suit_cooling_unit,/obj/item/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/melee/energy/sword,/obj/item/handcuffs) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_HUMAN) @@ -228,7 +356,15 @@ item_state = "revenanthelm" contained_sprite = 1 - armor = list(melee = 25, bullet = 65, laser = 35,energy = 25, bomb = 15, bio = 100, rad = 15) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_RESISTANT, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_RESISTANT, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_MINOR + ) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_HUMAN) light_overlay = "helmet_light_revenant" @@ -245,7 +381,15 @@ contained_sprite = 1 w_class = ITEMSIZE_NORMAL - armor = list(melee = 25, bullet = 65, laser = 35,energy = 25, bomb = 15, bio = 100, rad = 15) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_RESISTANT, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_RESISTANT, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_MINOR + ) allowed = list(/obj/item/device/flashlight,/obj/item/tank,/obj/item/device/suit_cooling_unit,/obj/item/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/melee/energy/sword,/obj/item/handcuffs) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_HUMAN) @@ -257,7 +401,15 @@ desc = "An older design of special operations voidsuit helmet utilized by private military corporations." icon_state = "rig0-freelancer" - armor = list(melee = 65, bullet = 55, laser = 20,energy = 15, bomb = 35, bio = 100, rad = 60) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_HUMAN, BODYTYPE_IPC_INDUSTRIAL, BODYTYPE_IPC_ZENGHU, BODYTYPE_IPC_BISHOP) light_overlay = "freelancer_light" @@ -272,7 +424,15 @@ slowdown = 1 w_class = ITEMSIZE_NORMAL - armor = list(melee = 65, bullet = 55, laser = 20, energy = 15, bomb = 35, bio = 100, rad = 60) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) allowed = list(/obj/item/device/flashlight,/obj/item/tank,/obj/item/device/suit_cooling_unit,/obj/item/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/melee/energy/sword,/obj/item/handcuffs) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_HUMAN, BODYTYPE_SKRELL, BODYTYPE_IPC_INDUSTRIAL, BODYTYPE_IPC_ZENGHU, BODYTYPE_IPC_BISHOP) @@ -284,7 +444,15 @@ icon_override = 'icons/mob/species/unathi/helmet.dmi' icon_state = "rig0-kataphract" item_state = "rig0-kataphract" - armor = list(melee = 75, bullet = 45, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 80) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_UNATHI) refittable = FALSE @@ -298,7 +466,15 @@ item_state = "rig-kataphract" slowdown = 1 w_class = ITEMSIZE_NORMAL - armor = list(melee = 75, bullet = 45, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 80) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) allowed = list(/obj/item/device/flashlight,/obj/item/tank,/obj/item/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/melee/energy/sword,/obj/item/handcuffs) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_UNATHI) @@ -336,7 +512,15 @@ item_state = "prejoroubhelm" contained_sprite = 1 - armor = list(melee = 65, bullet = 55, laser = 25,energy = 25, bomb = 15, bio = 100, rad = 15) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_MINOR, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_MINOR + ) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_HUMAN) brightness_on = 6 @@ -350,7 +534,15 @@ contained_sprite = 1 w_class = ITEMSIZE_NORMAL - armor = list(melee = 65, bullet = 55, laser = 25,energy = 25, bomb = 15, bio = 100, rad = 15) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_MINOR, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_MINOR + ) allowed = list(/obj/item/device/flashlight,/obj/item/tank,/obj/item/device/suit_cooling_unit,/obj/item/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/melee/energy/sword,/obj/item/handcuffs) siemens_coefficient = 0.35 species_restricted = list(BODYTYPE_HUMAN) diff --git a/code/modules/clothing/spacesuits/void/station.dm b/code/modules/clothing/spacesuits/void/station.dm index c7b3ed0a65a..3a46a27e672 100644 --- a/code/modules/clothing/spacesuits/void/station.dm +++ b/code/modules/clothing/spacesuits/void/station.dm @@ -7,8 +7,15 @@ item_state_slots = list( slot_l_hand_str = "eng_helm", slot_r_hand_str = "eng_helm" - ) - armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 80) + ) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) light_overlay = "helmet_light_dual_low" brightness_on = 6 @@ -22,7 +29,14 @@ slot_l_hand_str = "eng_hardsuit", slot_r_hand_str = "eng_hardsuit" ) - armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 80) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) allowed = list(/obj/item/device/flashlight,/obj/item/tank,/obj/item/device/suit_cooling_unit,/obj/item/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/pickaxe,/obj/item/material/twohanded/fireaxe,/obj/item/rfd/construction) //Mining rig @@ -33,8 +47,15 @@ item_state_slots = list( slot_l_hand_str = "mining_helm", slot_r_hand_str = "mining_helm" - ) - armor = list(melee = 50, bullet = 5, laser = 20,energy = 5, bomb = 55, bio = 100, rad = 20) + ) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_MINOR, + bomb = ARMOR_BOMB_RESISTANT, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_MINOR + ) light_overlay = "merc_voidsuit_lights" brightness_on = 6 @@ -47,7 +68,14 @@ desc = "A special suit that protects against hazardous, low pressure environments. Has reinforced plating." item_state = "rig-mining" icon_state = "rig-mining" - armor = list(melee = 50, bullet = 5, laser = 20,energy = 5, bomb = 55, bio = 100, rad = 20) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_MINOR, + bomb = ARMOR_BOMB_RESISTANT, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_MINOR + ) allowed = list(/obj/item/device/flashlight,/obj/item/tank,/obj/item/device/suit_cooling_unit,/obj/item/storage/bag/ore,/obj/item/pickaxe, /obj/item/gun/custom_ka, /obj/item/gun/energy/vaurca/thermaldrill,/obj/item/rfd/mining) //Medical Rig @@ -58,8 +86,14 @@ item_state_slots = list( slot_l_hand_str = "medical_helm", slot_r_hand_str = "medical_helm" - ) - armor = list(melee = 30, bullet = 5, laser = 20,energy = 5, bomb = 25, bio = 100, rad = 50) + ) + armor = list( + melee = ARMOR_MELEE_KNIVES, + laser = ARMOR_LASER_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SMALL + ) light_overlay = "helmet_light_dual_low" brightness_on = 6 @@ -72,8 +106,14 @@ slot_l_hand_str = "medical_hardsuit", slot_r_hand_str = "medical_hardsuit" ) + armor = list( + melee = ARMOR_MELEE_KNIVES, + laser = ARMOR_LASER_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SMALL + ) allowed = list(/obj/item/device/flashlight,/obj/item/tank,/obj/item/device/suit_cooling_unit,/obj/item/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical,/obj/item/device/breath_analyzer,/obj/item/material/twohanded/fireaxe) - armor = list(melee = 30, bullet = 5, laser = 20,energy = 5, bomb = 25, bio = 100, rad = 50) //Security /obj/item/clothing/head/helmet/space/void/security @@ -83,8 +123,15 @@ item_state_slots = list( slot_l_hand_str = "sec_helm", slot_r_hand_str = "sec_helm" - ) - armor = list(melee = 50, bullet = 15, laser = 30, energy = 5, bomb = 45, bio = 100, rad = 10) + ) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_SMALL, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_MINOR + ) light_overlay = "helmet_light_dual_low" brightness_on = 6 @@ -97,10 +144,17 @@ slot_l_hand_str = "sec_hardsuit", slot_r_hand_str = "sec_hardsuit" ) - armor = list(melee = 50, bullet = 15, laser = 30, energy = 5, bomb = 45, bio = 100, rad = 10) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_SMALL, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_MINOR + ) allowed = list(/obj/item/gun,/obj/item/device/flashlight,/obj/item/tank,/obj/item/device/suit_cooling_unit,/obj/item/melee/baton) -//Atmospherics Rig (BS12) +//Atmospherics Rig /obj/item/clothing/head/helmet/space/void/atmos desc = "A special helmet designed for work in a hazardous, low pressure environments. Has improved thermal protection and minor radiation shielding." name = "atmospherics voidsuit helmet" @@ -108,8 +162,15 @@ item_state_slots = list( slot_l_hand_str = "atmos_helm", slot_r_hand_str = "atmos_helm" - ) - armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 50) + ) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SMALL + ) max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE + 10000 // It is a suit designed for fire, enclosed light_overlay = "helmet_light_dual_low" brightness_on = 6 @@ -123,7 +184,14 @@ slot_l_hand_str = "atmos_hardsuit", slot_r_hand_str = "atmos_hardsuit" ) - armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 50) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SMALL + ) allowed = list(/obj/item/device/flashlight,/obj/item/tank,/obj/item/device/suit_cooling_unit,/obj/item/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/pickaxe,/obj/item/material/twohanded/fireaxe,/obj/item/rfd/construction) max_heat_protection_temperature = FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE + 10000 // It is a suit designed for fire, enclosed @@ -136,7 +204,14 @@ slot_l_hand_str = "sec_helm", slot_r_hand_str = "sec_helm" ) - armor = list(melee = 50, bullet = 15, laser = 30, energy = 5, bomb = 45, bio = 100, rad = 10) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_SMALL, + bomb = ARMOR_BOMB_SHIELDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) light_overlay = "helmet_light_dual" /obj/item/clothing/suit/space/void/hos @@ -148,7 +223,14 @@ slot_l_hand_str = "sec_hardsuit", slot_r_hand_str = "sec_hardsuit" ) - armor = list(melee = 50, bullet = 15, laser = 30, energy = 5, bomb = 45, bio = 100, rad = 10) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_SMALL, + bomb = ARMOR_BOMB_SHIELDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) allowed = list(/obj/item/gun,/obj/item/device/flashlight,/obj/item/tank,/obj/item/device/suit_cooling_unit,/obj/item/melee/baton) //Science @@ -157,7 +239,13 @@ desc = "A special helmet designed for usage by NanoTrasen research personnel in hazardous, low pressure environments." icon_state = "rig0-sci" item_state = "research_voidsuit_helmet" - armor = list(melee = 20, bullet = 5, laser = 30, energy = 45, bomb = 25, bio = 100, rad = 75) + armor = list( + melee = ARMOR_MELEE_KNIVES, + laser = ARMOR_LASER_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) /obj/item/clothing/suit/space/void/sci name = "research voidsuit" @@ -165,4 +253,10 @@ item_state = "rig-sci" icon_state = "rig-sci" allowed = list(/obj/item/device/flashlight,/obj/item/tank,/obj/item/device/suit_cooling_unit) - armor = list(melee = 20, bullet = 5, laser = 30, energy = 45, bomb = 25, bio = 100, rad = 75) \ No newline at end of file + armor = list( + melee = ARMOR_MELEE_KNIVES, + laser = ARMOR_LASER_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_RESISTANT + ) \ No newline at end of file diff --git a/code/modules/clothing/spacesuits/void/void.dm b/code/modules/clothing/spacesuits/void/void.dm index 161b3ad5ac2..638ade5ea5d 100644 --- a/code/modules/clothing/spacesuits/void/void.dm +++ b/code/modules/clothing/spacesuits/void/void.dm @@ -5,7 +5,15 @@ icon_state = "void" heat_protection = HEAD - armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 20) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_MINOR + ) max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE siemens_coefficient = 0.5 @@ -17,14 +25,14 @@ BODYTYPE_SKRELL = 'icons/mob/species/skrell/helmet.dmi', BODYTYPE_VAURCA = 'icons/mob/species/vaurca/helmet.dmi', BODYTYPE_IPC = 'icons/mob/species/machine/helmet.dmi' - ) + ) sprite_sheets_obj = list( BODYTYPE_UNATHI = 'icons/obj/clothing/species/unathi/hats.dmi', BODYTYPE_TAJARA = 'icons/obj/clothing/species/tajaran/hats.dmi', BODYTYPE_SKRELL = 'icons/obj/clothing/species/skrell/hats.dmi', BODYTYPE_VAURCA = 'icons/obj/clothing/species/vaurca/hats.dmi', BODYTYPE_IPC = 'icons/obj/clothing/species/machine/hats.dmi' - ) + ) light_overlay = "helmet_light" @@ -34,7 +42,15 @@ item_state = "void" desc = "A high-tech dark red space suit. Used for AI satellite maintenance." slowdown = 1 - armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 20) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_MINOR + ) allowed = list(/obj/item/device/flashlight,/obj/item/tank,/obj/item/device/suit_cooling_unit) heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE @@ -47,14 +63,14 @@ BODYTYPE_SKRELL = 'icons/mob/species/skrell/suit.dmi', BODYTYPE_VAURCA = 'icons/mob/species/vaurca/suit.dmi', BODYTYPE_IPC = 'icons/mob/species/machine/suit.dmi' - ) + ) sprite_sheets_obj = list( BODYTYPE_UNATHI = 'icons/obj/clothing/species/unathi/suits.dmi', BODYTYPE_TAJARA = 'icons/obj/clothing/species/tajaran/suits.dmi', BODYTYPE_SKRELL = 'icons/obj/clothing/species/skrell/suits.dmi', BODYTYPE_VAURCA = 'icons/obj/clothing/species/vaurca/suits.dmi', BODYTYPE_IPC= 'icons/obj/clothing/species/machine/suits.dmi' - ) + ) action_button_name = "Toggle Helmet" var/helmet_deploy_sound = 'sound/items/helmet_close.ogg' diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index 87efdd7cf55..2e4e89e6153 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -63,7 +63,13 @@ icon_state = "armor" item_state = "armor" blood_overlay_type = "armor" - armor = list(melee = 50, bullet = 15, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_KNIVES, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED + ) /obj/item/clothing/suit/armor/vest/fib name = "\improper FIB armored vest" @@ -77,7 +83,13 @@ icon_state = "jensencoat" item_state = "jensencoat" body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS - armor = list(melee = 65, bullet = 15, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_KNIVES, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED + ) allowed = list(/obj/item/gun/energy, /obj/item/reagent_containers/spray/pepper, /obj/item/gun/projectile, /obj/item/ammo_magazine, /obj/item/ammo_casing, /obj/item/melee/baton, /obj/item/handcuffs, /obj/item/device/flashlight) /obj/item/clothing/suit/storage/toggle/armor/hos/Initialize() @@ -93,7 +105,13 @@ icon_state = "riot_vest" item_state = "riot_vest" slowdown = 1 - armor = list(melee = 80, bullet = 20, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED + ) siemens_coefficient = 0.35 pocket_slots = 4 @@ -103,7 +121,13 @@ icon_state = "bulletproof_armor" item_state = "bulletproof_armor" blood_overlay_type = "armor" - armor = list(melee = 25, bullet = 80, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_AP, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED + ) siemens_coefficient = 0.35 pocket_slots = 4 @@ -113,7 +137,12 @@ icon_state = "armor_reflec" item_state = "armor_reflec" blood_overlay_type = "armor" - armor = list(melee = 25, bullet = 25, laser = 80, energy = 40, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_KNIVES, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_RIFLES, + energy = ARMOR_ENERGY_RESISTANT + ) siemens_coefficient = 0 pocket_slots = 4 @@ -148,8 +177,16 @@ body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS allowed = list(/obj/item/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/handcuffs,/obj/item/tank/emergency_oxygen) slowdown = 1 - armor = list(melee = 80, bullet = 60, laser = 50,energy = 25, bomb = 50, bio = 100, rad = 100) - flags_inv = HIDEWRISTS|HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_RESISTANT, + laser = ARMOR_LASER_MAJOR, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SMALL + ) + flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE siemens_coefficient = 0.35 @@ -175,7 +212,7 @@ item_state = "reactiveoff" blood_overlay_type = "armor" slowdown = 1 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = null /obj/item/clothing/suit/armor/reactive/handle_shield(mob/user, var/on_back, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack") if(prob(50)) @@ -225,7 +262,13 @@ var/obj/item/gun/holstered = null body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS slowdown = 1 - armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 20, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_KNIVES, + bullet = ARMOR_BALLISTIC_RESISTANT, + laser = ARMOR_LASER_MAJOR, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED + ) siemens_coefficient = 0.35 var/obj/item/clothing/accessory/holster/holster @@ -278,7 +321,13 @@ icon_state = "ertarmor_cmd" item_state = "armor" body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS - armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 20, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_KNIVES, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_MAJOR, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED + ) siemens_coefficient = 0.35 //Commander @@ -310,9 +359,15 @@ desc = "A simple kevlar plate carrier." icon_state = "kvest" item_state = "kvest" - armor = list(melee = 50, bullet = 15, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0) allowed = list(/obj/item/gun,/obj/item/reagent_containers/spray/pepper,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/handcuffs,/obj/item/device/flashlight) siemens_coefficient = 0.5 + armor = list( + melee = ARMOR_MELEE_KNIVES, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED + ) /obj/item/clothing/suit/storage/vest/Initialize() . = ..() @@ -341,8 +396,6 @@ item_state = "hosvest_nobadge" icon_badge = "hosvest_badge" icon_nobadge = "hosvest_nobadge" - armor = list(melee = 65, bullet = 15, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0) - /obj/item/clothing/suit/storage/vest/pcrc name = "PCRC armor vest" desc = "A simple kevlar plate carrier belonging to Proxima Centauri Risk Control. This one has a PCRC crest clipped to the chest." @@ -373,15 +426,25 @@ icon_state = "hazard_cadet" item_state = "hazard_cadet" allowed = list(/obj/item/gun,/obj/item/reagent_containers/spray/pepper,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/handcuffs,/obj/item/device/flashlight) - armor = list(melee = 10, bullet = 0, laser = 10, energy = 10, bomb = 10, bio = 0, rad = 0) siemens_coefficient = 0.5 + armor = list( + melee = ARMOR_MELEE_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_MINOR + ) /obj/item/clothing/suit/storage/vest/heavy name = "heavy armor vest" desc = "A heavy kevlar plate carrier with webbing attached." icon_state = "webvest" item_state = "webvest" - armor = list(melee = 50, bullet = 40, laser = 50, energy = 25, bomb = 30, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_RESISTANT, + laser = ARMOR_LASER_MAJOR, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED, + ) slowdown = 1 siemens_coefficient = 0.35 @@ -408,7 +471,13 @@ item_state = "hoswebvest_nobadge" icon_badge = "hoswebvest_badge" icon_nobadge = "hoswebvest_nobadge" - armor = list(melee = 65, bullet = 30, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_BALLISTIC_PISTOL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED + ) /obj/item/clothing/suit/storage/vest/heavy/pcrc name = "PCRC heavy armor vest" @@ -426,7 +495,13 @@ item_state = "vest" icon_state = "vest" contained_sprite = TRUE - armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 40, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_RIFLE, + laser = ARMOR_LASER_MAJOR, + energy = ARMOR_ENERGY_RESISTANT, + bomb = ARMOR_BOMB_PADDED + ) body_parts_covered = UPPER_TORSO|LOWER_TORSO //ert related armor @@ -437,7 +512,13 @@ icon_state = "ert_soldier" item_state = "ert_soldier" body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS - armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 20, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_RIFLE, + laser = ARMOR_LASER_MAJOR, + energy = ARMOR_ENERGY_RESISTANT, + bomb = ARMOR_BOMB_PADDED + ) siemens_coefficient = 0.35 slowdown = 0 @@ -483,7 +564,13 @@ item_state = "unathi_armor" contained_sprite = TRUE species_restricted = list(BODYTYPE_UNATHI) - armor = list(melee = 65, bullet = 30, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED + ) siemens_coefficient = 0.35 /obj/item/clothing/suit/armor/unathi/hegemony @@ -491,7 +578,13 @@ desc = "A highly armored chestplate designated to be worn by an Unathi, a newer variant commonly worn by the Hegemony Levies." icon_state = "hegemony_armor" item_state = "hegemony_armor" - armor = list(melee = 70, bullet = 40, laser = 55, energy = 15, bomb = 25, bio = 0, rad = 40) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_MAJOR, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED + ) // Vaurca version of Unathi armor /obj/item/clothing/suit/armor/unathi/klax @@ -503,8 +596,15 @@ contained_sprite = TRUE species_restricted = list(BODYTYPE_VAURCA) allowed = list(/obj/item/gun/projectile, /obj/item/gun/energy, /obj/item/gun/launcher, /obj/item/melee, /obj/item/reagent_containers/spray/pepper, /obj/item/ammo_magazine, /obj/item/ammo_casing, /obj/item/melee/baton, /obj/item/handcuffs, /obj/item/device/flashlight) - armor = list(melee = 70, bullet = 40, laser = 55, energy = 15, bomb = 25, bio = 0, rad = 40) siemens_coefficient = 0.35 + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_MAJOR, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED, + rad = ARMOR_RAD_RESISTANT + ) /obj/item/clothing/suit/storage/vest/legion name = "foreign legion armored suit" @@ -512,7 +612,6 @@ icon_state = "legion_armor" item_state = "legion_armor" body_parts_covered = UPPER_TORSO | LOWER_TORSO | LEGS | ARMS - armor = list(melee = 50, bullet = 30, laser = 30, energy = 15, bomb = 40, bio = 0, rad = 0) siemens_coefficient = 0.35 allowed = list( /obj/item/gun, @@ -523,7 +622,14 @@ /obj/item/handcuffs, /obj/item/device/flashlight, /obj/item/material/twohanded/pike/flag - ) + ) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_RESISTANT + ) /obj/item/clothing/suit/storage/vest/legion/legate name = "foreign legion legate coat" @@ -544,7 +650,13 @@ icon = 'icons/obj/sol_uniform.dmi' icon_state = "solwebvest" item_state = "solwebvest" - armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 40, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_RESISTANT, + laser = ARMOR_LASER_MAJOR, + energy = ARMOR_ENERGY_RESISTANT, + bomb = ARMOR_BOMB_PADDED + ) contained_sprite = 1 //All of the armor below is mostly unused diff --git a/code/modules/clothing/suits/bio.dm b/code/modules/clothing/suits/bio.dm index c5dcbfb74ff..07177f1f0c4 100644 --- a/code/modules/clothing/suits/bio.dm +++ b/code/modules/clothing/suits/bio.dm @@ -8,7 +8,10 @@ ) desc = "A hood that protects the head and face from biological comtaminants." permeability_coefficient = 0.01 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 20) + armor = list( + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SMALL + ) flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|BLOCKHAIR body_parts_covered = HEAD|FACE|EYES siemens_coefficient = 0.75 @@ -26,7 +29,10 @@ body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS slowdown = 1.0 allowed = list(/obj/item/tank/emergency_oxygen,/obj/item/pen,/obj/item/device/flashlight/pen) - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 20) + armor = list( + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SMALL + ) flags_inv = HIDEWRISTS|HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL siemens_coefficient = 0.75 diff --git a/code/modules/clothing/suits/hoodies.dm b/code/modules/clothing/suits/hoodies.dm index da6b5f8fe4c..965a69ec1b0 100644 --- a/code/modules/clothing/suits/hoodies.dm +++ b/code/modules/clothing/suits/hoodies.dm @@ -90,7 +90,9 @@ body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS cold_protection = UPPER_TORSO|LOWER_TORSO|ARMS min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list( + bio = ARMOR_BIO_MINOR + ) siemens_coefficient = 0.75 hoodtype = /obj/item/clothing/head/winterhood diff --git a/code/modules/clothing/suits/labcoat.dm b/code/modules/clothing/suits/labcoat.dm index fb8b9148e19..5ee8edaacb0 100644 --- a/code/modules/clothing/suits/labcoat.dm +++ b/code/modules/clothing/suits/labcoat.dm @@ -6,7 +6,9 @@ blood_overlay_type = "coat" body_parts_covered = UPPER_TORSO|ARMS allowed = list(/obj/item/device/analyzer,/obj/item/stack/medical,/obj/item/dnainjector,/obj/item/reagent_containers/dropper,/obj/item/reagent_containers/syringe,/obj/item/reagent_containers/hypospray,/obj/item/device/healthanalyzer,/obj/item/device/flashlight/pen,/obj/item/reagent_containers/glass/bottle,/obj/item/reagent_containers/glass/beaker,/obj/item/reagent_containers/pill,/obj/item/storage/pill_bottle,/obj/item/paper, /obj/item/device/breath_analyzer) - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 50, rad = 0) + armor = list( + bio = ARMOR_BIO_RESISTANT + ) opened = TRUE // spawns opened /obj/item/clothing/suit/storage/toggle/labcoat/cmo @@ -14,19 +16,25 @@ desc = "Bluer than the standard model." icon_state = "labcoat_cmo" item_state = "labcoat_cmo" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 0) + armor = list( + bio = ARMOR_BIO_RESISTANT + ) /obj/item/clothing/suit/storage/toggle/labcoat/cmoalt name = "chief medical officer labcoat" desc = "A labcoat with command blue highlights." icon_state = "labcoat_cmoalt" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 0) + armor = list( + bio = ARMOR_BIO_RESISTANT + ) /obj/item/clothing/suit/storage/toggle/labcoat/cmoalt2 name = "chief medical officer labcoat" desc = "A labcoat with command gold highlights." icon_state = "labcoat_cmoalt2" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 0) + armor = list( + bio = ARMOR_BIO_RESISTANT + ) /obj/item/clothing/suit/storage/toggle/labcoat/genetics name = "geneticist labcoat" @@ -37,37 +45,31 @@ name = "medical labcoat" desc = "A suit that protects against minor chemical spills. Offers slightly more protection against biohazards than the standard model. Has a green stripe on the shoulder." icon_state = "labcoat_med" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 0) /obj/item/clothing/suit/storage/toggle/labcoat/pharmacist name = "pharmacist labcoat" desc = "A suit that protects against minor chemical spills. Offers slightly more protection against biohazards than the standard model. Has an orange stripe on the shoulder." icon_state = "labcoat_chem" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 0) /obj/item/clothing/suit/storage/toggle/labcoat/biochemist name = "protective labcoat" desc = "A suit that protects against minor chemical spills. Offers slightly more protection against biohazards than the standard model. Has a red stripe on the shoulder." icon_state = "labcoat_vir" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 0) /obj/item/clothing/suit/storage/toggle/labcoat/psych name = "psychiatrist labcoat" desc = "A suit that protects against minor chemical spills. Offers slightly more protection against biohazards than the standard model. Has a teal stripe on the shoulder." icon_state = "labcoat_psych" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 0) /obj/item/clothing/suit/storage/toggle/labcoat/surgeon name = "surgeon labcoat" desc = "A suit that protects against minor chemical spills. Offers slightly more protection against biohazards than the standard model. Has a light blue stripe on the shoulder." icon_state = "labcoat_surgeon" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 0) /obj/item/clothing/suit/storage/toggle/labcoat/trauma name = "trauma physician labcoat" desc = "A suit that protects against minor chemical spills. Offers slightly more protection against biohazards than the standard model. Has a black stripe on the shoulder." icon_state = "labcoat_trauma" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 0) /obj/item/clothing/suit/storage/toggle/labcoat/science name = "scientist labcoat" @@ -80,22 +82,21 @@ icon_state = "iac_vest" item_state = "iac_vest" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 5, rad = 0) + armor = list( + bio = ARMOR_BIO_MINOR + ) /obj/item/clothing/suit/storage/toggle/labcoat/zeng name = "zeng-hu labcoat" desc = "A suit that protects against minor chemical spills. Offers slightly more protection against biohazards than the standard model. Comes in Zeng-Hu colours." icon_state = "labcoat_zeng" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 0) /obj/item/clothing/suit/storage/toggle/labcoat/zavodskoi name = "Zavodskoi Interstellar labcoat" desc = "A suit that protects against minor chemical spills. Offers slightly more protection against biohazards than the standard model. Comes in Zavodskoi Interstellar colours." icon_state = "labcoat_necro" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 0) /obj/item/clothing/suit/storage/toggle/labcoat/heph name = "hephaestus labcoat" desc = "A suit that protects against minor chemical spills. Offers slightly more protection against biohazards than the standard model. Comes in Hephaestus colours." icon_state = "labcoat_heph" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 0) diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index 67af7ba447e..7d05ea75036 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -259,12 +259,20 @@ desc = "A Tau Ceti Foreign Legion pilot's jacket. This is the more common, less durable variety, which typically finds itself percolating amongst all ranks of the TCFL." icon_state = "lflight" item_state = "lflight" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list( + bio = ARMOR_BIO_MINOR + ) siemens_coefficient = 0.75 /obj/item/clothing/suit/storage/toggle/leather_jacket/flight/legion/alt desc = "A Tau Ceti Foreign Legion pilot's jacket made from a silky, shiny nanonylon material and lined with tough, protective synthfabrics." - armor = list(melee = 40, bullet = 10, laser = 20, energy = 10, bomb = 30, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED + ) siemens_coefficient = 0.35 /obj/item/clothing/suit/storage/toggle/leather_jacket/military diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm index f051a8a3e0a..7daa634b93f 100644 --- a/code/modules/clothing/suits/utility.dm +++ b/code/modules/clothing/suits/utility.dm @@ -59,7 +59,13 @@ icon_state = "bombsuit" w_class = ITEMSIZE_HUGE//Too large to fit in a backpack item_flags = STOPPRESSUREDAMAGE|THICKMATERIAL|BLOCK_GAS_SMOKE_EFFECT - armor = list(melee = 30, bullet = 20, laser = 25,energy = 30, bomb = 100, bio = 60, rad = 60) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_RESISTANT, + bomb = ARMOR_BOMB_SHIELDED + ) siemens_coefficient = 0.1 flags_inv = HIDEMASK|HIDEEARS|HIDEEYES body_parts_covered = HEAD|FACE|EYES @@ -81,7 +87,13 @@ gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 slowdown = 8 - armor = list(melee = 55, bullet = 55, laser = 55,energy = 60, bomb = 100, bio = 60, rad = 60) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_RESISTANT, + bomb = ARMOR_BOMB_SHIELDED + ) siemens_coefficient = 0.1 item_flags = STOPPRESSUREDAMAGE|THICKMATERIAL flags_inv = HIDEJUMPSUIT|HIDETAIL @@ -177,7 +189,10 @@ desc = "A hood with radiation protective properties. Label: Made with lead, do not eat insulation" flags_inv = BLOCKHAIR body_parts_covered = HEAD|FACE|EYES - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 100) + armor = list( + bio = ARMOR_BIO_RESISTANT, + rad = ARMOR_RAD_SHIELDED + ) siemens_coefficient = 0.35 @@ -192,7 +207,10 @@ body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS|HANDS|FEET allowed = list(/obj/item/device/flashlight,/obj/item/tank/emergency_oxygen,/obj/item/clothing/head/radiation,/obj/item/clothing/mask/gas) slowdown = 1.5 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 100) + armor = list( + bio = ARMOR_BIO_RESISTANT, + rad = ARMOR_RAD_SHIELDED + ) siemens_coefficient = 0.35 flags_inv = HIDEJUMPSUIT|HIDETAIL diff --git a/code/modules/clothing/suits/wiz_robe.dm b/code/modules/clothing/suits/wiz_robe.dm index 5cbd190fb72..9006d7b4478 100644 --- a/code/modules/clothing/suits/wiz_robe.dm +++ b/code/modules/clothing/suits/wiz_robe.dm @@ -64,7 +64,15 @@ item_state = "wizrobe" gas_transfer_coefficient = 0.01 // IT'S MAGICAL OKAY JEEZ +1 TO NOT DIE permeability_coefficient = 0.01 - armor = list(melee = 30, bullet = 20, laser = 20,energy = 20, bomb = 20, bio = 20, rad = 20) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_SMALL, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_MINOR, + rad = ARMOR_RAD_MINOR + ) allowed = list(/obj/item/tank/emergency_oxygen,/obj/item/teleportation_scroll,/obj/item/scrying,/obj/item/spellbook,/obj/item/device/soulstone,/obj/item/material/knife/ritual) flags_inv = HIDEJUMPSUIT siemens_coefficient = 0.75 @@ -109,7 +117,6 @@ item_state = "gentlecoat" gas_transfer_coefficient = 0.01 // IT'S MAGICAL OKAY JEEZ +1 TO NOT DIE permeability_coefficient = 0.01 - armor = list(melee = 30, bullet = 20, laser = 20,energy = 20, bomb = 20, bio = 20, rad = 20) allowed = list(/obj/item/tank/emergency_oxygen,/obj/item/teleportation_scroll,/obj/item/scrying,/obj/item/spellbook,/obj/item/device/soulstone,/obj/item/material/knife/ritual) flags_inv = HIDEJUMPSUIT siemens_coefficient = 0.75 diff --git a/code/modules/clothing/suits/xeno/tajara.dm b/code/modules/clothing/suits/xeno/tajara.dm index c0412a47a9c..4b32956a4be 100644 --- a/code/modules/clothing/suits/xeno/tajara.dm +++ b/code/modules/clothing/suits/xeno/tajara.dm @@ -148,7 +148,12 @@ allowed = list(/obj/item/gun,/obj/item/material/sword) flags_inv = HIDEJUMPSUIT|HIDETAIL species_restricted = list(BODYTYPE_TAJARA) - armor = list(melee = 60, bullet = 50, laser = 20, energy = 10, bomb = 5, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR + ) siemens_coefficient = 0.35 desc_fluff = "The Feudal Era of Amohda is famous for the steel swords which became common. Many renowned swordsmen and famous warriors would travel the land fighting duels of \ single combat in their quests to become the greatest swordsman. Modern Amohda is a mix between loyalists to the NKA and to the DPRA, with almost universal praise for a return to \ @@ -162,7 +167,12 @@ icon_state = "cuirass" item_state = "cuirass" contained_sprite = TRUE - armor = list(melee = 50, bullet = 50, laser = 20, energy = 10, bomb = 5, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_MINOR + ) /obj/item/clothing/suit/storage/tajaran/pra_jacket name = "republican service jacket" @@ -170,5 +180,10 @@ icon_state = "greenservice" item_state = "greenservice" body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS - armor = list(melee = 30, bullet = 20, laser = 20, energy = 10, bomb = 5, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_KNIVES, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_MINOR, + energy = ARMOR_ENERGY_MINOR + ) siemens_coefficient = 0.50 \ No newline at end of file diff --git a/code/modules/clothing/under/jobs/civilian.dm b/code/modules/clothing/under/jobs/civilian.dm index 9b7bdb617a4..9783d6cf18d 100644 --- a/code/modules/clothing/under/jobs/civilian.dm +++ b/code/modules/clothing/under/jobs/civilian.dm @@ -83,7 +83,9 @@ icon_state = "janitor" worn_state = "janitor" item_state = "janitor" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list( + bio = ARMOR_BIO_MINOR + ) /obj/item/clothing/under/lawyer desc = "Slick threads." @@ -139,7 +141,9 @@ desc = "A uniform worn by Hephaestus Industries engineers." icon_state = "heph_engineer" worn_state = "heph_engineer" - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 10) + armor = list( + rad = ARMOR_RAD_MINOR + ) siemens_coefficient = 0.75 /obj/item/clothing/under/rank/hephaestus/tech @@ -154,8 +158,9 @@ icon_state = "heph_research" worn_state = "heph_research" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 10, bio = 0, rad = 10) - + armor = list( + rad = ARMOR_RAD_MINOR + ) /obj/item/clothing/under/rank/zavodskoi name = "Zavodskoi Interstellar uniform" desc = "A uniform worn by Zavodskoi Interstellar employees and contractors." @@ -168,8 +173,9 @@ icon_state = "necro_research" worn_state = "necro_research" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 10, bio = 0, rad = 0) - + armor = list( + bomb = ARMOR_BOMB_MINOR + ) /obj/item/clothing/under/rank/zavodskoi/research/alt icon_state = "necro_research_alt" worn_state = "necro_research_alt" @@ -193,7 +199,9 @@ desc = "A uniform worn by Einstein Engines Incorporated employees and contractors." icon_state = "einstein" worn_state = "einstein" - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 10) + armor = list( + rad = ARMOR_RAD_MINOR + ) siemens_coefficient = 0.75 /obj/item/clothing/under/rank/zeng @@ -202,7 +210,9 @@ icon_state = "zeng_research" worn_state = "zeng_research" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 10, bio = 10, rad = 0) + armor = list( + bio = ARMOR_BIO_MINOR + ) /obj/item/clothing/under/rank/zeng/alt icon_state = "zeng_research_alt" @@ -220,4 +230,6 @@ icon_state = "eridani_medic" worn_state = "eridani_medic" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list( + bio = ARMOR_BIO_MINOR + ) \ No newline at end of file diff --git a/code/modules/clothing/under/jobs/engineering.dm b/code/modules/clothing/under/jobs/engineering.dm index dad48393266..950500b760d 100644 --- a/code/modules/clothing/under/jobs/engineering.dm +++ b/code/modules/clothing/under/jobs/engineering.dm @@ -5,7 +5,9 @@ icon_state = "chiefengineer" item_state = "g_suit" worn_state = "chief" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 10) + armor = list( + rad = ARMOR_RAD_MINOR + ) siemens_coefficient = 0.75 /obj/item/clothing/under/rank/atmospheric_technician @@ -22,7 +24,9 @@ icon_state = "engine" item_state = "engi_suit" worn_state = "engine" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 10) + armor = list( + rad = ARMOR_RAD_MINOR + ) siemens_coefficient = 0.75 /obj/item/clothing/under/rank/engineer/apprentice diff --git a/code/modules/clothing/under/jobs/medsci.dm b/code/modules/clothing/under/jobs/medsci.dm index 3c48dee42aa..51ff3ef0501 100644 --- a/code/modules/clothing/under/jobs/medsci.dm +++ b/code/modules/clothing/under/jobs/medsci.dm @@ -7,7 +7,9 @@ icon_state = "rd" item_state = "lb_suit" worn_state = "rd" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list( + bio = ARMOR_BIO_MINOR + ) /obj/item/clothing/under/rank/research_director/rdalt desc = "A dress suit and slacks stained with hard work and dedication to science. Perhaps other things as well, but mostly hard work and dedication." @@ -15,7 +17,9 @@ icon_state = "rdalt" item_state = "lb_suit" worn_state = "rdalt" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list( + bio = ARMOR_BIO_MINOR + ) /obj/item/clothing/under/rank/research_director/dress_rd name = "research director dress uniform" @@ -23,7 +27,9 @@ icon_state = "dress_rd" item_state = "lb_suit" worn_state = "dress_rd" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list( + bio = ARMOR_BIO_MINOR + ) body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS /obj/item/clothing/under/rank/scientist @@ -33,8 +39,9 @@ item_state = "w_suit" worn_state = "science" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 10, bio = 0, rad = 0) - + armor = list( + bio = ARMOR_BIO_MINOR + ) /obj/item/clothing/under/rank/scientist/xenoarcheologist desc = "It's made of a special fiber that provides minor protection against biohazards. It has markings that denote the wearer as a scientist." name = "xenoarcheologist's jumpsuit" @@ -42,7 +49,9 @@ item_state = "w_suit" worn_state = "xenoarcheology" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 10, bio = 0, rad = 0) + armor = list( + bio = ARMOR_BIO_MINOR + ) /obj/item/clothing/under/rank/scientist/science_alt desc = "It's made of a special fiber that provides minor protection against biohazards. It has markings that denote the wearer as a scientist." @@ -51,13 +60,17 @@ item_state = "w_suit" worn_state = "science_alt" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 10, bio = 0, rad = 0) + armor = list( + bio = ARMOR_BIO_MINOR + ) /obj/item/clothing/under/rank/scientist/botany desc = "It's made of a special fiber that provides minor protection against biohazards. Its colour denotes the wearer as a xenobotanist." icon_state = "botany" worn_state = "botany" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 10, bio = 5, rad = 0) + armor = list( + bio = ARMOR_BIO_MINOR + ) /obj/item/clothing/under/rank/scientist/intern desc = "It's made of a special fiber that provides minor protection against biohazards. It has markings that denote the wearer as a laboratory assistant." @@ -72,7 +85,9 @@ item_state = "w_suit" worn_state = "chemistry" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list( + bio = ARMOR_BIO_MINOR + ) /obj/item/clothing/under/rank/xenoarcheologist desc = "It's made of a special fiber that provides minor protection against biohazards. It has markings that denote the wearer as a xenoarcheologist." @@ -81,7 +96,9 @@ item_state = "w_suit" worn_state = "xenoarcheology" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 10, bio = 0, rad = 0) + armor = list( + bomb = ARMOR_BOMB_MINOR + ) /* * Medical @@ -93,7 +110,9 @@ item_state = "w_suit" worn_state = "cmo" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list( + bio = ARMOR_BIO_MINOR + ) /obj/item/clothing/under/rank/geneticist desc = "It's made of a special fiber that gives special protection against biohazards. It has a genetics rank stripe on it." @@ -102,7 +121,9 @@ item_state = "w_suit" worn_state = "geneticswhite" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list( + bio = ARMOR_BIO_MINOR + ) /obj/item/clothing/under/rank/virologist desc = "It's made of a special fiber that gives special protection against biohazards. It has a virologist rank stripe on it." @@ -111,7 +132,9 @@ item_state = "w_suit" worn_state = "virology" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list( + bio = ARMOR_BIO_MINOR + ) /obj/item/clothing/under/rank/iacjumpsuit desc = "It's a blue and white jumpsuit, the IAC logo plastered across the back." @@ -119,7 +142,9 @@ icon_state = "iacuniform" item_state = "iacuniform" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 15, rad = 5) + armor = list( + bio = ARMOR_BIO_MINOR + ) /obj/item/clothing/under/rank/medical desc = "It's made of a special fiber that provides minor protection against biohazards. It denotes that the wearer is trained medical personnel." @@ -128,7 +153,9 @@ item_state = "w_suit" worn_state = "medical" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list( + bio = ARMOR_BIO_MINOR + ) /obj/item/clothing/under/rank/medical/intern desc = "It's made of a special fiber that provides minor protection against biohazards. It denotes that the wearer is still a medical intern." @@ -186,4 +213,6 @@ item_state = "w_suit" worn_state = "virology" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list( + bio = ARMOR_BIO_MINOR + ) diff --git a/code/modules/clothing/under/jobs/security.dm b/code/modules/clothing/under/jobs/security.dm index 391058b195f..a531db20578 100644 --- a/code/modules/clothing/under/jobs/security.dm +++ b/code/modules/clothing/under/jobs/security.dm @@ -14,7 +14,9 @@ desc = "It's made of a slightly sturdier material than standard jumpsuits, to allow for robust protection." icon_state = "officer_standard" worn_state = "officer_standard" - armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_SMALL + ) siemens_coefficient = 0.75 /obj/item/clothing/under/rank/security/corp @@ -30,7 +32,9 @@ desc = "It's made of a slightly sturdier material, to allow for robust protection." icon_state = "cadet_standard" worn_state = "cadet_standard" - armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_SMALL + ) siemens_coefficient = 0.75 /obj/item/clothing/under/rank/warden @@ -38,7 +42,9 @@ desc = "It's made of a slightly sturdier material than standard jumpsuits, to allow for more robust protection. It has the word \"Warden\" written on the shoulders." icon_state = "warden_standard" worn_state = "warden_standard" - armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_SMALL + ) siemens_coefficient = 0.75 /obj/item/clothing/under/rank/warden/corp @@ -67,7 +73,9 @@ desc = "Someone who wears this means business." icon_state = "detective_standard" worn_state = "detective_standard" - armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_SMALL + ) siemens_coefficient = 0.75 /obj/item/clothing/under/det/black @@ -93,7 +101,9 @@ name = "head of security's uniform" icon_state = "hos_standard" worn_state = "hos_standard" - armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_SMALL + ) siemens_coefficient = 0.75 /obj/item/clothing/under/rank/head_of_security/corp diff --git a/code/modules/clothing/under/jobs/sol.dm b/code/modules/clothing/under/jobs/sol.dm index 5f9e18d7071..030257bcab0 100644 --- a/code/modules/clothing/under/jobs/sol.dm +++ b/code/modules/clothing/under/jobs/sol.dm @@ -6,7 +6,11 @@ icon_state = "sol_uniform" item_state = "sol_uniform" contained_sprite = 1 - armor = list(melee = 10, bullet = 10, laser = 10,energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_SMALL, + bullet = ARMOR_BALLISTIC_MINOR, + laser = ARMOR_LASER_MINOR + ) /obj/item/clothing/under/rank/fatigues/marine //regular sol navy marine fatigues name = "sol marine fatigues" diff --git a/code/modules/clothing/under/miscellaneous.dm b/code/modules/clothing/under/miscellaneous.dm index 2b7a596ab91..32e52852f2d 100644 --- a/code/modules/clothing/under/miscellaneous.dm +++ b/code/modules/clothing/under/miscellaneous.dm @@ -127,7 +127,15 @@ gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS - armor = list(melee = 100, bullet = 100, laser = 100,energy = 100, bomb = 100, bio = 100, rad = 100) + armor = list( + melee = ARMOR_MELEE_VERY_HIGH, + bullet = ARMOR_BALLISTIC_AP, + laser = ARMOR_LASER_HEAVY, + energy = ARMOR_ENERGY_SHIELDED, + bomb = ARMOR_BOMB_SHIELDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SHIELDED + ) cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE siemens_coefficient = 0 @@ -514,7 +522,9 @@ icon_state = "swatunder" //item_state = "swatunder" worn_state = "swatunder" - armor = list(melee = 10, bullet = 5, laser = 5,energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_MINOR + ) siemens_coefficient = 0.7 /obj/item/clothing/under/lance @@ -524,7 +534,9 @@ item_state = "lance_fatigues" worn_state = "lance_fatigues" body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_MINOR + ) siemens_coefficient = 0.7 /obj/item/clothing/under/dress/lance_dress diff --git a/code/modules/clothing/under/syndicate.dm b/code/modules/clothing/under/syndicate.dm index 7d506c87d7f..b704c5b89b8 100644 --- a/code/modules/clothing/under/syndicate.dm +++ b/code/modules/clothing/under/syndicate.dm @@ -5,7 +5,9 @@ item_state = "bl_suit" worn_state = "syndicate" has_sensor = 0 - armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list( + melee = ARMOR_MELEE_MINOR + ) siemens_coefficient = 0.75 /obj/item/clothing/under/syndicate/combat diff --git a/code/modules/heavy_vehicle/components/armor.dm b/code/modules/heavy_vehicle/components/armor.dm index b9a4a7feeb2..07c3009b486 100644 --- a/code/modules/heavy_vehicle/components/armor.dm +++ b/code/modules/heavy_vehicle/components/armor.dm @@ -1,27 +1,57 @@ -/*/datum/extension/armor/exosuit/apply_damage_modifications(damage, damage_type, damage_flags, mob/living/victim, armor_pen, silent = TRUE) - if(prob(get_blocked(damage_type, damage_flags, armor_pen) * 100)) //extra removal of sharp and edge on account of us being big robots - damage_flags &= ~(DAM_SHARP | DAM_EDGE) - . = ..()*/ - /obj/item/robot_parts/robot_component/armor/mech name = "exosuit armor plating" - armor = list(melee = 75, bullet = 33, laser = 50, energy = 10, bomb = 25, bio = 100, rad = 0) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_MINOR + ) origin_tech = list(TECH_MATERIAL = 1) +/obj/item/robot_parts/robot_component/armor/mech/Initialize() + . = ..() + AddComponent(/datum/component/armor, armor, ARMOR_TYPE_EXOSUIT) + /obj/item/robot_parts/robot_component/armor/mech/radproof name = "radiation-proof armor plating" desc = "A fully enclosed radiation hardened shell designed to protect the pilot from radiation." - armor = list(melee = 75, bullet = 33, laser = 50, energy = 25, bomb = 25, bio = 100, rad = 100) + armor = list( + melee = ARMOR_MELEE_RESISTANT, + bullet = ARMOR_BALLISTIC_PISTOL, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_PADDED, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SHIELDED + ) origin_tech = list(TECH_MATERIAL = 3) /obj/item/robot_parts/robot_component/armor/mech/em name = "EM-shielded armor plating" desc = "A shielded plating that sorrounds the eletronics and protects them from electromagnetic radiation." - armor = list(melee = 65, bullet = 20, laser = 25, energy = 100, bomb = 10, bio = 100, rad = 60) + armor = list( + melee = ARMOR_MELEE_RESISTANT , + bullet = ARMOR_BALLISTIC_SMALL, + laser = ARMOR_LASER_SMALL, + energy = ARMOR_ENERGY_SHIELDED, + bomb = ARMOR_BOMB_MINOR, + bio = ARMOR_BIO_SHIELDED, + rad = ARMOR_RAD_SMALL + ) origin_tech = list(TECH_MATERIAL = 3) /obj/item/robot_parts/robot_component/armor/mech/combat name = "heavy combat plating" desc = "Plating designed to deflect incoming attacks and explosions." - armor = list(melee = 85, bullet = 70, laser = 60, energy = 10, bomb = 70, bio = 100, rad = 0) + armor = list( + melee = ARMOR_MELEE_MAJOR, + bullet = ARMOR_BALLISTIC_RESISTANT, + laser = ARMOR_LASER_HANDGUNS, + energy = ARMOR_ENERGY_MINOR, + bomb = ARMOR_BOMB_RESISTANT, + bio = ARMOR_BIO_SHIELDED + ) origin_tech = list(TECH_MATERIAL = 5) \ No newline at end of file diff --git a/code/modules/heavy_vehicle/mech_damage.dm b/code/modules/heavy_vehicle/mech_damage.dm index aac10e42038..87bad9f9e3e 100644 --- a/code/modules/heavy_vehicle/mech_damage.dm +++ b/code/modules/heavy_vehicle/mech_damage.dm @@ -28,10 +28,12 @@ return pilot.hitby(AM, speed) . = ..() -/mob/living/heavy_vehicle/getarmor(var/def_zone, var/type) +/mob/living/heavy_vehicle/get_armors_by_zone(def_zone, damage_type, damage_flags) + . = ..() if(body && body.mech_armor) - return isnull(body.mech_armor.armor[type]) ? 0 : body.mech_armor.armor[type] - return 0 + var/body_armor = body.mech_armor.GetComponent(/datum/component/armor) + if(body_armor) + . += body_armor /mob/living/heavy_vehicle/updatehealth() maxHealth = body.mech_health @@ -72,10 +74,14 @@ else return body -/mob/living/heavy_vehicle/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/used_weapon = null, var/damage_flags) +/mob/living/heavy_vehicle/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/used_weapon = null, var/damage_flags, var/armor_pen, var/silent = FALSE) if(!damage) return 0 + var/list/after_armor = modify_damage_by_armor(def_zone, damage, damagetype, damage_flags, src, armor_pen, TRUE) + damage = after_armor[1] + damagetype = after_armor[2] + var/target = zoneToComponent(def_zone) //Only 2 types of damage concern mechs and vehicles switch(damagetype) @@ -129,3 +135,6 @@ playsound(loc, "sound/effects/bang.ogg", 100, 1) playsound(loc, "sound/effects/bamf.ogg", 100, 1) return TRUE + +/mob/living/heavy_vehicle/get_bullet_impact_effect_type(var/def_zone) + return BULLET_IMPACT_METAL diff --git a/code/modules/martial_arts/martial.dm b/code/modules/martial_arts/martial.dm index 353c03a60ea..80ba086334b 100644 --- a/code/modules/martial_arts/martial.dm +++ b/code/modules/martial_arts/martial.dm @@ -127,11 +127,9 @@ var/obj/item/clothing/gloves/force/X = A.gloves real_damage *= X.amplification - var/armor = D.run_armor_check(hit_zone, "melee") + attack.apply_effects(A, D, rand_damage, hit_zone) - attack.apply_effects(A, D, armor, rand_damage, hit_zone) - - D.apply_damage(real_damage, hit_dam_type, hit_zone, armor, damage_flags = damage_flags) + D.apply_damage(real_damage, hit_dam_type, hit_zone, damage_flags = damage_flags) return 1 diff --git a/code/modules/martial_arts/skrell.dm b/code/modules/martial_arts/skrell.dm index 2a325c410f7..efd92d2619d 100644 --- a/code/modules/martial_arts/skrell.dm +++ b/code/modules/martial_arts/skrell.dm @@ -36,8 +36,7 @@ A.visible_message("[A] strikes [D] with their open palm!") playsound(get_turf(A), /decl/sound_category/punch_sound, 50, 1, -1) var/obj/item/organ/external/affecting = D.get_organ(ran_zone(A.zone_sel.selecting)) - var/armor_block = D.run_armor_check(affecting, "melee") - D.apply_damage(25, PAIN, affecting, armor_block) + D.apply_damage(25, PAIN, affecting) return 1 /datum/martial_art/karak_virul/proc/dislocating_strike(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D) diff --git a/code/modules/martial_arts/tajara.dm b/code/modules/martial_arts/tajara.dm index 89e1c804b81..bc83030cad8 100644 --- a/code/modules/martial_arts/tajara.dm +++ b/code/modules/martial_arts/tajara.dm @@ -48,8 +48,7 @@ var/obj/item/organ/internal/eyes/eyes = D.get_eyes() eyes.take_damage(rand(3,4), 1) - var/armor = D.getarmor_organ(affecting,"melee") - D.apply_damage(10,BRUTE, BP_HEAD, armor, damage_flags = DAM_SHARP|DAM_EDGE) + D.apply_damage(10,BRUTE, BP_HEAD, damage_flags = DAM_SHARP|DAM_EDGE) return 1 @@ -58,8 +57,7 @@ A.visible_message("[A] lunges forwards and strikes [D] with their claws!") playsound(get_turf(A), 'sound/weapons/slice.ogg', 50, 1, -1) var/obj/item/organ/external/affecting = D.get_organ(ran_zone(A.zone_sel.selecting)) - var/armor_block = D.run_armor_check(affecting, "melee") - D.apply_damage(20, BRUTE, affecting, armor_block, damage_flags = DAM_SHARP|DAM_EDGE) + D.apply_damage(20, BRUTE, affecting, damage_flags = DAM_SHARP|DAM_EDGE) if(prob(20)) D.apply_effect(4, WEAKEN) return 1 @@ -69,9 +67,8 @@ return 0 A.do_attack_animation(D) var/obj/item/organ/external/organ = D.get_organ(A.zone_sel.selecting) - var/armor = D.getarmor_organ(organ,"melee") A.visible_message("[A] stabs [D]'s [organ.name] with their claws!") - D.apply_damage(organ.brute_dam, BRUTE, organ, armor, damage_flags = DAM_SHARP|DAM_EDGE) + D.apply_damage(organ.brute_dam, BRUTE, organ, damage_flags = DAM_SHARP|DAM_EDGE) return 1 /datum/martial_art/baghrar/harm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D) diff --git a/code/modules/martial_arts/vaurca.dm b/code/modules/martial_arts/vaurca.dm index 238a7787d38..302dce58752 100644 --- a/code/modules/martial_arts/vaurca.dm +++ b/code/modules/martial_arts/vaurca.dm @@ -73,10 +73,9 @@ if(istype(A.get_active_hand(),/obj/item/grab)) var/obj/item/grab/G = A.get_active_hand() if(G && G.affecting == D) - var/armor_block = D.run_armor_check(null, "melee") A.visible_message("[A] crushes [D] with its mandibles!") - D.apply_damage(30, BRUTE, null, armor_block) - D.apply_effect(6, WEAKEN, armor_block) + D.apply_damage(30, BRUTE) + D.apply_effect(6, WEAKEN) qdel(G) return 1 diff --git a/code/modules/martial_arts/wrestling.dm b/code/modules/martial_arts/wrestling.dm index 2aa041e6dee..1b1d5aed83b 100644 --- a/code/modules/martial_arts/wrestling.dm +++ b/code/modules/martial_arts/wrestling.dm @@ -22,17 +22,15 @@ D.visible_message("[A] suplexes [D]!") D.forceMove(A.loc) - var/armor_block = D.run_armor_check(null, "melee") - D.apply_damage(30, BRUTE, null, armor_block) - D.apply_effect(6, WEAKEN, armor_block) + D.apply_damage(30, BRUTE) + D.apply_effect(6, WEAKEN) add_logs(A, D, "suplexed") A.SpinAnimation(10,1) D.SpinAnimation(10,1) spawn(3) - armor_block = A.run_armor_check(null, "melee") - A.apply_effect(4, WEAKEN, armor_block) + A.apply_effect(4, WEAKEN) return /datum/martial_art/wrestling/disarm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D) @@ -48,8 +46,7 @@ D.grabbedby(A,1) D.visible_message("[A] holds [D] down!") var/obj/item/organ/external/affecting = D.get_organ(ran_zone(A.zone_sel.selecting)) - var/armor_block = D.run_armor_check(affecting, "melee") - D.apply_damage(40, PAIN, affecting, armor_block) + D.apply_damage(40, PAIN, affecting) return 1 /datum/martial_art/wrestling/proc/wrestling_help() diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index df5cb343ee4..d98317f8ca1 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -61,7 +61,7 @@ sleeping = 0 willfully_sleeping = FALSE -/mob/living/carbon/standard_weapon_hit_effects(obj/item/I, mob/living/user, var/effective_force, var/blocked, var/hit_zone) +/mob/living/carbon/standard_weapon_hit_effects(obj/item/I, mob/living/user, var/effective_force, var/hit_zone) var/t_him = "it" if (src.gender == MALE) t_him = "him" @@ -85,12 +85,12 @@ "You attack [src] with [I], but they do not respond... Maybe they have S.S.D?") else if(client && willfully_sleeping) user.visible_message("[user] attacked [src] with [I] waking [t_him] up!", \ - "You attack [src] with [I], waking [t_him] up!") + "You attack [src] with [I], waking [t_him] up!") sleeping = 0 willfully_sleeping = FALSE - if(!effective_force || blocked >= 100) + if(!effective_force) return 0 //Hulk modifier @@ -99,19 +99,14 @@ //Apply weapon damage var/damage_flags = I.damage_flags() - if(prob(blocked)) //armor provides a chance to turn sharp/edge weapon attacks into blunt ones - damage_flags &= ~DAM_SHARP - damage_flags &= ~DAM_EDGE - - apply_damage(effective_force, I.damtype, hit_zone, blocked, used_weapon=I, damage_flags = damage_flags) + apply_damage(effective_force, I.damtype, hit_zone, I, damage_flags) //Melee weapon embedded object code. if (I && I.damtype == BRUTE && !I.anchored && !is_robot_module(I)) var/damage = effective_force //just the effective damage used for sorting out embedding, no further damage is applied here - if (blocked) - damage *= BLOCKED_MULT(blocked) + damage *= 1 - get_blocked_ratio(hit_zone, I.damtype, I.damage_flags(), I.armor_penetration, I.force) - if (I.can_embed)//If this weapon is allowed to embed in people + if(I.can_embed)//If this weapon is allowed to embed in people //blunt objects should really not be embedding in things unless a huge amount of force is involved var/sharp = damage_flags & DAM_SHARP var/edge = damage_flags & DAM_EDGE diff --git a/code/modules/mob/living/carbon/human/diona_gestalt.dm b/code/modules/mob/living/carbon/human/diona_gestalt.dm index da0b3fc9b3b..4df6713336d 100644 --- a/code/modules/mob/living/carbon/human/diona_gestalt.dm +++ b/code/modules/mob/living/carbon/human/diona_gestalt.dm @@ -100,7 +100,7 @@ if (severity) damage_factor = (1 / severity) - var/armorval = getarmor(null, "bomb") + var/armorval = get_blocked_ratio(BP_CHEST, BRUTE, DAM_DISPERSED, damage = damage) if (armorval) damage_factor *= (1 - (armorval * 0.01)) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index dbe0bbfffaf..9f2fca3c919 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -233,15 +233,8 @@ if (1.0) b_loss += 500 f_loss = 100 - if (!prob(getarmor(null, "bomb"))) - gib() - return - else - var/atom/target = get_edge_target_turf(src, get_dir(src, get_step_away(src, src))) - throw_at(target, 200, 4) - //return -// var/atom/target = get_edge_target_turf(user, get_dir(src, get_step_away(user, src))) - //user.throw_at(target, 200, 4) + var/atom/target = get_edge_target_turf(src, get_dir(src, get_step_away(src, src))) + throw_at(target, 200, 4) if (2.0) b_loss = 60 @@ -261,46 +254,15 @@ if (prob(50)) Paralyse(10) - // factor in armor - var/protection = BLOCKED_MULT(getarmor(null, "bomb")) - b_loss *= protection - f_loss *= protection - - var/update = 0 - // focus most of the blast on one organ - var/obj/item/organ/external/take_blast = pick(organs) - update |= take_blast.take_damage(b_loss * 0.7, f_loss * 0.7, used_weapon = "Explosive blast") + apply_damage(0.7 * b_loss, BRUTE, null, DAM_EXPLODE, used_weapon = "Explosive blast") + apply_damage(0.7 * f_loss, BURN, null, DAM_EXPLODE, used_weapon = "Explosive blast") // distribute the remaining 30% on all limbs equally (including the one already dealt damage) - b_loss *= 0.3 - f_loss *= 0.3 + apply_damage(0.3 * b_loss, BRUTE, null, DAM_EXPLODE | DAM_DISPERSED, used_weapon = "Explosive blast") + apply_damage(0.3 * f_loss, BURN, null, DAM_EXPLODE | DAM_DISPERSED, used_weapon = "Explosive blast") - var/weapon_message = "Explosive Blast" - - for(var/obj/item/organ/external/temp in organs) - switch(temp.name) - if(BP_HEAD) - update |= temp.take_damage(b_loss * 0.2, f_loss * 0.2, used_weapon = weapon_message) - if(BP_CHEST) - update |= temp.take_damage(b_loss * 0.4, f_loss * 0.4, used_weapon = weapon_message) - if(BP_L_ARM) - update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message) - if(BP_R_ARM) - update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message) - if(BP_L_LEG) - update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message) - if(BP_R_LEG) - update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message) - if(BP_R_FOOT) - update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message) - if(BP_L_FOOT) - update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message) - if(BP_R_ARM) - update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message) - if(BP_L_ARM) - update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message) - if(update) UpdateDamageIcon() + UpdateDamageIcon() /mob/living/carbon/human/proc/implant_loyalty(mob/living/carbon/human/M, override = FALSE) // Won't override by default. if(!config.use_loyalty_implants && !override) return // Nuh-uh. @@ -1988,15 +1950,17 @@ return BULLET_IMPACT_METAL return BULLET_IMPACT_MEAT -/mob/living/carbon/human/bullet_impact_visuals(var/obj/item/projectile/P, var/def_zone, var/damage) +/mob/living/carbon/human/bullet_impact_visuals(var/obj/item/projectile/P, var/def_zone, var/damage, var/blocked_ratio) ..() + if(blocked_ratio > 0.7) + return switch(get_bullet_impact_effect_type(def_zone)) if(BULLET_IMPACT_MEAT) if(P.damage_type == BRUTE) var/hit_dir = get_dir(P.starting, src) var/obj/effect/decal/cleanable/blood/B = blood_splatter(get_step(src, hit_dir), src, 1, hit_dir) B.icon_state = pick("dir_splatter_1","dir_splatter_2") - var/scale = min(1, round(P.damage / 50, 0.2)) + var/scale = min(1, round(damage / 50, 0.2)) var/matrix/M = new() B.transform = M.Scale(scale) @@ -2011,9 +1975,9 @@ src.adjustToxLoss(-damage) to_chat(src, SPAN_NOTICE("You can feel flow of energy which makes you regenerate.")) - src.apply_effect((rand(15,30)),IRRADIATE,blocked = src.getarmor(null, "rad")) + apply_damage((rand(15,30)), IRRADIATE, damage_flags = DAM_DISPERSED) if(prob(4)) - src.apply_effect((rand(20,60)),IRRADIATE,blocked = src.getarmor(null, "rad")) + apply_damage((rand(20,60)), IRRADIATE, damage_flags = DAM_DISPERSED) if (prob(75)) randmutb(src) // Applies bad mutation domutcheck(src,null,MUTCHK_FORCED) diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index 333f1a18918..97d563c7877 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -52,9 +52,8 @@ msg_admin_attack("[key_name_admin(M)] stungloved [src.name] ([src.ckey]) (JMP)",ckey=key_name(M),ckey_target=key_name(src)) - var/armorblock = run_armor_check(M.zone_sel.selecting, "energy") - apply_effects(5,5,0,0,5,0,0,0,0,armorblock) - apply_damage(rand(5,25), BURN, M.zone_sel.selecting,armorblock) + apply_effects(5,5,0,0,5,0,0,0,0) + apply_damage(rand(5,25), BURN, M.zone_sel.selecting) if(prob(15)) playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1) @@ -84,7 +83,6 @@ visible_message("[H] has attempted to punch [src]!") return 0 var/obj/item/organ/external/affecting = get_organ(ran_zone(H.zone_sel.selecting)) - var/armor_block = run_armor_check(affecting, "melee") if(HULK in H.mutations) damage += 5 @@ -93,10 +91,10 @@ visible_message("[H] has punched [src]!") - apply_damage(damage, PAIN, affecting, armor_block) + apply_damage(damage, PAIN, affecting) if(damage >= 9) visible_message("[H] has weakened [src]!") - apply_effect(4, WEAKEN, armor_block) + apply_effect(4, WEAKEN) return @@ -284,12 +282,11 @@ var/obj/item/clothing/gloves/force/X = H.gloves real_damage *= X.amplification - var/armor = run_armor_check(hit_zone, "melee") // Apply additional unarmed effects. - attack.apply_effects(H, src, armor, rand_damage, hit_zone) + attack.apply_effects(H, src, rand_damage, hit_zone) // Finally, apply damage to target - apply_damage(real_damage, hit_dam_type, hit_zone, armor, damage_flags = damage_flags) + apply_damage(real_damage, hit_dam_type, hit_zone, damage_flags = damage_flags) if(M.resting && src.help_up_offer) @@ -375,7 +372,7 @@ var/randn = rand(1, 100) if(randn <= 25) if(H.gloves && istype(H.gloves,/obj/item/clothing/gloves/force)) - apply_effect(6, WEAKEN, run_armor_check(affecting, "melee")) + apply_effect(6, WEAKEN) playsound(loc, 'sound/weapons/push_connect.ogg', 50, 1, -1) visible_message("[M] hurls [src] to the floor!") step_away(src,M,15) @@ -384,7 +381,7 @@ return else - var/armor_check = run_armor_check(affecting, "melee") + var/armor_check = 100 * get_blocked_ratio(affecting, BRUTE, damage = 20) apply_effect(3, WEAKEN, armor_check) if(armor_check < 100) visible_message("[M] has pushed [src]!") @@ -406,7 +403,7 @@ sleep(1) step_away(src,M,15) sleep(1) - apply_effect(1, WEAKEN, run_armor_check(affecting, "melee")) + apply_effect(1, WEAKEN, get_blocked_ratio(M.zone_sel.selecting, BRUTE, damage = 20)*100) return //See about breaking grips or pulls @@ -506,8 +503,7 @@ if(!dam_zone) dam_zone = pick(organs) var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone)) - var/armor_block = run_armor_check(affecting, "melee") - apply_damage(damage, BRUTE, affecting, armor_block) + apply_damage(damage, BRUTE, affecting) updatehealth() return TRUE diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index aaa9c675607..eea67b57c2f 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -20,7 +20,6 @@ ChangeToHusk() UpdateDamageIcon() // to fix that darn overlay bug - return /mob/living/carbon/human/proc/get_total_health() var/amount = maxHealth - getFireLoss() - getBruteLoss() - getOxyLoss() - getToxLoss() - getBrainLoss() @@ -323,7 +322,8 @@ In most cases it makes more sense to use apply_damage() instead! And make sure t updatehealth() BITSET(hud_updateflag, HEALTH_HUD) speech_problem_flag = 1 - if(update) UpdateDamageIcon() + if(update) + UpdateDamageIcon() // damage MANY external organs, in random order /mob/living/carbon/human/take_overall_damage(var/brute, var/burn, var/damage_flags, var/used_weapon = null) @@ -383,63 +383,76 @@ This function restores all organs. zone = BP_HEAD return organs_by_name[zone] -/mob/living/carbon/human/apply_damage(var/damage = 0, var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/obj/used_weapon = null, var/damage_flags) - //visible_message("Hit debug. [damage] | [damagetype] | [def_zone] | [blocked] | [sharp] | [used_weapon]") +/mob/living/carbon/human/apply_damage(var/damage = 0, var/damagetype = BRUTE, var/def_zone, var/obj/used_weapon, var/damage_flags, var/armor_pen, var/silent = FALSE) if (invisibility == INVISIBILITY_LEVEL_TWO && back && (istype(back, /obj/item/rig))) if(damage > 0) to_chat(src, "You are now visible.") src.invisibility = 0 + var/obj/item/organ/external/organ = get_organ(def_zone) + if(!organ) + if(isorgan(def_zone)) + organ = def_zone + else + if(!def_zone) + if(damage_flags & DAM_DISPERSED) + var/old_damage = damage + var/tally + silent = TRUE // Will damage a lot of organs, probably, so avoid spam. + for(var/zone in organ_rel_size) + tally += organ_rel_size[zone] + for(var/zone in organ_rel_size) + damage = old_damage * organ_rel_size[zone]/tally + def_zone = zone + . = .() || . + return + def_zone = ran_zone(def_zone) + organ = get_organ(check_zone(def_zone)) + //Handle other types of damage - if(damagetype != BRUTE && damagetype != BURN) + if(!(damagetype in list(BRUTE, BURN, PAIN, CLONE))) if(!stat && damagetype == PAIN) if((damage > 25 && prob(20)) || (damage > 50 && prob(60))) emote("scream") + return ..() - ..(damage, damagetype, def_zone, blocked) - return 1 + if(!organ) + return FALSE - //Handle BRUTE and BURN damage handle_suit_punctures(damagetype, damage, def_zone) - if(blocked >= 100) - return 0 - - var/obj/item/organ/external/organ = null - if(isorgan(def_zone)) - organ = def_zone - else - if(!def_zone) def_zone = ran_zone(def_zone) - organ = get_organ(check_zone(def_zone)) - if(!organ) - return 0 - - if(blocked) - damage *= BLOCKED_MULT(blocked) + var/list/after_armor = modify_damage_by_armor(def_zone, damage, damagetype, damage_flags, src, armor_pen, silent) + damage = after_armor[1] + damagetype = after_armor[2] + damage_flags = after_armor[3] + if(!damage) + return FALSE if(damage > 15 && prob(damage*4) && organ.can_feel_pain()) make_adrenaline(round(damage/10)) switch(damagetype) - if(BRUTE) damageoverlaytemp = 20 if(damage > 0) damage *= species.brute_mod - if(organ.take_damage(damage, 0, damage_flags, used_weapon)) - UpdateDamageIcon() - + organ.take_damage(damage, 0, damage_flags, used_weapon) + UpdateDamageIcon() if(BURN) damageoverlaytemp = 20 if(damage > 0) damage *= species.burn_mod - if(organ.take_damage(0, damage, damage_flags, used_weapon)) - UpdateDamageIcon() + organ.take_damage(0, damage, damage_flags, used_weapon) + UpdateDamageIcon() + if(PAIN) + organ.add_pain(damage) + if(CLONE) + organ.add_genetic_damage(damage) // Will set our damageoverlay icon to the next level, which will then be set back to the normal level the next mob.Life(). updatehealth() BITSET(hud_updateflag, HEALTH_HUD) - return 1 + return TRUE /mob/living/carbon/human/apply_radiation(var/rads) if(species && rads > 0) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index dbf87ad6c27..19e58a4ac1d 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -43,11 +43,13 @@ emp_act //Shrapnel if(!(species.flags & NO_EMBED) && P.can_embed()) - var/armor = getarmor_organ(organ, "bullet") + var/armor = get_blocked_ratio(def_zone, BRUTE, P.damage_flags(), armor_pen = P.armor_penetration, damage = P.damage)*100 if(prob(20 + max(P.damage + P.embed_chance - armor, -10))) P.do_embed(organ) - return (..(P , def_zone)) + var/blocked = ..(P, def_zone) + + return blocked /mob/living/carbon/human/stun_effect_act(var/stun_amount, var/agony_amount, var/def_zone) var/obj/item/organ/external/affected = get_organ(check_zone(def_zone)) @@ -78,27 +80,37 @@ emp_act ..(stun_amount, agony_amount, def_zone) -/mob/living/carbon/human/getarmor(var/def_zone, var/type) - var/armorval = 0 - var/total = 0 +/mob/living/carbon/human/get_blocked_ratio(def_zone, damage_type, damage_flags, armor_pen, damage) + if(!def_zone && (damage_flags & DAM_DISPERSED)) + var/tally + for(var/zone in organ_rel_size) + tally += organ_rel_size[zone] + for(var/zone in organ_rel_size) + def_zone = zone + . += .() * organ_rel_size/tally + return + return ..() - if(def_zone) - if(isorgan(def_zone)) - return getarmor_organ(def_zone, type) - var/obj/item/organ/external/affecting = get_organ(def_zone) - if(affecting) - return getarmor_organ(affecting, type) - //If a specific bodypart is targetted, check how that bodypart is protected and return the value. - - //If you don't specify a bodypart, it checks ALL your bodyparts for protection, and averages out the values - for(var/organ_name in organs_by_name) - if (organ_name in organ_rel_size) - var/obj/item/organ/external/organ = organs_by_name[organ_name] - if(organ) - var/weight = organ_rel_size[organ_name] - armorval += getarmor_organ(organ, type) * weight - total += weight - return (armorval/max(total, 1)) +/mob/living/carbon/human/get_armors_by_zone(obj/item/organ/external/def_zone, damage_type, damage_flags) + . = ..() + if(!def_zone) + def_zone = ran_zone() + if(!istype(def_zone)) + def_zone = get_organ(check_zone(def_zone)) + if(!def_zone) + return + var/list/protective_gear = list(head, wear_mask, wear_suit, w_uniform, gloves, shoes) + for(var/obj/item/clothing/gear in protective_gear) + if(gear.accessories && length(gear.accessories)) + for(var/obj/item/clothing/accessory/bling in gear.accessories) + if(bling.body_parts_covered & def_zone.body_part) + var/armor = bling.GetComponent(/datum/component/armor) + if(armor) + . += armor + if(gear.body_parts_covered & def_zone.body_part) + var/armor = gear.GetComponent(/datum/component/armor) + if(armor) + . += armor //this proc returns the Siemens coefficient of electrical resistivity for a particular external organ. /mob/living/carbon/human/proc/get_siemens_coefficient_organ(var/obj/item/organ/external/def_zone) @@ -123,30 +135,16 @@ emp_act results.Add(C) return results -//this proc returns the armor value for a particular external organ. -/mob/living/carbon/human/proc/getarmor_organ(var/obj/item/organ/external/def_zone, var/type) - if(!type || !def_zone) return 0 - var/protection = 0 - var/list/protective_gear = list(head, wear_mask, wear_suit, w_uniform, gloves, shoes) - for(var/obj/item/clothing/gear in protective_gear) - if(!isnull(gear.armor) && gear.body_parts_covered & def_zone.body_part) - protection = add_armor(protection, gear.armor[type]) - for(var/obj/item/clothing/accessory/A in gear.accessories) - if(!isnull(A.armor) && A.body_parts_covered & def_zone.body_part) - protection = add_armor(protection, A.armor[type]) - - return protection - /mob/living/carbon/human/proc/check_head_coverage() - var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform) for(var/bp in body_parts) - if(!bp) continue + if(!bp) + continue if(bp && istype(bp ,/obj/item/clothing)) var/obj/item/clothing/C = bp if(C.body_parts_covered & HEAD) - return 1 - return 0 + return TRUE + return FALSE /mob/living/carbon/human/proc/check_head_airtight_coverage() var/list/clothing = list(head, wear_mask, wear_suit) @@ -231,19 +229,18 @@ emp_act if(user == src) // Attacking yourself can't miss target_zone = user.zone_sel.selecting - if(!target_zone) - visible_message("[user] misses [src] with \the [I]!") - return 0 - //var/obj/item/organ/external/affecting = get_organ(target_zone) + if(!hit_zone) + visible_message("[user] misses [src] with \the [I]!") + return if(check_shields(I.force, I, user, target_zone, "the [I.name]")) - return null + return var/obj/item/organ/external/affecting = get_organ(hit_zone) if (!affecting || affecting.is_stump()) to_chat(user, "They are missing that limb!") - return null + return return hit_zone @@ -253,13 +250,9 @@ emp_act return //should be prevented by attacked_with_item() but for sanity. visible_message("[src] has been [LAZYPICK(I.attack_verb, "attacked")] in the [affecting.name] with [I] by [user]!") + return standard_weapon_hit_effects(I, user, effective_force, hit_zone) - var/blocked = run_armor_check(hit_zone, "melee", I.armor_penetration, "Your armor has protected your [affecting.name].", "Your armor has softened the blow to your [affecting.name].") - standard_weapon_hit_effects(I, user, effective_force, blocked, hit_zone) - - return blocked - -/mob/living/carbon/human/standard_weapon_hit_effects(obj/item/I, mob/living/user, var/effective_force, var/blocked, var/hit_zone) +/mob/living/carbon/human/standard_weapon_hit_effects(obj/item/I, mob/living/user, var/effective_force, var/hit_zone) var/obj/item/organ/external/affecting = get_organ(hit_zone) if(!affecting) return 0 @@ -273,23 +266,21 @@ emp_act // Handle striking to cripple. if(user.a_intent == I_DISARM) effective_force /= 2 //half the effective force - if(!..(I, user, effective_force, blocked, hit_zone)) - return 0 + if(!..(I, user, effective_force, hit_zone)) + return FALSE attack_joint(affecting, I, blocked) //but can dislocate joints + else if(!..()) - return 0 + return FALSE // forceglove amplification - if(istype(user, /mob/living/carbon/human)) + if(ishuman(user)) var/mob/living/carbon/human/X = user if(X.gloves && istype(X.gloves,/obj/item/clothing/gloves/force)) var/obj/item/clothing/gloves/force/G = X.gloves effective_force *= G.amplification - if(effective_force > 10 || effective_force >= 5 && prob(33)) - forcesay(hit_appends) //forcesay checks stat already - if((I.damtype == BRUTE || I.damtype == PAIN) && prob(25 + (effective_force * 2))) if(!stat) if(headcheck(hit_zone)) @@ -326,7 +317,7 @@ emp_act if(BP_CHEST) bloody_body(src) - return 1 + return TRUE /mob/living/carbon/human/proc/attack_joint(var/obj/item/organ/external/organ, var/obj/item/W, var/blocked) if(!organ || (organ.dislocated == 2) || (organ.dislocated == -1) || blocked >= 100) @@ -396,12 +387,8 @@ emp_act var/obj/item/organ/external/affecting = get_organ(zone) var/hit_area = affecting.name - src.visible_message("[src] has been hit in the [hit_area] by [O].", "You're hit in the [hit_area] by [O]!") - var/armor = run_armor_check(affecting, "melee", O.armor_penetration, "Your armor has protected your [hit_area].", "Your armor has softened the hit to your [hit_area].") //I guess "melee" is the best fit here - - if(armor < 100) - var/damage_flags = O.damage_flags() - apply_damage(throw_damage, dtype, zone, armor, O, damage_flags = damage_flags) + src.visible_message("[src] has been hit in the [hit_area] by [O].", "You're hit in the [hit_area] by [O]!") + apply_damage(throw_damage, dtype, zone, used_weapon = O, damage_flags = O.damage_flags(), armor_pen = O.armor_penetration) if(ismob(O.thrower)) var/mob/M = O.thrower @@ -418,12 +405,11 @@ emp_act if (!is_robot_module(I)) var/sharp = is_sharp(I) var/damage = throw_damage - if (armor) - damage *= BLOCKED_MULT(armor) + damage *= (1 - get_blocked_ratio(zone, BRUTE, O.damage_flags(), O.armor_penetration, damage)) //blunt objects should really not be embedding in things unless a huge amount of force is involved - var/embed_chance = sharp? damage/I.w_class : damage/(I.w_class*3) - var/embed_threshold = sharp? 5*I.w_class : 15*I.w_class + var/embed_chance = sharp ? damage/I.w_class : damage/(I.w_class*3) + var/embed_threshold = sharp ? 5*I.w_class : 15*I.w_class //Sharp objects will always embed if they do enough damage. //Thrown sharp objects have some momentum already and have a small chance to embed even if the damage is below the threshold @@ -432,7 +418,7 @@ emp_act // Begin BS12 momentum-transfer code. var/mass = 1.5 - if(istype(O, /obj/item)) + if(isitem(O)) var/obj/item/I = O mass = I.w_class/THROWNOBJ_KNOCKBACK_DIVISOR var/momentum = speed*mass diff --git a/code/modules/mob/living/carbon/human/human_powers.dm b/code/modules/mob/living/carbon/human/human_powers.dm index 24ae0d24a20..d1dfcc8cfc8 100644 --- a/code/modules/mob/living/carbon/human/human_powers.dm +++ b/code/modules/mob/living/carbon/human/human_powers.dm @@ -1018,11 +1018,11 @@ mob/living/carbon/human/proc/change_monitor() last_special = world.time + 20 - src.drop_from_inventory(O) + drop_from_inventory(O) O.replaced(src) - src.update_body() - src.updatehealth() - src.UpdateDamageIcon() + update_body() + updatehealth() + UpdateDamageIcon() update_body() updatehealth() diff --git a/code/modules/mob/living/carbon/human/species/species_attack.dm b/code/modules/mob/living/carbon/human/species/species_attack.dm index e3374f19193..5d489d85009 100644 --- a/code/modules/mob/living/carbon/human/species/species_attack.dm +++ b/code/modules/mob/living/carbon/human/species/species_attack.dm @@ -2,8 +2,8 @@ attack_verb = list("bit", "chomped on") attack_sound = 'sound/weapons/bite.ogg' shredding = 0 - sharp = 1 - edge = 1 + sharp = TRUE + edge = TRUE damage = 5 attack_name = "sharp bite" @@ -21,8 +21,8 @@ eye_attack_text_victim = "sharp claws" attack_sound = 'sound/weapons/slice.ogg' miss_sound = 'sound/weapons/slashmiss.ogg' - sharp = 1 - edge = 1 + sharp = TRUE + edge = TRUE damage = 5 attack_name = "claws" @@ -64,13 +64,13 @@ /datum/unarmed_attack/claws/strong attack_verb = list("slashed") damage = 10 - shredding = 1 + shredding = TRUE attack_name = "strong claws" /datum/unarmed_attack/bite/strong attack_verb = list("mauled") damage = 10 - shredding = 1 + shredding = TRUE attack_name = "strong bite" /datum/unarmed_attack/slime_glomp @@ -110,7 +110,7 @@ damage = 7 attack_sound = 'sound/weapons/smash.ogg' attack_name = "heavy fist" - shredding = 1 + shredding = TRUE /datum/unarmed_attack/industrial/heavy damage = 9 @@ -125,7 +125,7 @@ damage = 12 attack_sound = 'sound/weapons/beartrap_shut.ogg' attack_name = "power fist" - shredding = 1 + shredding = TRUE /datum/unarmed_attack/terminator/apply_effects(var/mob/living/carbon/human/user,var/mob/living/carbon/human/target,var/armor,var/attack_damage,var/zone) ..() @@ -148,10 +148,10 @@ attack_verb = list("cleaved", "plowed", "swiped") attack_noun = list("massive claws") damage = 25 - sharp = 1 - edge = 1 + sharp = TRUE + edge = TRUE attack_name = "massive claws" - shredding = 1 + shredding = TRUE /datum/unarmed_attack/claws/cleave/apply_effects(var/mob/living/carbon/human/user,var/mob/living/carbon/human/target,var/armor,var/attack_damage,var/zone) ..() @@ -172,9 +172,9 @@ attack_verb = list("mauled","gored","perforated") attack_noun = list("mandibles") damage = 35 - shredding = 1 - sharp = 1 - edge = 1 + shredding = TRUE + sharp = TRUE + edge = TRUE attack_name = "mandibles" /datum/unarmed_attack/bite/infectious @@ -188,7 +188,7 @@ to_chat(user, SPAN_WARNING("You feel that \the [target] has been already infected!")) var/infection_chance = 80 - infection_chance -= target.run_armor_check(zone,"melee") + infection_chance -= target.get_blocked_ratio(zone, BRUTE, damage_flags = DAM_SHARP|DAM_EDGE, damage = damage)*100 if(prob(infection_chance)) if(target.reagents) var/trioxin_amount = REAGENT_VOLUME(target.reagents, /decl/reagent/toxin/trioxin) @@ -200,7 +200,7 @@ damage = 15 attack_sound = 'sound/weapons/heavysmash.ogg' attack_name = "crushing fist" - shredding = 1 + shredding = TRUE /datum/unarmed_attack/shocking attack_verb = list("prodded", "touched") diff --git a/code/modules/mob/living/carbon/human/species/station/golem.dm b/code/modules/mob/living/carbon/human/species/station/golem.dm index 43c2c974a39..3944d52343b 100644 --- a/code/modules/mob/living/carbon/human/species/station/golem.dm +++ b/code/modules/mob/living/carbon/human/species/station/golem.dm @@ -766,7 +766,7 @@ var/global/list/golem_types = list(SPECIES_GOLEM_COAL, /datum/species/golem/uranium/handle_environment_special(var/mob/living/carbon/human/H) if(prob(25)) for(var/mob/living/L in view(7, H)) - L.apply_effect(150, IRRADIATE, blocked = L.getarmor(null, "rad")) + L.apply_damage(150, IRRADIATE, damage_flags = DAM_DISPERSED) /datum/species/golem/homunculus name = SPECIES_GOLEM_MEAT diff --git a/code/modules/mob/living/carbon/human/unarmed_attack.dm b/code/modules/mob/living/carbon/human/unarmed_attack.dm index 600e8f6b96e..e3909b694a0 100644 --- a/code/modules/mob/living/carbon/human/unarmed_attack.dm +++ b/code/modules/mob/living/carbon/human/unarmed_attack.dm @@ -43,18 +43,19 @@ var/global/list/sparring_attack_cache = list() /datum/unarmed_attack/proc/get_unarmed_damage() return damage -/datum/unarmed_attack/proc/apply_effects(var/mob/living/carbon/human/user,var/mob/living/carbon/human/target,var/armor,var/attack_damage,var/zone) +/datum/unarmed_attack/proc/apply_effects(var/mob/living/carbon/human/user,var/mob/living/carbon/human/target,var/attack_damage,var/zone) if(target.stat == DEAD) return var/stun_chance = rand(0, 100) + var/armor = target.get_blocked_ratio(zone, BRUTE) var/pain_message = TRUE if(!target.can_feel_pain()) pain_message = FALSE - if(attack_damage >= 5 && armor < 100 && !(target == user) && stun_chance <= attack_damage * 5) // 25% standard chance + if(attack_damage >= 5 && armor < 1 && !(target == user) && stun_chance <= attack_damage * 5) // 25% standard chance switch(zone) // strong punches can have effects depending on where they hit if(BP_HEAD, BP_MOUTH, BP_EYES) // Induce blurriness @@ -92,12 +93,12 @@ var/global/list/sparring_attack_cache = list() if(pain_message) target.visible_message("[target] gives way slightly.") target.apply_effect(attack_damage*3, PAIN, armor) - else if(attack_damage >= 5 && !(target == user) && (stun_chance + attack_damage * 5 >= 100) && armor < 100) // Chance to get the usual throwdown as well (25% standard chance) + else if(attack_damage >= 5 && !(target == user) && (stun_chance + attack_damage * 5 >= 100) && armor < 1) // Chance to get the usual throwdown as well (25% standard chance) if(!target.lying) target.visible_message("[target] [pick("slumps", "falls", "drops")] down to the ground!") else target.visible_message("[target] has been weakened!") - target.apply_effect(3, WEAKEN, armor) + target.apply_effect(3, WEAKEN, armor*100) /datum/unarmed_attack/proc/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage) var/obj/item/organ/external/affecting = target.get_organ(zone) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 5fb5ecedc3d..5fc8f70490e 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -183,7 +183,7 @@ There are several things that need to be remembered: //DAMAGE OVERLAYS //constructs damage icon for each organ from mask * damage field and saves it in our overlays_raw list (as a list of icons). -/mob/living/carbon/human/UpdateDamageIcon(var/update_icons=1) +/mob/living/carbon/human/UpdateDamageIcon(var/update_icons = 1) // first check whether something actually changed about damage appearance var/damage_appearance = "" diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm index 65825a57d83..260e80f4038 100644 --- a/code/modules/mob/living/damage_procs.dm +++ b/code/modules/mob/living/damage_procs.dm @@ -8,36 +8,46 @@ standard 0 if fail */ -/mob/living/proc/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/used_weapon = null, var/damage_flags) - if(!damage || (blocked >= 100)) - return 0 +/mob/living/proc/apply_damage(var/damage = 0, var/damagetype = BRUTE, var/def_zone, var/used_weapon, var/damage_flags = 0, var/armor_pen, var/silent = FALSE) + if(!damage) + return FALSE + + var/list/after_armor = modify_damage_by_armor(def_zone, damage, damagetype, damage_flags, src, armor_pen, silent) + damage = after_armor[1] + damagetype = after_armor[2] + damage_flags = after_armor[3] // args modifications in case of parent calls + if(!damage) + return FALSE + switch(damagetype) if(BRUTE) - adjustBruteLoss(damage * BLOCKED_MULT(blocked)) + adjustBruteLoss(damage) if(BURN) if(COLD_RESISTANCE in mutations) damage = 0 - adjustFireLoss(damage * BLOCKED_MULT(blocked)) + adjustFireLoss(damage) if(TOX) - adjustToxLoss(damage * BLOCKED_MULT(blocked)) + adjustToxLoss(damage) if(OXY) - adjustOxyLoss(damage * BLOCKED_MULT(blocked)) + adjustOxyLoss(damage) if(CLONE) - adjustCloneLoss(damage * BLOCKED_MULT(blocked)) + adjustCloneLoss(damage) if(PAIN) - adjustHalLoss(damage * BLOCKED_MULT(blocked)) - updatehealth() - return 1 + adjustHalLoss(damage) + if(IRRADIATE) + apply_radiation(damage) -/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 + updatehealth() + return TRUE + +/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, var/damage_flags = 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, PAIN, def_zone, blocked) - return 1 + return TRUE /mob/living/proc/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0) if(!effect || (blocked >= 100)) return 0 @@ -50,9 +60,6 @@ Paralyse(effect * BLOCKED_MULT(blocked)) if(PAIN) adjustHalLoss(effect * BLOCKED_MULT(blocked)) //Changed this to use the wrapper function, it shouldn't directly alter the value - if(IRRADIATE) - var/rad_protection = blocked ? getarmor(null, "rad")/100 : 0 - apply_radiation(max((1-rad_protection) * BLOCKED_MULT(blocked),0))//Rads auto check armor if(STUTTER) if(status_flags & CANSTUN) // stun is usually associated with stutter stuttering = max(stuttering, effect * BLOCKED_MULT(blocked)) @@ -71,7 +78,6 @@ if(stun) apply_effect(stun, STUN, blocked) if(weaken) apply_effect(weaken, WEAKEN, blocked) if(paralyze) apply_effect(paralyze, PARALYZE, blocked) - if(irradiate) apply_effect(irradiate, IRRADIATE, blocked) if(stutter) apply_effect(stutter, STUTTER, blocked) if(eyeblur) apply_effect(eyeblur, EYE_BLUR, blocked) if(drowsy) apply_effect(drowsy, DROWSY, blocked) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 03a24bf187a..92aa0b797c6 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -1,58 +1,23 @@ +/mob/living/proc/modify_damage_by_armor(def_zone, damage, damage_type, damage_flags, mob/living/victim, armor_pen, silent = FALSE) + var/list/armors = get_armors_by_zone(def_zone, damage_type, damage_flags) + . = args.Copy(2) + for(var/armor in armors) + var/datum/component/armor/armor_datum = armor + . = armor_datum.apply_damage_modifications(arglist(.)) -/* - run_armor_check() args - def_zone - What part is getting hit, if null will check entire body - attack_flag - The type of armor to be checked - armor_pen - reduces the effectiveness of armor - absorb_text - shown if the armor check is 100% successful - soften_text - shown if the armor check is more than 0% successful and less than 100% - Returns - a blocked amount between 0 - 100, representing the success of the armor check. -*/ -#define MOB_FIRE_LIGHT_RANGE 3 //These control the intensity and range of light given off by a mob which is on fire -#define MOB_FIRE_LIGHT_POWER 2 - -/mob/living/proc/run_armor_check(var/def_zone = null, var/attack_flag = "melee", var/armor_pen = 0, var/absorb_text = null, var/soften_text = null) - if(armor_pen >= 100) - return 0 //might as well just skip the processing - - var/armor = getarmor(def_zone, attack_flag) - - if(armor_pen >= armor) - return 0 //effective_armor is going to be 0 - - var/blocked = (armor - armor_pen) - - if(blocked >= 100) - if(absorb_text) - show_message("[absorb_text]") - else - show_message("Your armor absorbs the blow!") - return 100 - - if(blocked > 20) - //Should we show this every single time? - if(soften_text) - show_message("[soften_text]") - else - show_message("Your armor softens the blow!") - - return round(blocked, 1) - -//Adds two armor values together. -//If armor_a and armor_b are between 0-100 the result will always also be between 0-100. -/proc/add_armor(var/armor_a, var/armor_b) - if(armor_a >= 100 || armor_b >= 100) - return 100 //adding to infinite protection doesn't make it any bigger - - var/protection_a = 1/(BLOCKED_MULT(armor_a)) - 1 - var/protection_b = 1/(BLOCKED_MULT(armor_b)) - 1 - return 100 - 1/(protection_a + protection_b + 1)*100 - -//if null is passed for def_zone, then this should return something appropriate for all zones (e.g. area effect damage) -/mob/living/proc/getarmor(var/def_zone, var/type) - return 0 +/mob/living/proc/get_blocked_ratio(def_zone, damage_type, damage_flags, armor_pen, damage) + var/list/armors = get_armors_by_zone(def_zone, damage_type, damage_flags) + . = 0 + for(var/armor in armors) + var/datum/component/armor/armor_datum = armor + . = 1 - (1 - .) * (1 - armor_datum.get_blocked(damage_type, damage_flags, armor_pen, damage)) // multiply the amount we let through + . = min(1, .) +/mob/living/proc/get_armors_by_zone(def_zone, damage_type, damage_flags) + . = list() + var/natural_armor = GetComponent(/datum/component/armor) + if(natural_armor) + . += natural_armor /mob/living/bullet_act(var/obj/item/projectile/P, var/def_zone, var/used_weapon = null) @@ -80,19 +45,15 @@ return //Armor - var/absorb = run_armor_check(def_zone, P.check_armor, P.armor_penetration) + var/damage = P.damage + var/flags = P.damage_flags() var/damaged - if(prob(absorb)) - if(P.damage_flags & DAM_SHARP || P.damage_flags & DAM_SHARP || P.damage_flags & DAM_LASER) - P.damage_flags &= ~DAM_SHARP - P.damage_flags &= ~DAM_EDGE - P.damage_flags &= ~DAM_LASER - if(!P.nodamage) - damaged = apply_damage(P.damage, P.damage_type, def_zone, absorb, 0, P, damage_flags = P.damage_flags, used_weapon = P) - bullet_impact_visuals(P, def_zone, damaged) - P.on_hit(src, absorb, def_zone) - return absorb + damaged = apply_damage(damage, P.damage_type, def_zone, damage_flags = P.damage_flags(), used_weapon = P, armor_pen = P.armor_penetration) + if(damaged || P.nodamage) // Run the block computation if we did damage or if we only use armor for effects (nodamage) + . = get_blocked_ratio(def_zone, P.damage_type, flags, P.armor_penetration, P.damage) + bullet_impact_visuals(P, def_zone, damage, .) + P.on_hit(src, ., def_zone) /mob/living/proc/aura_check(var/type) if(!auras) @@ -117,7 +78,7 @@ break //For visuals, blood splatters and so on. -/mob/living/proc/bullet_impact_visuals(var/obj/item/projectile/P, var/def_zone, var/damage) +/mob/living/proc/bullet_impact_visuals(var/obj/item/projectile/P, var/def_zone, var/damage, var/blocked_ratio) var/list/impact_sounds = LAZYACCESS(P.impact_sounds, get_bullet_impact_effect_type(def_zone)) if(length(impact_sounds)) playsound(src, pick(impact_sounds), 75) @@ -136,7 +97,7 @@ apply_effect(stun_amount, EYE_BLUR) if(agony_amount) - apply_damage(agony_amount, PAIN, def_zone, 0, used_weapon) + apply_damage(agony_amount, PAIN, def_zone, 0, used_weapon = used_weapon) apply_effect(agony_amount / 10, STUTTER) apply_effect(agony_amount / 10, EYE_BLUR) @@ -159,8 +120,7 @@ /mob/living/proc/hit_with_weapon(obj/item/I, mob/living/user, var/effective_force, var/hit_zone, var/ground_zero) visible_message("[src] has been [LAZYPICK(I.attack_verb,"attacked")] with [I] by [user]!") - var/blocked = run_armor_check(hit_zone, "melee") - standard_weapon_hit_effects(I, user, effective_force, blocked, hit_zone) + . = standard_weapon_hit_effects(I, user, effective_force, hit_zone) if(I.damtype == BRUTE && prob(33) && I.force) // Added blood for whacking non-humans too var/turf/simulated/location = get_turf(src) @@ -169,9 +129,9 @@ return blocked //returns 0 if the effects failed to apply for some reason, 1 otherwise. -/mob/living/proc/standard_weapon_hit_effects(obj/item/I, mob/living/user, var/effective_force, var/blocked, var/hit_zone) +/mob/living/proc/standard_weapon_hit_effects(obj/item/I, mob/living/user, var/effective_force, var/hit_zone) if(!effective_force || blocked >= 100) - return 0 + return FALSE //Hulk modifier if(HULK in user.mutations) @@ -185,13 +145,13 @@ apply_damage(effective_force, I.damtype, hit_zone, blocked, used_weapon=I, damage_flags = damage_flags) - return 1 + return TRUE //this proc handles being hit by a thrown atom /mob/living/hitby(atom/movable/AM, var/speed = THROWFORCE_SPEED_DIVISOR)//Standardization and logging -Sieve if(!aura_check(AURA_TYPE_THROWN, AM, speed)) return - if(istype(AM,/obj/)) + if(isobj(AM)) var/obj/O = AM var/dtype = O.damtype var/throw_damage = O.throwforce*(speed/THROWFORCE_SPEED_DIVISOR) @@ -207,10 +167,7 @@ return src.visible_message("[src] has been hit by [O].") - var/armor = run_armor_check(null, "melee") - - var/damage_flags = O.damage_flags() - apply_damage(throw_damage, dtype, null, armor, O, damage_flags = damage_flags) + apply_damage(throw_damage, dtype, null, damage_flags = O.damage_flags(), used_weapon = O) O.throwing = 0 //it hit, so stop moving @@ -236,7 +193,8 @@ visible_message("[src] staggers under the impact!","You stagger under the impact!") src.throw_at(get_edge_target_turf(src,dir),1,momentum) - if(!O || !src) return + if(!O || !src) + return if(O.sharp) //Projectile is suitable for pinning. //Handles embedding for non-humans and simple_animals. @@ -301,6 +259,9 @@ return FALSE +#define MOB_FIRE_LIGHT_RANGE 3 //These control the intensity and range of light given off by a mob which is on fire +#define MOB_FIRE_LIGHT_POWER 2 + /mob/living/proc/set_on_fire() to_chat(src, SPAN_DANGER(FONT_LARGE("You're set on fire!"))) on_fire = TRUE diff --git a/code/modules/mob/living/silicon/robot/items/electric_arm.dm b/code/modules/mob/living/silicon/robot/items/electric_arm.dm index 381e016e54e..2b21b7ba738 100644 --- a/code/modules/mob/living/silicon/robot/items/electric_arm.dm +++ b/code/modules/mob/living/silicon/robot/items/electric_arm.dm @@ -17,8 +17,4 @@ M.apply_effect(5, STUTTER) M.stun_effect_act(0, 70, check_zone(hit_zone), src) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - H.forcesay(hit_appends) - return FALSE \ No newline at end of file diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index a90be690727..82a6723d734 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -282,22 +282,14 @@ if(1.0) brute = 400 burn = 100 - if(!anchored && !prob(getarmor(null, "bomb"))) - gib() if(2.0) brute = 60 burn = 60 if(3.0) brute = 30 - var/protection = BLOCKED_MULT(getarmor(null, "bomb")) - brute *= protection - burn *= protection - - adjustBruteLoss(brute) - adjustFireLoss(burn) - - updatehealth() + apply_damage(brute, BRUTE, damage_flags = DAM_EXPLODE) + apply_damage(burn, BURN, damage_flags = DAM_EXPLODE) /mob/living/silicon/proc/receive_alarm(var/datum/alarm_handler/alarm_handler, var/datum/alarm/alarm, was_raised) if(!next_alarm_notice) diff --git a/code/modules/mob/living/simple_animal/hostile/commanded/bear_companion.dm b/code/modules/mob/living/simple_animal/hostile/commanded/bear_companion.dm index ff6dfbba095..6aa0d4cc172 100644 --- a/code/modules/mob/living/simple_animal/hostile/commanded/bear_companion.dm +++ b/code/modules/mob/living/simple_animal/hostile/commanded/bear_companion.dm @@ -41,7 +41,7 @@ /mob/living/simple_animal/hostile/commanded/bear/hit_with_weapon(obj/item/O, mob/living/user, var/effective_force, var/hit_zone) . = ..() - if(!.) + if(.) src.emote("roars in rage!") /mob/living/simple_animal/hostile/commanded/bear/attack_hand(mob/living/carbon/human/M as mob) diff --git a/code/modules/mob/living/simple_animal/hostile/commanded/commanded.dm b/code/modules/mob/living/simple_animal/hostile/commanded/commanded.dm index b5cc94107c1..8ee7ef0ff25 100644 --- a/code/modules/mob/living/simple_animal/hostile/commanded/commanded.dm +++ b/code/modules/mob/living/simple_animal/hostile/commanded/commanded.dm @@ -206,7 +206,7 @@ target_mob = null audible_emote("[pick(sad_emote)].",0) return - if(!. && retribution) + if(. && retribution) stance = HOSTILE_STANCE_ATTACK target_mob = user allowed_targets += user //fuck this guy in particular. diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index e9af997b202..c8fbf8e7b2e 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -485,7 +485,7 @@ var/mob/living/carbon/human/H = parrot_interest var/obj/item/organ/external/affecting = H.get_organ(ran_zone(pick(parrot_dam_zone))) - H.apply_damage(damage, BRUTE, affecting, H.run_armor_check(affecting, "melee"), damage_flags = DAM_SHARP) + H.apply_damage(damage, BRUTE, affecting, damage_flags = DAM_SHARP) visible_emote(pick("pecks [H]'s [affecting].", "cuts [H]'s [affecting] with its talons.")) else diff --git a/code/modules/mob/living/simple_animal/shade.dm b/code/modules/mob/living/simple_animal/shade.dm index 259145df5bc..1720b90f519 100644 --- a/code/modules/mob/living/simple_animal/shade.dm +++ b/code/modules/mob/living/simple_animal/shade.dm @@ -99,7 +99,7 @@ var/datum/weakref/original_body var/datum/weakref/possessed_body -/mob/living/simple_animal/shade/bluespace/apply_damage(var/damage, var/damagetype, var/def_zone, var/blocked, var/used_weapon, var/damage_flags) +/mob/living/simple_animal/shade/bluespace/apply_damage(var/damage, var/damagetype, var/def_zone, var/blocked, var/used_weapon, var/damage_flags, var/armor_pen, var/silent = FALSE) return 0 /mob/living/simple_animal/shade/bluespace/adjustBruteLoss() diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 92f42fd0e0e..6dd778e9315 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -549,7 +549,7 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj) user.do_attack_animation(src) return TRUE -/mob/living/simple_animal/apply_damage(damage, damagetype, def_zone, blocked, used_weapon, damage_flags) +/mob/living/simple_animal/apply_damage(damage, damagetype, def_zone, blocked, used_weapon, damage_flags, armor_pen, silent = FALSE) . = ..() handle_blood_overlay() @@ -614,8 +614,6 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj) switch (severity) if (1.0) damage = 500 - if(!prob(getarmor(null, "bomb"))) - gib() if (2.0) damage = 120 @@ -623,7 +621,7 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj) if(3.0) damage = 30 - adjustBruteLoss(damage * BLOCKED_MULT(getarmor(null, "bomb"))) + apply_damage(damage, BRUTE, damage_flags = DAM_EXPLODE) /mob/living/simple_animal/proc/SA_attackable(target_mob) if (isliving(target_mob)) diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index e96456133ac..85c9f41900d 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -371,7 +371,7 @@ if(hit_zone == BP_EYES) attack_eye(affecting, assailant) else if(hit_zone == BP_HEAD) - headbut(affecting, assailant) + headbutt(affecting, assailant) else dislocate(affecting, assailant, hit_zone) diff --git a/code/modules/mob/mob_grab_specials.dm b/code/modules/mob/mob_grab_specials.dm index 033304c9684..628097ea179 100644 --- a/code/modules/mob/mob_grab_specials.dm +++ b/code/modules/mob/mob_grab_specials.dm @@ -55,8 +55,8 @@ return attacker.visible_message("[attacker] [pick("bent", "twisted")] [target]'s [organ.name] into a jointlock!") - var/armor = target.run_armor_check(target, "melee") - if(armor < 100) + var/armor = 100 * target.get_blocked_ratio(target, BRUTE, damage = 30) + if(armor < 70) to_chat(target, "You feel extreme pain!") affecting.adjustHalLoss(Clamp(0, 60-affecting.getHalLoss(), 30)) //up to 60 halloss @@ -86,7 +86,7 @@ attack.handle_eye_attack(attacker, target) -/obj/item/grab/proc/headbut(mob/living/carbon/human/target, mob/living/carbon/human/attacker) +/obj/item/grab/proc/headbutt(mob/living/carbon/human/target, mob/living/carbon/human/attacker) if(!istype(attacker)) return if(target.lying) @@ -104,9 +104,8 @@ if(istype(hat)) damage += hat.force * 3 - var/armor = target.run_armor_check(BP_HEAD, "melee") - target.apply_damage(damage, BRUTE, BP_HEAD, armor) - attacker.apply_damage(10, BRUTE, BP_HEAD, attacker.run_armor_check(BP_HEAD, "melee")) + target.apply_damage(damage, BRUTE, BP_HEAD) + attacker.apply_damage(10, BRUTE, BP_HEAD) if(armor < 25 && target.headcheck(BP_HEAD) && prob(damage)) target.apply_effect(20, PARALYZE) diff --git a/code/modules/organs/internal/eyes.dm b/code/modules/organs/internal/eyes.dm index 17617f60798..bd13401d68e 100644 --- a/code/modules/organs/internal/eyes.dm +++ b/code/modules/organs/internal/eyes.dm @@ -55,10 +55,12 @@ owner.eye_blind = 20 /obj/item/organ/internal/eyes/do_surge_effects() - owner.overlay_fullscreen("noise", /obj/screen/fullscreen/flash/noise) + if(owner) + owner.overlay_fullscreen("noise", /obj/screen/fullscreen/flash/noise) /obj/item/organ/internal/eyes/clear_surge_effects() - owner.clear_fullscreen("noise") + if(owner) + owner.clear_fullscreen("noise") /obj/item/organ/internal/eyes/robotize() ..() diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 2724dd7eb05..244cc74f80b 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -339,8 +339,9 @@ var/damage_amt = brute var/cur_damage = brute_dam var/sharp = (damage_flags & DAM_SHARP) + var/laser = (damage_flags & DAM_LASER) - if(BP_IS_ROBOTIC(src)) + if(BP_IS_ROBOTIC(src) || laser) damage_amt += burn cur_damage += burn_dam @@ -350,6 +351,8 @@ var/organ_damage_threshold = 10 if(sharp) organ_damage_threshold *= 0.5 + if(laser) + organ_damage_threshold *= 2 if(!(cur_damage + damage_amt >= max_damage) && !(damage_amt >= organ_damage_threshold)) return FALSE @@ -769,7 +772,7 @@ Note that amputating the affected organ does in fact remove the infection from t if (updatehud) owner.hud_updateflag = 1022 - if (update_icon()) + if(update_icon()) owner.UpdateDamageIcon(1) //Updates brute_damn and burn_damn from wound damages. Updates BLEEDING status. diff --git a/code/modules/organs/organ_icon.dm b/code/modules/organs/organ_icon.dm index 61fd17c31c8..df5ea584dd8 100644 --- a/code/modules/organs/organ_icon.dm +++ b/code/modules/organs/organ_icon.dm @@ -235,8 +235,8 @@ var/n_is = damage_state_text() if (n_is != damage_state) damage_state = n_is - return 1 - return 0 + return TRUE + return FALSE // This is NOT safe for caching the organ's own icon, it's only meant to be used for the mob icon cache. /obj/item/organ/external/proc/get_mob_cache_key() diff --git a/code/modules/organs/subtypes/autakh.dm b/code/modules/organs/subtypes/autakh.dm index 1b0848e478a..350484165d1 100644 --- a/code/modules/organs/subtypes/autakh.dm +++ b/code/modules/organs/subtypes/autakh.dm @@ -106,7 +106,7 @@ parent_organ = BP_GROIN /obj/item/organ/internal/augment/calf_override/proc/do_run_act() - owner.apply_damage(1, BRUTE, BP_GROIN) + owner.apply_damage(1, BRUTE, BP_GROIN, armor_pen = 100) /obj/item/organ/internal/augment/protein_valve name = "protein breakdown valve" diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index 675f58568fa..96900f94fe7 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -413,7 +413,7 @@ /obj/machinery/gravity_generator/main/proc/pulse_radiation(var/amount = 20) for(var/mob/living/L in view(7, src)) - L.apply_effect(amount, IRRADIATE, blocked = L.getarmor(null, "rad")) + L.apply_damage(amount, IRRADIATE, damage_flags = DAM_DISPERSED) // Shake everyone on the z level to let them know that gravity was enagaged/disenagaged. /obj/machinery/gravity_generator/main/proc/shake_everyone() diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 64c33792730..1ccb8377f09 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -396,9 +396,9 @@ /obj/machinery/power/port_gen/pacman/super/UseFuel() //produces a tiny amount of radiation when in use - if (prob(2*power_output)) + if (prob(2 * power_output)) for (var/mob/living/L in range(src, 5)) - L.apply_effect(1, IRRADIATE, blocked = L.getarmor(null, "rad")) //should amount to ~5 rads per minute at max safe power + L.apply_damage(1, IRRADIATE, damage_flags = DAM_DISPERSED) //should amount to ~5 rads per minute at max safe power ..() /obj/machinery/power/port_gen/pacman/super/explode() @@ -407,7 +407,7 @@ for (var/mob/living/L in range(src, 10)) //should really fall with the square of the distance, but that makes the rads value drop too fast //I dunno, maybe physics works different when you live in 2D -- SM radiation also works like this, apparently - L.apply_effect(max(20, round(rads/get_dist(L,src))), IRRADIATE, blocked = L.getarmor(null, "rad")) + L.apply_damage(max(20, round(rads/get_dist(L,src))), IRRADIATE, damage_flags = DAM_DISPERSED) explosion(loc, 3, 3, 5, 3) qdel(src) diff --git a/code/modules/power/rtg.dm b/code/modules/power/rtg.dm index ae458c95928..b3f521e09f5 100644 --- a/code/modules/power/rtg.dm +++ b/code/modules/power/rtg.dm @@ -35,7 +35,7 @@ add_avail(power_gen) if(panel_open && irradiate) for (var/mob/living/L in range(2, src)) - L.apply_effect(10, IRRADIATE, blocked = L.getarmor(null, "rad")) // Weak but noticeable. + L.apply_damage(10, IRRADIATE, damage_flags = DAM_DISPERSED) // Weak but noticeable. /obj/machinery/power/rtg/update_icon() icon_state = panel_open ? "[initial(icon_state)]-open" : initial(icon_state) diff --git a/code/modules/power/singularity/act.dm b/code/modules/power/singularity/act.dm index 7e275b63651..997dbff6a49 100644 --- a/code/modules/power/singularity/act.dm +++ b/code/modules/power/singularity/act.dm @@ -32,7 +32,7 @@ if(prob(current_size*5) && hand.w_class >= ((11-current_size)/2) && u_equip(hand)) step_towards(hand, src) to_chat(src, "The [S] pulls \the [hand] from your grip!") - apply_effect(current_size * 3, IRRADIATE, blocked = getarmor(null, "rad")) + apply_damage(current_size * 3, IRRADIATE, damage_flags = DAM_DISPERSED) if(shoes) if(shoes.item_flags & NOSLIP) return 0 ..() diff --git a/code/modules/power/singularity/particle_accelerator/particle.dm b/code/modules/power/singularity/particle_accelerator/particle.dm index a034dfd26b6..16a0b8c0eaf 100644 --- a/code/modules/power/singularity/particle_accelerator/particle.dm +++ b/code/modules/power/singularity/particle_accelerator/particle.dm @@ -64,9 +64,8 @@ /obj/effect/accelerated_particle/proc/toxmob(var/mob/living/M) var/radiation = (energy*2) - M.apply_effect((radiation*3),IRRADIATE,blocked = M.getarmor(null, "rad")) + M.apply_damage((radiation*3), IRRADIATE, damage_flags = DAM_DISPERSED) M.updatehealth() - //to_chat(M, "\red You feel odd.") return diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index c4408b161df..168c91bf37a 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -433,21 +433,15 @@ /obj/singularity/proc/toxmob() var/toxrange = 10 - var/toxdamage = 4 var/radiation = 15 var/radiationmin = 3 - if (src.energy>200) - toxdamage = round(((src.energy-150)/50)*4,1) + if (src.energy > 200) radiation = round(((src.energy-150)/50)*5,1) radiationmin = round((radiation/5),1)// for(var/mob/living/M in view(toxrange, src.loc)) if(M.status_flags & GODMODE) continue - M.apply_effect(rand(radiationmin,radiation), IRRADIATE, blocked = M.getarmor(null, "rad")) - toxdamage = (toxdamage - (toxdamage*M.getarmor(null, "rad"))) - M.apply_effect(toxdamage, TOX) - return - + M.apply_damage(rand(radiationmin,radiation), IRRADIATE, damage_flags = DAM_DISPERSED) /obj/singularity/proc/mezzer() for(var/mob/living/carbon/M in oviewers(8, src)) @@ -477,7 +471,7 @@ /obj/singularity/proc/smwave() for(var/mob/living/M in view(10, src.loc)) if(prob(67)) - M.apply_effect(rand(energy), IRRADIATE, blocked = M.getarmor(null, "rad")) + M.apply_damage(rand(energy), IRRADIATE, damage_flags = DAM_DISPERSED) to_chat(M, "You hear an uneartly ringing, then what sounds like a shrilling kettle as you are washed with a wave of heat.") to_chat(M, "Miraculously, it fails to kill you.") else diff --git a/code/modules/projectiles/guns/energy/rifle.dm b/code/modules/projectiles/guns/energy/rifle.dm index 835f6a0c750..661f830fef1 100644 --- a/code/modules/projectiles/guns/energy/rifle.dm +++ b/code/modules/projectiles/guns/energy/rifle.dm @@ -48,7 +48,7 @@ fire_delay = 5 burst_delay = 5 origin_tech = list(TECH_COMBAT = 3, TECH_MAGNET = 2) - projectile_type = /obj/item/projectile/beam + projectile_type = /obj/item/projectile/beam/midlaser secondary_projectile_type = null secondary_fire_sound = null can_switch_modes = 0 diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index f2383a0759b..60c7ccccfb8 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -122,7 +122,7 @@ new hit_effect(target.loc) L.apply_effects(stun, weaken, paralyze, 0, stutter, eyeblur, drowsy, agony, incinerate, blocked) - L.apply_effect(irradiate, IRRADIATE, L.getarmor(null, "rad")) //radiation protection is handled separately from other armor types. + L.apply_damage(irradiate, IRRADIATE, damage_flags = DAM_DISPERSED) //radiation protection is handled separately from other armor types. return 1 //called when the projectile stops flying because it collided with something @@ -390,6 +390,9 @@ . = ..() permutated = list() +/obj/item/projectile/damage_flags() + return damage_flags + /obj/item/projectile/proc/pixel_move(moves, trajectory_multiplier = 1, hitscanning = FALSE) if(!loc || !trajectory) if(!QDELETED(src)) diff --git a/code/modules/projectiles/projectile/beams.dm b/code/modules/projectiles/projectile/beams.dm index d14b5957fec..a54b0693fdc 100644 --- a/code/modules/projectiles/projectile/beams.dm +++ b/code/modules/projectiles/projectile/beams.dm @@ -27,7 +27,8 @@ eyeblur = 2 /obj/item/projectile/beam/pistol - damage = 35 + damage = 25 + armor_penetration = 10 /obj/item/projectile/beam/pistol/hegemony icon = 'icons/obj/guns/hegemony_pistol.dmi' @@ -41,13 +42,13 @@ /obj/item/projectile/beam/midlaser damage = 35 - armor_penetration = 10 + armor_penetration = 15 /obj/item/projectile/beam/heavylaser name = "heavy laser" icon_state = "heavylaser" - damage = 60 - armor_penetration = 30 + damage = 45 + armor_penetration = 25 muzzle_type = /obj/effect/projectile/muzzle/heavy_laser tracer_type = /obj/effect/projectile/tracer/heavy_laser @@ -56,8 +57,8 @@ /obj/item/projectile/beam/xray name = "xray beam" icon_state = "xray" - damage = 25 - armor_penetration = 50 + damage = 30 + armor_penetration = 30 muzzle_type = /obj/effect/projectile/muzzle/xray tracer_type = /obj/effect/projectile/tracer/xray diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index af105b48988..3081bf2c4ac 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -121,17 +121,18 @@ /* short-casing projectiles, like the kind used in pistols or SMGs */ /obj/item/projectile/bullet/pistol - damage = 20 - -/obj/item/projectile/bullet/pistol/medium damage = 25 +/obj/item/projectile/bullet/pistol/medium + damage = 35 + /obj/item/projectile/bullet/pistol/strong - damage = 30 - armor_penetration = 15 + damage = 45 + armor_penetration = 20 /obj/item/projectile/bullet/pistol/revolver - damage = 30 + damage = 40 + armor_penetration = 10 /obj/item/projectile/bullet/pistol/rubber //"rubber" bullets name = "rubber bullet" @@ -144,7 +145,7 @@ /obj/item/projectile/bullet/shotgun name = "slug" - damage = 60 + damage = 65 /obj/item/projectile/bullet/shotgun/beanbag //because beanbags are not bullets name = "beanbag" @@ -183,7 +184,7 @@ //Overall less damage than slugs in exchange for more damage at very close range and more embedding /obj/item/projectile/bullet/pellet/shotgun name = "shrapnel" - damage = 13 + damage = 30 pellets = 6 range_step = 1 spread_step = 10 @@ -196,25 +197,28 @@ /* "Rifle" rounds */ /obj/item/projectile/bullet/rifle - penetrating = 1 - armor_penetration = 20 + damage = 40 + armor_penetration = 15 + penetrating = TRUE /obj/item/projectile/bullet/rifle/a762 - damage = 35 + damage = 45 + armor_penetration = 20 /obj/item/projectile/bullet/rifle/a556 - damage = 30 + damage = 45 + armor_penetration = 15 /obj/item/projectile/bullet/rifle/a556/ap - damage = 30 - armor_penetration = 25 + damage = 35 + armor_penetration = 40 /obj/item/projectile/bullet/rifle/a145 damage = 80 stun = 3 weaken = 3 penetrating = 5 - armor_penetration = 80 + armor_penetration = 70 hitscan = 1 //so the PTR isn't useless as a sniper weapon maiming = 1 maim_rate = 3 @@ -227,10 +231,10 @@ /obj/item/projectile/bullet/rifle/slugger name = "slugger round" - damage = 80 + damage = 60 weaken = 3 penetrating = 5 - armor_penetration = 15 + armor_penetration = 10 maiming = TRUE maim_rate = 3 maim_type = DROPLIMB_BLUNT @@ -279,27 +283,6 @@ ..() /* Miscellaneous */ - -/obj/item/projectile/bullet/suffocationbullet//How does this even work? - name = "co bullet" - damage = 20 - damage_type = OXY - -/obj/item/projectile/bullet/cyanideround - name = "poison bullet" - damage = 40 - damage_type = TOX - -/obj/item/projectile/bullet/burstbullet - name = "exploding bullet" - damage = 20 - embed = 0 - edge = 1 - -/obj/item/projectile/bullet/burstbullet/on_impact(var/atom/A) - explosion(A, -1, 0, 2) - ..() - /obj/item/projectile/bullet/blank invisibility = 101 damage = 1 @@ -354,12 +337,13 @@ /obj/item/projectile/bullet/gauss name = "slug" icon_state = "heavygauss" - damage = 45 + damage = 50 + armor_penetration = 20 muzzle_type = /obj/effect/projectile/muzzle/gauss embed = 0 /obj/item/projectile/bullet/gauss/highex - name ="high-ex shell" + name = "high-ex shell" damage = 10 /obj/item/projectile/bullet/gauss/highex/on_impact(var/atom/A) @@ -383,7 +367,7 @@ armor_penetration = 25 /obj/item/projectile/bullet/cannonball/explosive - damage = 30 + damage = 50 penetrating = 0 armor_penetration = 5 diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index 2b3b1890ab5..a217e446e27 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -146,13 +146,11 @@ var/mob/living/carbon/human/H = M if((H.species.flags & IS_PLANT) && (M.nutrition < 500)) if(prob(15)) - H.apply_effect((rand(30,80)),IRRADIATE,blocked = H.getarmor(null, "rad")) + H.apply_damage(rand(30,80), IRRADIATE, damage_flags = DAM_DISPERSED) M.Weaken(5) for (var/mob/V in viewers(src)) V.show_message("[M] writhes in pain as [M.get_pronoun("his")] vacuoles boil.", 3, "You hear the crunching of leaves.", 2) if(prob(35)) - // for (var/mob/V in viewers(src)) //Public messages commented out to prevent possible metaish genetics experimentation and stuff. - Cheridan - // V.show_message("\red [M] is mutated by the radiation beam.", 3, "\red You hear the snapping of twigs.", 2) if(prob(80)) randmutb(M) domutcheck(M,null) @@ -162,11 +160,7 @@ else M.adjustFireLoss(rand(5,15)) M.show_message("The radiation beam singes you!") - // for (var/mob/V in viewers(src)) - // V.show_message("\red [M] is singed by the radiation beam.", 3, "\red You hear the crackle of burning leaves.", 2) - else if(istype(target, /mob/living/carbon/)) - // for (var/mob/V in viewers(src)) - // V.show_message("The radiation beam dissipates harmlessly through [M]", 3) + else if(iscarbon(target)) M.show_message("The radiation beam dissipates harmlessly through your body.") else return 1 diff --git a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm index f9c29537be7..02088c8e9c5 100644 --- a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm +++ b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm @@ -148,7 +148,7 @@ // You are going to knock someone out for longer if they are not wearing a helmet. var/weaken_duration = 0 if(blocked < 100) - weaken_duration = smash_duration + min(0, force - target.getarmor(hit_zone, "melee") + 10) + weaken_duration = smash_duration + min(0, force - target.get_blocked_ratio(hit_zone, BRUTE) * 100 + 10) var/mob/living/carbon/human/H = target if(istype(H) && H.headcheck(hit_zone)) diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index cf320c832a6..66aad01d7c4 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -54,7 +54,7 @@ if(!inj_time) return user.visible_message(SPAN_WARNING("\The [user] is trying to inject \the [L] with \the [src]!"), SPAN_NOTICE("You are trying to inject \the [L] with \the [src].")) - if(armorcheck && L.run_armor_check(target_zone,"melee",0,"Your armor slows down the injection!","Your armor slows down the injection!")) + if(armorcheck && L.get_blocked_ratio(target_zone, BRUTE, damage = 10)) inj_time += 6 SECONDS if(!do_mob(user, L, inj_time)) return 1 diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 124e1ed1bac..f33c0bed594 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -124,7 +124,7 @@ user.visible_message("[user] aims \the [src] between [P] ribs!", SPAN_NOTICE("You aim \the [src] between [SM] ribs!")) if(!do_mob(user, target, 1.5 SECONDS)) return - var/blocked = H.getarmor_organ(H.organs_by_name[BP_CHEST], "melee") + var/blocked = H.get_blocked_ratio(BP_CHEST, BRUTE, DAM_SHARP, damage = 5) if(blocked > 20) user.visible_message("[user] jabs \the [src] into [H], but their armor blocks it!", SPAN_WARNING("You jab \the [src] into [H], but their armor blocks it!")) return @@ -306,7 +306,8 @@ if((user != target) && H.check_shields(7, src, user, "\the [src]")) return - if (target != user && H.getarmor(target_zone, "melee") > 5 && prob(50)) + var/armor = H.get_blocked_ratio(target_zone, BRUTE, damage_flags = DAM_SHARP, damage = 5)*100 + if (target != user && armor > 50 && prob(50)) for(var/mob/O in viewers(world.view, user)) O.show_message(text(SPAN_DANGER("[user] tries to stab [target] in \the [hit_area] with [src.name], but the attack is deflected by armor!")), 1) user.remove_from_mob(src) diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_hurt.dm b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_hurt.dm index 78859533220..99c28947613 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_hurt.dm +++ b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_hurt.dm @@ -14,7 +14,7 @@ C.adjustBruteLoss(rand(5,25) * weakness) C.adjustFireLoss(rand(5,25) * weakness) C.adjustBrainLoss(rand(5,25) * weakness) - C.apply_effect(25 * weakness, IRRADIATE, blocked = C.getarmor(null, "rad")) + C.apply_damage(25 * weakness, IRRADIATE, damage_flags = DAM_DISPERSED) C.adjustNutritionLoss(50 * weakness) C.adjustHydrationLoss(50 * weakness) C.make_dizzy(6 * weakness) diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_radiate.dm b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_radiate.dm index dc175d934ea..0f64a9e7092 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_radiate.dm +++ b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_radiate.dm @@ -26,6 +26,6 @@ if(holder) var/turf/T = get_turf(holder) for (var/mob/living/M in range(src.effectrange,T)) - M.apply_effect(radiation_amount * 25,IRRADIATE,blocked = M.getarmor(null, "rad")) + M.apply_damage(radiation_amount * 25, IRRADIATE, damage_flags = DAM_DISPERSED) M.updatehealth() return 1 diff --git a/code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm b/code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm index 2fb142b6464..835f7dedd94 100644 --- a/code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm +++ b/code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm @@ -200,7 +200,7 @@ if(!rad_shield) //irradiate nearby mobs for(var/mob/living/M in view(7,src)) - M.apply_effect(radiation / 25, IRRADIATE, blocked = M.getarmor(null, "rad")) + M.apply_damage(radiation / 25, IRRADIATE, damage_flags = DAM_DISPERSED) else t_left_radspike = pick(10,15,25) diff --git a/code/modules/spell_system/artifacts/armor/bone_armor.dm b/code/modules/spell_system/artifacts/armor/bone_armor.dm index 9f05e25b055..9504d12205d 100644 --- a/code/modules/spell_system/artifacts/armor/bone_armor.dm +++ b/code/modules/spell_system/artifacts/armor/bone_armor.dm @@ -7,7 +7,7 @@ contained_sprite = TRUE species_restricted = list(BODYTYPE_SKELETON) body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS - armor = list(melee = 50, bullet = 40, laser = 50, energy = 25, bomb = 30, bio = 0, rad = 0) + armor = list(melee = ARMOR_MELEE_MAJOR, bullet = 40, laser = 50, energy = 25, bomb = 30, bio = 0, rad = 0) /obj/item/clothing/head/helmet/bone name = "bone helmet" @@ -17,4 +17,4 @@ item_state = "skull" contained_sprite = TRUE species_restricted = list(BODYTYPE_SKELETON) - armor = list(melee = 50, bullet = 40, laser = 50, energy = 25, bomb = 30, bio = 0, rad = 0) \ No newline at end of file + armor = list(melee = ARMOR_MELEE_MAJOR, bullet = 40, laser = 50, energy = 25, bomb = 30, bio = 0, rad = 0) \ No newline at end of file diff --git a/code/modules/supermatter/supermatter.dm b/code/modules/supermatter/supermatter.dm index 77f53bcdace..cf956b79f63 100644 --- a/code/modules/supermatter/supermatter.dm +++ b/code/modules/supermatter/supermatter.dm @@ -305,7 +305,7 @@ var/rads = (power / 10) * ( 1 / (radius**2) ) if (!(l in oview(rad_range, src)) && !(l in range(src, round(rad_range * 2/3)))) continue - l.apply_effect(rads, IRRADIATE, blocked = l.getarmor(null, "rad")) + l.apply_damage(rads, IRRADIATE, damage_flags = DAM_DISPERSED) if(l.is_diona()) l.adjustToxLoss(-rads) if(last_message_time + 800 < world.time) // Not to spam message @@ -394,7 +394,7 @@ user.drop_from_inventory(W) Consume(W) - user.apply_effect(150, IRRADIATE, blocked = user.getarmor(null, "rad")) + user.apply_damage(150, IRRADIATE, damage_flags = DAM_DISPERSED) /obj/machinery/power/supermatter/CollidedWith(atom/AM as mob|obj) @@ -437,7 +437,7 @@ else l.show_message("You hear an uneartly ringing and notice your skin is covered in fresh radiation burns.", 2) var/rads = 500 * sqrt( 1 / (get_dist(l, src) + 1) ) - l.apply_effect(rads, IRRADIATE, blocked = l.getarmor(null, "rad")) + l.apply_damage(rads, IRRADIATE, damage_flags = DAM_DISPERSED) /obj/machinery/power/supermatter/proc/supermatter_pull() diff --git a/code/modules/tables/interactions.dm b/code/modules/tables/interactions.dm index 9e792817c17..15c96383641 100644 --- a/code/modules/tables/interactions.dm +++ b/code/modules/tables/interactions.dm @@ -155,10 +155,10 @@ return if(G.state > GRAB_AGGRESSIVE && world.time >= G.last_action + UPGRADE_COOLDOWN) if(user.a_intent == I_HURT) - var/blocked = M.run_armor_check(BP_HEAD, "melee") - if (prob(30 * BLOCKED_MULT(blocked))) + var/blocked = M.get_blocked_ratio(BP_HEAD, BRUTE, damage = 8) + if (prob(30 * (1 - blocked))) M.Weaken(5) - M.apply_damage(8, BRUTE, BP_HEAD, blocked) + M.apply_damage(8, BRUTE, BP_HEAD) visible_message("[G.assailant] slams [G.affecting]'s face against \the [src]!") if(material) playsound(loc, material.tableslam_noise, 50, 1) @@ -170,7 +170,7 @@ if(prob(50)) M.visible_message("\The [S] slices [M]'s face messily!", "\The [S] slices your face messily!") - M.apply_damage(10, BRUTE, BP_HEAD, blocked) + M.apply_damage(10, BRUTE, BP_HEAD) sanity_counter++ if(sanity_counter >= 3) break diff --git a/code/modules/vehicles/cargo_train.dm b/code/modules/vehicles/cargo_train.dm index 9f21f0c91cf..30f4ff42520 100644 --- a/code/modules/vehicles/cargo_train.dm +++ b/code/modules/vehicles/cargo_train.dm @@ -211,7 +211,7 @@ H.apply_effects(5, 5) for(var/i = 0, i < rand(1,5), i++) var/def_zone = pick(parts) - H.apply_damage(rand(5,10), BRUTE, def_zone, H.run_armor_check(def_zone, "melee")) + H.apply_damage(rand(5,10), BRUTE, def_zone) /obj/vehicle/train/cargo/trolley/RunOver(var/mob/living/carbon/human/H) ..() diff --git a/code/modules/vehicles/train.dm b/code/modules/vehicles/train.dm index e353d9f5e7e..3fc595d11c3 100644 --- a/code/modules/vehicles/train.dm +++ b/code/modules/vehicles/train.dm @@ -58,13 +58,13 @@ A.Move(T) //bump things away when hit if(emagged) - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/M = A visible_message("[src] knocks over [M]!") var/def_zone = ran_zone() M.apply_effects(5, 5) //knock people down if you hit them - M.apply_damage(22 / move_delay, BRUTE, def_zone, M.run_armor_check(def_zone, "melee")) // and do damage according to how fast the train is going - if(istype(load, /mob/living/carbon/human)) + M.apply_damage(22 / move_delay, BRUTE, def_zone,) // and do damage according to how fast the train is going + if(isliving(load)) var/mob/living/D = load to_chat(D, "You hit [M]!") msg_admin_attack("[D.name] ([D.ckey]) hit [M.name] ([M.ckey]) with [src]. (JMP)",ckey=key_name(D),ckey_target=key_name(M)) diff --git a/html/changelogs/mattatlas-armortime.yml b/html/changelogs/mattatlas-armortime.yml new file mode 100644 index 00000000000..4406e6c3078 --- /dev/null +++ b/html/changelogs/mattatlas-armortime.yml @@ -0,0 +1,46 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: MattAtlas + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - experiment: "Ported a new armor system from Baystation. It's far more modular and allows for more granularity. Armor is now exponential and will block damage better the lower it is from the armor rating." + - balance: "Notably, armor now removes damage flags if the damage is blocked significantly. This means no more bleeding from a 2 damage projectile." + - balance: "Due to this, a lot of guns were buffed, including Security and antagonist guns alike. Some things may be a bit too strong or a bit too weak." + - balance: "Likewise, a lot of armor has received buffs. Mech armor should now be considerably more durable." + - balance: "Re-added laser organ damage." + - tweak: "Increased the cost of the sharpened bear trap." \ No newline at end of file