diff --git a/code/controllers/subsystems/supply.dm b/code/controllers/subsystems/supply.dm index a3b78dd6b1..39ba8fd541 100644 --- a/code/controllers/subsystems/supply.dm +++ b/code/controllers/subsystems/supply.dm @@ -121,6 +121,25 @@ SUBSYSTEM_DEF(supply) EC.contents[EC.contents.len]["quantity"] = cashmoney.worth 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)) var/obj/item/reagent_containers/glass/beaker/vial/vaccine/sale_bottle = A if(!istype(CR, /obj/structure/closet/crate/freezer)) diff --git a/code/modules/samples/samples.dm b/code/modules/samples/samples.dm index 23e233c738..101a15c0d0 100644 --- a/code/modules/samples/samples.dm +++ b/code/modules/samples/samples.dm @@ -1,6 +1,6 @@ /obj/item/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.
" + 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.
" + span_warning("It looks dangerous to handle without heavy gloves or other protective equipment.") icon = 'icons/obj/samples.dmi' icon_state = "sample" 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/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/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 @@ -217,12 +218,14 @@ rand_level = 1 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) + supply_value = 15 /obj/item/research_sample/uncommon tech_level = 4 //4~6 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) catalogue_data = list(/datum/category_item/catalogue/information/research_sample/uncommon) + supply_value = 35 handle_risk = 50 min_damage = 4 @@ -238,6 +241,7 @@ 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) catalogue_data = list(/datum/category_item/catalogue/information/research_sample/rare) + supply_value = 75 handle_risk = 80 min_damage = 5 @@ -257,6 +261,7 @@ fixed_tech = TECH_BLUESPACE var/lightcolor = "#0066CC" catalogue_data = list(/datum/category_item/catalogue/information/research_sample/bluespace) + supply_value = 100 handle_risk = 80 min_damage = 5