[MIRROR] Exportable Samples (#11235)

Co-authored-by: Killian <49700375+KillianKirilenko@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-07-24 14:16:57 -07:00
committed by GitHub
parent 6fa7112006
commit 4d1b7e1a09
2 changed files with 25 additions and 1 deletions

View File

@@ -121,6 +121,25 @@ SUBSYSTEM_DEF(supply)
EC.contents[EC.contents.len]["quantity"] = cashmoney.worth EC.contents[EC.contents.len]["quantity"] = cashmoney.worth
EC.value += EC.contents[EC.contents.len]["value"] EC.value += EC.contents[EC.contents.len]["value"]
//Sell research samples and containers with samples in them
if(istype(A, /obj/item/research_sample))
var/obj/item/research_sample/sample = A
EC.contents[EC.contents.len]["value"] = sample.supply_value
EC.contents[EC.contents.len]["quantity"] = 1
EC.value += EC.contents[EC.contents.len]["value"]
if(istype(A, /obj/item/storage/sample_container))
var/obj/item/storage/sample_container/sample_can = A
var/sample_sum = 0
var/obj/item/research_sample/stored_sample
if(LAZYLEN(sample_can.contents))
for(stored_sample in sample_can.contents)
sample_sum += stored_sample.supply_value
EC.contents[EC.contents.len]["quantity"] = "[A.contents.len] sample(s) "
EC.contents[EC.contents.len]["value"] = sample_sum
EC.value += sample_sum
//Sell vaccine samples
if(istype(A, /obj/item/reagent_containers/glass/beaker/vial/vaccine)) if(istype(A, /obj/item/reagent_containers/glass/beaker/vial/vaccine))
var/obj/item/reagent_containers/glass/beaker/vial/vaccine/sale_bottle = A var/obj/item/reagent_containers/glass/beaker/vial/vaccine/sale_bottle = A
if(!istype(CR, /obj/structure/closet/crate/freezer)) if(!istype(CR, /obj/structure/closet/crate/freezer))

View File

@@ -1,6 +1,6 @@
/obj/item/research_sample /obj/item/research_sample
name = "research sample" name = "research sample"
desc = "A curious sample of unknown material. Destructive analysis might yield scientific advances. Alternatively, it may be possible to stabilize it to yield useful resources instead.<br/>" + span_warning("It looks dangerous to handle without heavy gloves or other protective equipment.") desc = "A curious sample of unknown material. It may be possible to stabilize it to yield useful resources, or it could be shipped back to Central for research purposes.<br/>" + span_warning("It looks dangerous to handle without heavy gloves or other protective equipment.")
icon = 'icons/obj/samples.dmi' icon = 'icons/obj/samples.dmi'
icon_state = "sample" icon_state = "sample"
w_class = ITEMSIZE_TINY w_class = ITEMSIZE_TINY
@@ -9,6 +9,7 @@
var/fixed_tech = null //do we have a predetermined tech-group, per request? if so, overrides randomization for icon and name var/fixed_tech = null //do we have a predetermined tech-group, per request? if so, overrides randomization for icon and name
var/rand_tech = null //randomized tech-group from the list below var/rand_tech = null //randomized tech-group from the list below
var/list/valid_techs = list(TECH_COMBAT,TECH_MAGNET,TECH_POWER,TECH_BIO,TECH_DATA,TECH_ENGINEERING,TECH_PHORON,TECH_MATERIAL,TECH_BLUESPACE,TECH_ILLEGAL,TECH_ARCANE,TECH_PRECURSOR) var/list/valid_techs = list(TECH_COMBAT,TECH_MAGNET,TECH_POWER,TECH_BIO,TECH_DATA,TECH_ENGINEERING,TECH_PHORON,TECH_MATERIAL,TECH_BLUESPACE,TECH_ILLEGAL,TECH_ARCANE,TECH_PRECURSOR)
var/supply_value = 5
persist_storable = FALSE //don't shove hazardous shinies into the item bank!! also their properties are (usually) randomized on creation, so saving them is pointless-- you won't get out what you put in persist_storable = FALSE //don't shove hazardous shinies into the item bank!! also their properties are (usually) randomized on creation, so saving them is pointless-- you won't get out what you put in
@@ -217,12 +218,14 @@
rand_level = 1 rand_level = 1
valid_techs = list(TECH_COMBAT,TECH_MAGNET,TECH_POWER,TECH_BIO,TECH_DATA,TECH_ENGINEERING,TECH_PHORON,TECH_MATERIAL) valid_techs = list(TECH_COMBAT,TECH_MAGNET,TECH_POWER,TECH_BIO,TECH_DATA,TECH_ENGINEERING,TECH_PHORON,TECH_MATERIAL)
catalogue_data = list(/datum/category_item/catalogue/information/research_sample/common) catalogue_data = list(/datum/category_item/catalogue/information/research_sample/common)
supply_value = 15
/obj/item/research_sample/uncommon /obj/item/research_sample/uncommon
tech_level = 4 //4~6 tech_level = 4 //4~6
rand_level = 2 rand_level = 2
valid_techs = list(TECH_COMBAT,TECH_MAGNET,TECH_POWER,TECH_BIO,TECH_DATA,TECH_ENGINEERING,TECH_PHORON,TECH_MATERIAL,TECH_BLUESPACE,TECH_ILLEGAL) valid_techs = list(TECH_COMBAT,TECH_MAGNET,TECH_POWER,TECH_BIO,TECH_DATA,TECH_ENGINEERING,TECH_PHORON,TECH_MATERIAL,TECH_BLUESPACE,TECH_ILLEGAL)
catalogue_data = list(/datum/category_item/catalogue/information/research_sample/uncommon) catalogue_data = list(/datum/category_item/catalogue/information/research_sample/uncommon)
supply_value = 35
handle_risk = 50 handle_risk = 50
min_damage = 4 min_damage = 4
@@ -238,6 +241,7 @@
rand_level = 2 rand_level = 2
valid_techs = list(TECH_COMBAT,TECH_MAGNET,TECH_POWER,TECH_BIO,TECH_DATA,TECH_ENGINEERING,TECH_PHORON,TECH_MATERIAL,TECH_BLUESPACE,TECH_ILLEGAL,TECH_ARCANE,TECH_PRECURSOR) valid_techs = list(TECH_COMBAT,TECH_MAGNET,TECH_POWER,TECH_BIO,TECH_DATA,TECH_ENGINEERING,TECH_PHORON,TECH_MATERIAL,TECH_BLUESPACE,TECH_ILLEGAL,TECH_ARCANE,TECH_PRECURSOR)
catalogue_data = list(/datum/category_item/catalogue/information/research_sample/rare) catalogue_data = list(/datum/category_item/catalogue/information/research_sample/rare)
supply_value = 75
handle_risk = 80 handle_risk = 80
min_damage = 5 min_damage = 5
@@ -257,6 +261,7 @@
fixed_tech = TECH_BLUESPACE fixed_tech = TECH_BLUESPACE
var/lightcolor = "#0066CC" var/lightcolor = "#0066CC"
catalogue_data = list(/datum/category_item/catalogue/information/research_sample/bluespace) catalogue_data = list(/datum/category_item/catalogue/information/research_sample/bluespace)
supply_value = 100
handle_risk = 80 handle_risk = 80
min_damage = 5 min_damage = 5