mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
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:
@@ -105,16 +105,7 @@ Simple datum which is instanced once per type and is used for every object of sa
|
||||
o.modify_max_integrity(new_max_integrity)
|
||||
o.force *= strength_modifier
|
||||
o.throwforce *= strength_modifier
|
||||
|
||||
var/list/temp_armor_list = list() //Time to add armor modifiers!
|
||||
|
||||
if(!istype(o.armor))
|
||||
return
|
||||
var/list/current_armor = o.armor?.getList()
|
||||
|
||||
for(var/i in current_armor)
|
||||
temp_armor_list[i] = current_armor[i] * armor_modifiers[i]
|
||||
o.armor = getArmor(arglist(temp_armor_list))
|
||||
o.set_armor(o.get_armor().generate_new_with_multipliers(armor_modifiers))
|
||||
|
||||
if(!isitem(o))
|
||||
return
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
shard_type = /obj/item/shard
|
||||
value_per_unit = 0.0025
|
||||
beauty_modifier = 0.05
|
||||
armor_modifiers = list(MELEE = 0.2, BULLET = 0.2, LASER = 0, ENERGY = 1, BOMB = 0, BIO = 0.2, FIRE = 1, ACID = 0.2)
|
||||
armor_modifiers = list(MELEE = 0.2, BULLET = 0.2, ENERGY = 1, BIO = 0.2, FIRE = 1, ACID = 0.2)
|
||||
|
||||
/datum/material/glass/on_accidental_mat_consumption(mob/living/carbon/victim, obj/item/source_item)
|
||||
victim.apply_damage(10, BRUTE, BODY_ZONE_HEAD, wound_bonus = 5, sharpness = TRUE) //cronch
|
||||
@@ -95,7 +95,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
sheet_type = /obj/item/stack/sheet/mineral/uranium
|
||||
value_per_unit = 0.05
|
||||
beauty_modifier = 0.3 //It shines so beautiful
|
||||
armor_modifiers = list(MELEE = 1.5, BULLET = 1.4, LASER = 0.5, ENERGY = 0.5, BOMB = 0, BIO = 0, FIRE = 1, ACID = 1)
|
||||
armor_modifiers = list(MELEE = 1.5, BULLET = 1.4, LASER = 0.5, ENERGY = 0.5, FIRE = 1, ACID = 1)
|
||||
|
||||
/datum/material/uranium/on_applied(atom/source, amount, material_flags)
|
||||
. = ..()
|
||||
@@ -130,7 +130,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
sheet_type = /obj/item/stack/sheet/mineral/plasma
|
||||
value_per_unit = 0.1
|
||||
beauty_modifier = 0.15
|
||||
armor_modifiers = list(MELEE = 1.4, BULLET = 0.7, LASER = 0, ENERGY = 1.2, BOMB = 0, BIO = 1.2, FIRE = 0, ACID = 0.5)
|
||||
armor_modifiers = list(MELEE = 1.4, BULLET = 0.7, ENERGY = 1.2, BIO = 1.2, ACID = 0.5)
|
||||
|
||||
/datum/material/plasma/on_applied(atom/source, amount, material_flags)
|
||||
. = ..()
|
||||
@@ -178,7 +178,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
sheet_type = /obj/item/stack/sheet/mineral/bananium
|
||||
value_per_unit = 0.5
|
||||
beauty_modifier = 0.5
|
||||
armor_modifiers = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 100, BIO = 0, FIRE = 10, ACID = 0) //Clowns cant be blown away.
|
||||
armor_modifiers = list(BOMB = 100, FIRE = 10) //Clowns cant be blown away.
|
||||
|
||||
/datum/material/bananium/on_applied(atom/source, amount, material_flags)
|
||||
. = ..()
|
||||
@@ -265,7 +265,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
|
||||
value_per_unit = 0.01
|
||||
beauty_modifier = 0.1
|
||||
armor_modifiers = list(MELEE = 1.1, BULLET = 1.1, LASER = 0.4, ENERGY = 0.4, BOMB = 1, BIO = 0.2, FIRE = 0, ACID = 0.3)
|
||||
armor_modifiers = list(MELEE = 1.1, BULLET = 1.1, LASER = 0.4, ENERGY = 0.4, BOMB = 1, BIO = 0.2, ACID = 0.3)
|
||||
texture_layer_icon_state = "woodgrain"
|
||||
|
||||
/datum/material/wood/on_applied_obj(obj/source, amount, material_flags)
|
||||
@@ -460,7 +460,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/paperframes
|
||||
value_per_unit = 0.0025
|
||||
armor_modifiers = list(MELEE = 0.1, BULLET = 0.1, LASER = 0.1, ENERGY = 0.1, BOMB = 0.1, BIO = 0.1, FIRE = 0, ACID = 1.5)
|
||||
armor_modifiers = list(MELEE = 0.1, BULLET = 0.1, LASER = 0.1, ENERGY = 0.1, BOMB = 0.1, BIO = 0.1, ACID = 1.5)
|
||||
beauty_modifier = 0.3
|
||||
turf_sound_override = FOOTSTEP_SAND
|
||||
texture_layer_icon_state = "paper"
|
||||
@@ -486,7 +486,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/cardboard
|
||||
value_per_unit = 0.003
|
||||
armor_modifiers = list(MELEE = 0.25, BULLET = 0.25, LASER = 0.25, ENERGY = 0.25, BOMB = 0.25, BIO = 0.25, FIRE = 0, ACID = 1.5)
|
||||
armor_modifiers = list(MELEE = 0.25, BULLET = 0.25, LASER = 0.25, ENERGY = 0.25, BOMB = 0.25, BIO = 0.25, ACID = 1.5)
|
||||
beauty_modifier = -0.1
|
||||
|
||||
/datum/material/cardboard/on_applied_obj(obj/source, amount, material_flags)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
value_per_unit = 0.05
|
||||
beauty_modifier = -0.3
|
||||
strength_modifier = 0.7
|
||||
armor_modifiers = list(MELEE = 0.3, BULLET = 0.3, LASER = 1.2, ENERGY = 1.2, BOMB = 0.3, BIO = 0, FIRE = 1, ACID = 1)
|
||||
armor_modifiers = list(MELEE = 0.3, BULLET = 0.3, LASER = 1.2, ENERGY = 1.2, BOMB = 0.3, FIRE = 1, ACID = 1)
|
||||
item_sound_override = 'sound/effects/meatslap.ogg'
|
||||
turf_sound_override = FOOTSTEP_MEAT
|
||||
texture_layer_icon_state = "meat"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
value_per_unit = 0.05
|
||||
beauty_modifier = 0.1
|
||||
strength_modifier = 0.7
|
||||
armor_modifiers = list(MELEE = 0.3, BULLET = 0.3, LASER = 1.2, ENERGY = 1.2, BOMB = 0.3, BIO = 0, FIRE = 1, ACID = 1)
|
||||
armor_modifiers = list(MELEE = 0.3, BULLET = 0.3, LASER = 1.2, ENERGY = 1.2, BOMB = 0.3, FIRE = 1, ACID = 1)
|
||||
item_sound_override = 'sound/effects/meatslap.ogg'
|
||||
turf_sound_override = FOOTSTEP_MEAT
|
||||
texture_layer_icon_state = "pizza"
|
||||
|
||||
Reference in New Issue
Block a user