mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +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:
@@ -21,9 +21,13 @@
|
||||
attack_verb_simple = list("attack", "bash", "batter", "bludgeon", "whack")
|
||||
tool_behaviour = TOOL_CROWBAR
|
||||
toolspeed = 1
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 50, ACID = 30)
|
||||
armor_type = /datum/armor/item_crowbar
|
||||
var/force_opens = FALSE
|
||||
|
||||
/datum/armor/item_crowbar
|
||||
fire = 50
|
||||
acid = 30
|
||||
|
||||
/obj/item/crowbar/Initialize(mapload)
|
||||
. = ..()
|
||||
AddElement(/datum/element/falling_hazard, damage = force, wound_bonus = wound_bonus, hardhat_safety = TRUE, crushes = FALSE, impact_sound = hitsound)
|
||||
@@ -66,6 +70,10 @@
|
||||
desc = "It's a bulky crowbar. It almost seems deliberately designed to not be able to fit inside of a backpack."
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
|
||||
/datum/armor/item_crowbar
|
||||
fire = 50
|
||||
acid = 30
|
||||
|
||||
/obj/item/crowbar/large/heavy //from space ruin
|
||||
name = "heavy crowbar"
|
||||
desc = "It's a big crowbar. It doesn't fit in your pockets, because it's big. It feels oddly heavy.."
|
||||
@@ -79,6 +87,10 @@
|
||||
throwforce = 10
|
||||
throw_speed = 2
|
||||
|
||||
/datum/armor/item_crowbar
|
||||
fire = 50
|
||||
acid = 30
|
||||
|
||||
/obj/item/crowbar/large/old/Initialize(mapload)
|
||||
. = ..()
|
||||
if(prob(50))
|
||||
@@ -99,6 +111,10 @@
|
||||
toolspeed = 0.7
|
||||
force_opens = TRUE
|
||||
|
||||
/datum/armor/item_crowbar
|
||||
fire = 50
|
||||
acid = 30
|
||||
|
||||
/obj/item/crowbar/power/Initialize(mapload)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/transforming, \
|
||||
@@ -130,6 +146,10 @@
|
||||
toolspeed = 0.5
|
||||
force_opens = TRUE
|
||||
|
||||
/datum/armor/item_crowbar
|
||||
fire = 50
|
||||
acid = 30
|
||||
|
||||
/obj/item/crowbar/power/examine()
|
||||
. = ..()
|
||||
. += " It's fitted with a [tool_behaviour == TOOL_CROWBAR ? "prying" : "cutting"] head."
|
||||
@@ -177,11 +197,15 @@
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
slot_flags = NONE
|
||||
toolspeed = 1.25
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 100, BIO = 0, FIRE = 100, ACID = 0)
|
||||
armor_type = /datum/armor/crowbar_mechremoval
|
||||
resistance_flags = FIRE_PROOF
|
||||
bare_wound_bonus = 15
|
||||
wound_bonus = 10
|
||||
|
||||
/datum/armor/crowbar_mechremoval
|
||||
bomb = 100
|
||||
fire = 100
|
||||
|
||||
/obj/item/crowbar/mechremoval/Initialize(mapload)
|
||||
. = ..()
|
||||
transform = transform.Translate(0, -8)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
usesound = list('sound/items/screwdriver.ogg', 'sound/items/screwdriver2.ogg')
|
||||
tool_behaviour = TOOL_SCREWDRIVER
|
||||
toolspeed = 1
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 50, ACID = 30)
|
||||
armor_type = /datum/armor/item_screwdriver
|
||||
drop_sound = 'sound/items/handling/screwdriver_drop.ogg'
|
||||
pickup_sound = 'sound/items/handling/screwdriver_pickup.ogg'
|
||||
sharpness = SHARP_POINTY
|
||||
@@ -44,6 +44,10 @@
|
||||
COLOR_TOOL_YELLOW,
|
||||
)
|
||||
|
||||
/datum/armor/item_screwdriver
|
||||
fire = 50
|
||||
acid = 30
|
||||
|
||||
/obj/item/screwdriver/suicide_act(mob/living/user)
|
||||
user.visible_message(span_suicide("[user] is stabbing [src] into [user.p_their()] [pick("temple", "heart")]! It looks like [user.p_theyre()] trying to commit suicide!"))
|
||||
return BRUTELOSS
|
||||
@@ -68,6 +72,10 @@
|
||||
greyscale_config_inhand_left = null
|
||||
greyscale_config_inhand_right = null
|
||||
|
||||
/datum/armor/item_screwdriver
|
||||
fire = 50
|
||||
acid = 30
|
||||
|
||||
/obj/item/screwdriver/abductor/get_belt_overlay()
|
||||
return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "screwdriver_alien")
|
||||
|
||||
@@ -97,6 +105,10 @@
|
||||
greyscale_config_inhand_left = null
|
||||
greyscale_config_inhand_right = null
|
||||
|
||||
/datum/armor/item_screwdriver
|
||||
fire = 50
|
||||
acid = 30
|
||||
|
||||
/obj/item/screwdriver/power/Initialize(mapload)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/transforming, \
|
||||
@@ -145,6 +157,10 @@
|
||||
/obj/item/screwdriver/red
|
||||
random_color = FALSE
|
||||
|
||||
/datum/armor/item_screwdriver
|
||||
fire = 50
|
||||
acid = 30
|
||||
|
||||
/obj/item/screwdriver/red/Initialize(mapload)
|
||||
. = ..()
|
||||
set_greyscale(colors=list(screwdriver_colors["red"]))
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 100, ACID = 30)
|
||||
armor_type = /datum/armor/item_weldingtool
|
||||
resistance_flags = FIRE_PROOF
|
||||
heat = 3800
|
||||
tool_behaviour = TOOL_WELDER
|
||||
@@ -51,6 +51,10 @@
|
||||
var/activation_sound = 'sound/items/welderactivate.ogg'
|
||||
var/deactivation_sound = 'sound/items/welderdeactivate.ogg'
|
||||
|
||||
/datum/armor/item_weldingtool
|
||||
fire = 100
|
||||
acid = 30
|
||||
|
||||
/obj/item/weldingtool/Initialize(mapload)
|
||||
. = ..()
|
||||
AddElement(/datum/element/update_icon_updates_onmob, ITEM_SLOT_HANDS)
|
||||
@@ -331,6 +335,10 @@
|
||||
max_fuel = 40
|
||||
custom_materials = list(/datum/material/glass=60)
|
||||
|
||||
/datum/armor/item_weldingtool
|
||||
fire = 100
|
||||
acid = 30
|
||||
|
||||
/obj/item/weldingtool/largetank/flamethrower_screwdriver()
|
||||
return
|
||||
|
||||
@@ -344,6 +352,10 @@
|
||||
icon_state = "indwelder_cyborg"
|
||||
toolspeed = 0.5
|
||||
|
||||
/datum/armor/item_weldingtool
|
||||
fire = 100
|
||||
acid = 30
|
||||
|
||||
/obj/item/weldingtool/largetank/cyborg/cyborg_unequip(mob/user)
|
||||
if(!isOn())
|
||||
return
|
||||
@@ -359,6 +371,10 @@
|
||||
custom_materials = list(/datum/material/iron=30, /datum/material/glass=10)
|
||||
change_icons = FALSE
|
||||
|
||||
/datum/armor/item_weldingtool
|
||||
fire = 100
|
||||
acid = 30
|
||||
|
||||
/obj/item/weldingtool/mini/flamethrower_screwdriver()
|
||||
return
|
||||
|
||||
@@ -376,6 +392,10 @@
|
||||
light_range = 0
|
||||
change_icons = FALSE
|
||||
|
||||
/datum/armor/item_weldingtool
|
||||
fire = 100
|
||||
acid = 30
|
||||
|
||||
/obj/item/weldingtool/abductor/process()
|
||||
if(get_fuel() <= max_fuel)
|
||||
reagents.add_reagent(/datum/reagent/fuel, 1)
|
||||
@@ -404,6 +424,10 @@
|
||||
var/last_gen = 0
|
||||
var/nextrefueltick = 0
|
||||
|
||||
/datum/armor/item_weldingtool
|
||||
fire = 100
|
||||
acid = 30
|
||||
|
||||
/obj/item/weldingtool/experimental/process()
|
||||
..()
|
||||
if(get_fuel() < max_fuel && nextrefueltick < world.time)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
pickup_sound = 'sound/items/handling/wirecutter_pickup.ogg'
|
||||
tool_behaviour = TOOL_WIRECUTTER
|
||||
toolspeed = 1
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 50, ACID = 30)
|
||||
armor_type = /datum/armor/item_wirecutters
|
||||
/// If the item should be assigned a random color
|
||||
var/random_color = TRUE
|
||||
/// List of possible random colors
|
||||
@@ -42,6 +42,10 @@
|
||||
COLOR_TOOL_YELLOW,
|
||||
)
|
||||
|
||||
/datum/armor/item_wirecutters
|
||||
fire = 50
|
||||
acid = 30
|
||||
|
||||
/obj/item/wirecutters/Initialize(mapload)
|
||||
if(random_color)
|
||||
set_greyscale(colors = list(pick(wirecutter_colors)))
|
||||
|
||||
@@ -22,7 +22,11 @@
|
||||
attack_verb_simple = list("bash", "batter", "bludgeon", "whack")
|
||||
tool_behaviour = TOOL_WRENCH
|
||||
toolspeed = 1
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 50, ACID = 30)
|
||||
armor_type = /datum/armor/item_wrench
|
||||
|
||||
/datum/armor/item_wrench
|
||||
fire = 50
|
||||
acid = 30
|
||||
|
||||
/obj/item/wrench/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -55,6 +59,10 @@
|
||||
///var to hold the name of the person who suicided
|
||||
var/suicider
|
||||
|
||||
/datum/armor/item_wrench
|
||||
fire = 50
|
||||
acid = 30
|
||||
|
||||
/obj/item/wrench/medical/examine(mob/user)
|
||||
. = ..()
|
||||
if(suicider)
|
||||
@@ -96,6 +104,10 @@
|
||||
attack_verb_simple = list("devastate", "brutalize", "commit a war crime against", "obliterate", "humiliate")
|
||||
tool_behaviour = null
|
||||
|
||||
/datum/armor/item_wrench
|
||||
fire = 50
|
||||
acid = 30
|
||||
|
||||
/obj/item/wrench/combat/Initialize(mapload)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/transforming, \
|
||||
|
||||
Reference in New Issue
Block a user