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

143 lines
6.2 KiB
Plaintext

// Gel skins
/datum/atom_skin/med_gel
abstract_type = /datum/atom_skin/med_gel
/datum/atom_skin/med_gel/blue
preview_name = "Blue"
new_icon_state = "medigel_blue"
/datum/atom_skin/med_gel/cyan
preview_name = "Cyan"
new_icon_state = "medigel_cyan"
/datum/atom_skin/med_gel/green
preview_name = "Green"
new_icon_state = "medigel_green"
/datum/atom_skin/med_gel/red
preview_name = "Red"
new_icon_state = "medigel_red"
/datum/atom_skin/med_gel/orange
preview_name = "Orange"
new_icon_state = "medigel_orange"
/datum/atom_skin/med_gel/purple
preview_name = "Purple"
new_icon_state = "medigel_purple"
/obj/item/reagent_containers/medigel
name = "medical gel"
desc = "A medical gel applicator bottle, designed for precision application, with an unscrewable cap."
icon = 'icons/obj/medical/chemical.dmi'
icon_state = "medigel"
inhand_icon_state = "spraycan"
worn_icon_state = "spraycan"
lefthand_file = 'icons/mob/inhands/equipment/hydroponics_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi'
item_flags = NOBLUDGEON
obj_flags = UNIQUE_RENAME
initial_reagent_flags = OPENCONTAINER | NO_SPLASH
slot_flags = ITEM_SLOT_BELT
throwforce = 0
w_class = WEIGHT_CLASS_SMALL
throw_speed = 3
throw_range = 7
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10)
volume = 60
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.25, /datum/material/glass = HALF_SHEET_MATERIAL_AMOUNT)
var/can_fill_from_container = TRUE
var/apply_type = PATCH
var/apply_method = "spray" //the thick gel is sprayed and then dries into patch like film.
var/self_delay = 30
custom_price = PAYCHECK_CREW * 2
/obj/item/reagent_containers/medigel/setup_reskins()
if(icon_state == "medigel") // oh yeah baby raw icon state check to make sure we can't reskin preset gels
AddComponent(/datum/component/reskinable_item, /datum/atom_skin/med_gel)
/obj/item/reagent_containers/medigel/mode_change_message(mob/user)
var/squirt_mode = amount_per_transfer_from_this == initial(amount_per_transfer_from_this)
to_chat(user, span_notice("You will now apply the medigel's contents in [squirt_mode ? "extended sprays":"short bursts"]. You'll now use [amount_per_transfer_from_this] units per use."))
/obj/item/reagent_containers/medigel/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
if(!isliving(interacting_with))
return NONE
if(!reagents || !reagents.total_volume)
to_chat(user, span_warning("[src] is empty!"))
return ITEM_INTERACT_BLOCKING
user.changeNext_move(CLICK_CD_MELEE)
if(interacting_with == user)
interacting_with.visible_message(span_notice("[user] attempts to [apply_method] [src] on [user.p_them()]self."))
if(self_delay)
if(!do_after(user, self_delay, interacting_with))
return ITEM_INTERACT_BLOCKING
if(!reagents || !reagents.total_volume)
return ITEM_INTERACT_BLOCKING
to_chat(interacting_with, span_notice("You [apply_method] yourself with [src]."))
else
log_combat(user, interacting_with, "attempted to apply", src, reagents.get_reagent_log_string())
interacting_with.visible_message(
span_danger("[user] attempts to [apply_method] [src] on [interacting_with]."),
span_userdanger("[user] attempts to [apply_method] [src] on you."),
)
if(!do_after(user, CHEM_INTERACT_DELAY(3 SECONDS, user), interacting_with))
return ITEM_INTERACT_BLOCKING
if(!reagents || !reagents.total_volume)
return ITEM_INTERACT_BLOCKING
interacting_with.visible_message(
span_danger("[user] [apply_method]s [interacting_with] down with [src]."),
span_userdanger("[user] [apply_method]s you down with [src]."),
)
log_combat(user, interacting_with, "applied", src, reagents.get_reagent_log_string())
playsound(src, 'sound/effects/spray.ogg', 30, TRUE, -6)
reagents.trans_to(interacting_with, amount_per_transfer_from_this, transferred_by = user, methods = apply_type)
return ITEM_INTERACT_SUCCESS
/obj/item/reagent_containers/medigel/libital
name = "medical gel (libital)"
desc = "A medical gel applicator bottle, designed for precision application, with an unscrewable cap. This one contains libital, for treating cuts and bruises. Libital does minor liver damage. Diluted with granibitaluri."
icon_state = "brutegel"
list_reagents = list(/datum/reagent/medicine/c2/libital = 24, /datum/reagent/medicine/granibitaluri = 36)
/obj/item/reagent_containers/medigel/aiuri
name = "medical gel (aiuri)"
desc = "A medical gel applicator bottle, designed for precision application, with an unscrewable cap. This one contains aiuri, useful for treating burns. Aiuri does minor eye damage. Diluted with granibitaluri."
icon_state = "burngel"
list_reagents = list(/datum/reagent/medicine/c2/aiuri = 24, /datum/reagent/medicine/granibitaluri = 36)
/obj/item/reagent_containers/medigel/synthflesh
name = "medical gel (synthflesh)"
desc = "A medical gel applicator bottle, designed for precision application, with an unscrewable cap. This one contains synthflesh, a slightly toxic medicine capable of healing bruises, burns, and husks."
icon_state = "synthgel"
list_reagents = list(/datum/reagent/medicine/c2/synthflesh = 60)
list_reagents_purity = 1
amount_per_transfer_from_this = 60
possible_transfer_amounts = list(5, 10, 60)
custom_price = PAYCHECK_CREW * 5
/obj/item/reagent_containers/medigel/synthflesh/examine(mob/user)
. = ..()
if(reagents.total_volume >= 60)
. += span_info("One full bottle can restore a corpse husked by burns.")
/obj/item/reagent_containers/medigel/synthflesh/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
if(iscarbon(interacting_with) && reagents?.total_volume)
var/mob/living/carbon/carbies = interacting_with
if(HAS_TRAIT_FROM(carbies, TRAIT_HUSK, BURN) && carbies.get_fire_loss() > UNHUSK_DAMAGE_THRESHOLD * 2.5)
// give them a warning if the mob is a husk but synthflesh won't unhusk yet
carbies.visible_message(span_boldwarning("[carbies]'s burns need to be repaired first before synthflesh will unhusk it!"))
return ..()
/obj/item/reagent_containers/medigel/sterilizine
name = "sterilizer gel"
desc = "gel bottle loaded with non-toxic sterilizer. Useful in preparation for surgery."
icon_state = "medigel_blue"
list_reagents = list(/datum/reagent/space_cleaner/sterilizine = 60)
custom_price = PAYCHECK_CREW * 2