Refactors armor into dedicated subtypes (#71986)

## About The Pull Request

See title.
## Why It's Good For The Game

Code is cleaner, and more readable/intuitive
Technically closes
https://github.com/tgstation/dev-cycles-initiative/issues/8
## Changelog
🆑
refactor: armor, from the ground up basically
/🆑

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
Zephyr
2022-12-23 16:21:22 -08:00
committed by GitHub
co-authored by Mothblocks
parent 8bbc0d1c62
commit 72add64520
259 changed files with 7071 additions and 768 deletions
+57 -7
View File
@@ -10,7 +10,7 @@
max_integrity = 50
can_be_unanchored = TRUE
resistance_flags = ACID_PROOF
armor = list(MELEE = 50, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 80, ACID = 100)
armor_type = /datum/armor/structure_window
can_atmos_pass = ATMOS_PASS_PROC
rad_insulation = RAD_VERY_LIGHT_INSULATION
pass_flags_self = PASSGLASS
@@ -34,6 +34,11 @@
/// If some inconsiderate jerk has had their blood spilled on this window, thus making it cleanable
var/bloodied = FALSE
/datum/armor/structure_window
melee = 50
fire = 80
acid = 100
/obj/structure/window/Initialize(mapload, direct)
. = ..()
if(direct)
@@ -440,7 +445,7 @@
icon_state = "rwindow"
reinf = TRUE
heat_resistance = 1600
armor = list(MELEE = 80, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 25, BIO = 0, FIRE = 80, ACID = 100)
armor_type = /datum/armor/window_reinforced
max_integrity = 75
explosion_block = 1
damage_deflection = 11
@@ -453,6 +458,12 @@
//If you find this like 4 years later and construction still hasn't been refactored, I'm so sorry for this //Adding a timestamp, I found this in 2020, I hope it's from this year -Lemon
//2021 AND STILLLL GOING STRONG
//2022 BABYYYYY ~lewc
/datum/armor/window_reinforced
melee = 80
bomb = 25
fire = 80
acid = 100
/obj/structure/window/reinforced/attackby_secondary(obj/item/tool, mob/user, params)
switch(state)
if(RWINDOW_SECURE)
@@ -563,12 +574,19 @@
icon_state = "plasmawindow"
reinf = FALSE
heat_resistance = 25000
armor = list(MELEE = 80, BULLET = 5, LASER = 0, ENERGY = 0, BOMB = 45, BIO = 0, FIRE = 99, ACID = 100)
armor_type = /datum/armor/window_plasma
max_integrity = 200
explosion_block = 1
glass_type = /obj/item/stack/sheet/plasmaglass
rad_insulation = RAD_MEDIUM_INSULATION
/datum/armor/window_plasma
melee = 80
bullet = 5
bomb = 45
fire = 99
acid = 100
/obj/structure/window/plasma/Initialize(mapload, direct)
. = ..()
RemoveElement(/datum/element/atmos_sensitive)
@@ -600,13 +618,20 @@
icon_state = "plasmarwindow"
reinf = TRUE
heat_resistance = 50000
armor = list(MELEE = 80, BULLET = 20, LASER = 0, ENERGY = 0, BOMB = 60, BIO = 0, FIRE = 99, ACID = 100)
armor_type = /datum/armor/reinforced_plasma
max_integrity = 500
damage_deflection = 21
explosion_block = 2
glass_type = /obj/item/stack/sheet/plasmarglass
rad_insulation = RAD_HEAVY_INSULATION
/datum/armor/reinforced_plasma
melee = 80
bullet = 20
bomb = 60
fire = 99
acid = 100
/obj/structure/window/reinforced/plasma/block_superconductivity()
return TRUE
@@ -716,6 +741,13 @@
glass_amount = 2
//there is a sub shuttle window in survival_pod.dm for mining pods
/datum/armor/reinforced_plasma
melee = 80
bullet = 20
bomb = 60
fire = 99
acid = 100
/obj/structure/window/reinforced/shuttle//this is called reinforced because it is reinforced w/titanium
name = "shuttle window"
desc = "A reinforced, air-locked pod window."
@@ -729,7 +761,7 @@
flags_1 = PREVENT_CLICK_UNDER_1
reinf = TRUE
heat_resistance = 1600
armor = list(MELEE = 90, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 50, BIO = 0, FIRE = 80, ACID = 100)
armor_type = /datum/armor/reinforced_shuttle
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = SMOOTH_GROUP_SHUTTLE_PARTS + SMOOTH_GROUP_WINDOW_FULLTILE_SHUTTLE
canSmoothWith = SMOOTH_GROUP_WINDOW_FULLTILE_SHUTTLE
@@ -739,6 +771,12 @@
receive_ricochet_chance_mod = 1.2
rad_insulation = RAD_MEDIUM_INSULATION
/datum/armor/reinforced_shuttle
melee = 90
bomb = 50
fire = 80
acid = 100
/obj/structure/window/reinforced/shuttle/spawnDebris(location)
. = list()
. += new /obj/item/shard/titanium(location)
@@ -769,7 +807,7 @@
fulltile = TRUE
flags_1 = PREVENT_CLICK_UNDER_1
heat_resistance = 1600
armor = list(MELEE = 95, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 50, BIO = 0, FIRE = 80, ACID = 100)
armor_type = /datum/armor/plasma_plastitanium
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = SMOOTH_GROUP_SHUTTLE_PARTS + SMOOTH_GROUP_WINDOW_FULLTILE_PLASTITANIUM
canSmoothWith = SMOOTH_GROUP_WINDOW_FULLTILE_PLASTITANIUM
@@ -779,6 +817,12 @@
glass_amount = 2
rad_insulation = RAD_EXTREME_INSULATION
/datum/armor/plasma_plastitanium
melee = 95
bomb = 50
fire = 80
acid = 100
/obj/structure/window/reinforced/plasma/plastitanium/spawnDebris(location)
. = list()
. += new /obj/item/shard/plastitanium(location)
@@ -811,7 +855,7 @@
decon_speed = 10
can_atmos_pass = ATMOS_PASS_YES
resistance_flags = FLAMMABLE
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 0, ACID = 0)
armor_type = /datum/armor/none
knock_sound = SFX_PAGE_TURN
bash_sound = 'sound/weapons/slashmiss.ogg'
break_sound = 'sound/items/poster_ripped.ogg'
@@ -819,6 +863,12 @@
var/static/mutable_appearance/torn = mutable_appearance('icons/obj/smooth_structures/paperframes.dmi',icon_state = "torn", layer = ABOVE_OBJ_LAYER - 0.1)
var/static/mutable_appearance/paper = mutable_appearance('icons/obj/smooth_structures/paperframes.dmi',icon_state = "paper", layer = ABOVE_OBJ_LAYER - 0.1)
/datum/armor/plasma_plastitanium
melee = 95
bomb = 50
fire = 80
acid = 100
/obj/structure/window/paperframe/Initialize(mapload)
. = ..()
update_appearance()