Files
GhomandGitHub 6eb2d1674a Implementing materials checks for techweb designs. (#96257)
## About The Pull Request
In similar fashion to what was done with crafting recipes last year,
this year it's time for techweb designs and printed items to be audited.
This is mostly just about consistency, we've a lot of items that can be
printed by protolathes, autolathes, circuit printers and techfab etc.
However they almost all (except most stacks, mainly) have custom
materials that do not match in one way or another with the materials
used by the design, which is what this PR is for.

"But items printed from lathes etc. already get the mats used to make
them." Yes, they do, however that isn't the case for items of the same
type that were spawned in some other way (cargo shuttle, space/maints
loot, mapped, admins), this create a subtle discrepancy. It isn't a huge
deal (in spite of the size of this PR, ton of designs), but given that I
have done something similar with crafting recipes before, I may as well
give it a second arc of some sort and bring things to completion. And
fix a few possible oversights.

TL;DR consistency and stuff

## Why It's Good For The Game
Consistency, unit test checks to make it harder not to be consistent in
the future. Still has a few TODOs like:

- [x] Fixed newly printed, fully charged RCDs costing less than the RCD
cartridges required to fully charge one. EDIT: I had to tweak the newly
added RDD as well because it suffered from the same fundamental issue.
- [x] Fixed plates being made of iron and yet shattering like ceramic
ones. A new subtype for metallic ones has been made.

## Changelog

🆑
refactor: Refactored a few things with techweb designs (the ones for
autolathes, protolathes, circuit printers, mechfabs etc.) to make sure
that the materials of items that can be made from these designs more
closely match the materials used to make them.
fix: Lizard fries no longer need a plate to be made, like all other
treats that used to require plates in a distant past.
balance: Tweaked the materials cost of RCD, RDD and RCD cartridges.
image: Oven trays now have a more metallic hue.
balance: Plates printed printed from lathes won't shatter like ceramic
ones, in virtue of them being made out of iron instead.
/🆑
2026-07-06 00:13:02 -07:00

140 lines
6.9 KiB
Plaintext

//Gun crafting parts til they can be moved elsewhere
// PARTS //
/obj/item/weaponcrafting
abstract_type = /obj/item/weaponcrafting
/obj/item/weaponcrafting/Initialize(mapload)
. = ..()
create_slapcraft_component()
/obj/item/weaponcrafting/proc/create_slapcraft_component()
return
/obj/item/weaponcrafting/receiver
name = "modular receiver"
desc = "A prototype modular receiver and trigger assembly for a firearm."
icon = 'icons/obj/weapons/improvised.dmi'
icon_state = "receiver"
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5.55, /datum/material/cardboard = SHEET_MATERIAL_AMOUNT, /datum/material/plastic = SMALL_MATERIAL_AMOUNT)
/obj/item/weaponcrafting/receiver/create_slapcraft_component()
var/static/list/slapcraft_recipe_list = list(/datum/crafting_recipe/pipegun)
AddElement(
/datum/element/slapcrafting,\
slapcraft_recipes = slapcraft_recipe_list,\
)
/obj/item/weaponcrafting/stock
name = "rifle stock"
desc = "A classic rifle stock that doubles as a grip, roughly carved out of wood."
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 8, /datum/material/plastic = SMALL_MATERIAL_AMOUNT)
resistance_flags = FLAMMABLE
icon = 'icons/obj/weapons/improvised.dmi'
icon_state = "riflestock"
/obj/item/weaponcrafting/stock/create_slapcraft_component()
var/static/list/slapcraft_recipe_list = list(/datum/crafting_recipe/smoothbore_disabler, /datum/crafting_recipe/laser_musket)
AddElement(
/datum/element/slapcrafting,\
slapcraft_recipes = slapcraft_recipe_list,\
)
/obj/item/weaponcrafting/giant_wrench
name = "Big Slappy parts kit"
desc = "Illegal parts to make a giant like wrench commonly known as a Big Slappy."
icon = 'icons/obj/weapons/improvised.dmi'
icon_state = "weaponkit_gw"
/obj/item/weaponcrafting/giant_wrench/create_slapcraft_component() // slappycraft
var/static/list/slapcraft_recipe_list = list(/datum/crafting_recipe/giant_wrench)
AddElement(
/datum/element/slapcrafting,\
slapcraft_recipes = slapcraft_recipe_list,\
)
///These gun kits are printed from the security protolathe to then be used in making new weapons
// GUN PART KIT //
/obj/item/weaponcrafting/gunkit // These don't get a slapcraft component, it's added to the gun - more intuitive player-facing to slap the kit onto the gun.
name = "generic gun parts kit"
desc = "It's an empty gun parts container! Why do you have this?"
icon = 'icons/obj/weapons/improvised.dmi'
icon_state = "kitsuitcase"
/obj/item/weaponcrafting/gunkit/nuclear
name = "advanced energy gun parts kit (lethal/nonlethal)"
desc = "A suitcase containing the necessary gun parts to transform a standard energy gun into an advanced energy gun."
custom_materials = list(
/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5,
/datum/material/glass = SHEET_MATERIAL_AMOUNT,
/datum/material/uranium = SHEET_MATERIAL_AMOUNT * 1.5,
/datum/material/titanium = HALF_SHEET_MATERIAL_AMOUNT,
)
/obj/item/weaponcrafting/gunkit/tesla
name = "tesla cannon parts kit (lethal)"
desc = "A suitcase containing the necessary gun parts to construct a tesla cannon around a stabilized flux anomaly. Handle with care."
icon_state = "weaponskit_tesla"
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 5, /datum/material/silver = SHEET_MATERIAL_AMOUNT * 5)
/obj/item/weaponcrafting/gunkit/xray
name = "x-ray laser gun parts kit (lethal)"
desc = "A suitcase containing the necessary gun parts to turn a laser gun into a x-ray laser gun. Do not point most parts directly towards face."
custom_materials = list(
/datum/material/gold = SHEET_MATERIAL_AMOUNT * 2.5,
/datum/material/uranium = SHEET_MATERIAL_AMOUNT * 2,
/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.5,
/datum/material/titanium = SHEET_MATERIAL_AMOUNT,
/datum/material/bluespace = SHEET_MATERIAL_AMOUNT,
)
/obj/item/weaponcrafting/gunkit/ion
name = "ion carbine parts kit (nonlethal/highly destructive/very lethal (silicons))"
desc = "A suitcase containing the necessary gun parts to transform a standard laser gun into a ion carbine. Perfect against lockers you don't have access to."
custom_materials = list(/datum/material/silver = SHEET_MATERIAL_AMOUNT * 3, /datum/material/iron = SHEET_MATERIAL_AMOUNT * 4, /datum/material/uranium = SHEET_MATERIAL_AMOUNT)
/obj/item/weaponcrafting/gunkit/temperature
name = "temperature gun parts kit (less lethal/very lethal (lizardpeople))"
desc = "A suitcase containing the necessary gun parts to transform a standard energy gun into a temperature gun. Fantastic at birthday parties and killing indigenous populations of lizardpeople."
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 5, /datum/material/silver = SHEET_MATERIAL_AMOUNT * 1.5)
/obj/item/weaponcrafting/gunkit/beam_rifle
name = "\improper Event Horizon anti-existential beam rifle part kit (DOOMSDAY DEVICE, DO NOT CONSTRUCT)"
desc = "What fevered minds wrought this terrible construction kit? To create a frame to harness the strange energies that flow through the Spinward Sector towards such horrible acts of violence?"
custom_materials = list(
/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5,
/datum/material/glass =SHEET_MATERIAL_AMOUNT * 2.5,
/datum/material/diamond = SHEET_MATERIAL_AMOUNT * 2.5,
/datum/material/uranium = SHEET_MATERIAL_AMOUNT * 4,
/datum/material/silver = SHEET_MATERIAL_AMOUNT * 2.25,
/datum/material/gold = SHEET_MATERIAL_AMOUNT * 2.5,
)
/obj/item/weaponcrafting/gunkit/ebow
name = "energy crossbow part kit (less lethal)"
desc = "Highly illegal weapons refurbishment kit that allows you to turn the standard proto-kinetic accelerator into a near-duplicate energy crossbow. Almost like the real thing!"
custom_materials = list(
/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.5,
/datum/material/glass = HALF_SHEET_MATERIAL_AMOUNT * 1.5,
/datum/material/uranium = HALF_SHEET_MATERIAL_AMOUNT * 1.5,
/datum/material/silver = HALF_SHEET_MATERIAL_AMOUNT * 1.5,
)
/obj/item/weaponcrafting/gunkit/hellgun
name = "hellfire laser gun degradation kit (warcrime lethal)"
desc = "Take a perfectly functioning laser gun. Butcher the inside of the gun so it runs hot and mean. You now have a hellfire laser. You monster."
/obj/item/weaponcrafting/gunkit/photon
name = "photon cannon parts kit (nonlethal)"
desc = "A suitcase containing the necessary gun parts to construct a photon cannon around a stabilized flux anomaly. Harness the power of the sun, in the palms of your hands."
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 3, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 7, /datum/material/gold = SHEET_MATERIAL_AMOUNT * 5)
/obj/item/weaponcrafting/gunkit/sks
name = "\improper Sakhno SKS semi-automatic rifle parts kit (lethal)"
desc = "A suitcase containing the necessary gun parts to construct a Sakhno SKS semi-automatic rifle. These things are all over the frontier worlds."