Adds two new particle smasher recipies

This commit is contained in:
Casey
2021-11-20 05:42:00 -05:00
committed by Darlantan
parent fa3b80f5c6
commit f86e3f2b88
2 changed files with 56 additions and 4 deletions

View File

@@ -760,3 +760,17 @@
. = ..() . = ..()
reagents.add_reagent("protein", 3) reagents.add_reagent("protein", 3)
bitesize = 2 bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/donkpocket/ascended
name = "Donk-pocket EX"
desc = "This donk-pocket has seen things beyond comprehension of mortals. It survived because the fire inside it burned brighter than fire around it."
icon = 'icons/obj/food_vr.dmi'
icon_state = "donkpocket_ascended"
nutriment_amt = 5
nutriment_desc = list("burning fires of radioactive hell" = 20)
heated_reagents = list("supermatter" = 1)
/obj/item/weapon/reagent_containers/food/snacks/donkpocket/ascended/Initialize()
. = ..()
reagents.add_reagent("uranium", 3)
reagents.add_reagent("pyrotoxin", 3)

View File

@@ -2,6 +2,9 @@
* Contains the particle smasher and its recipes. * Contains the particle smasher and its recipes.
*/ */
#define PS_RESULT_STACK "stack"
#define PS_RESULT_ITEM "item"
/obj/machinery/particle_smasher /obj/machinery/particle_smasher
name = "Particle Focus" name = "Particle Focus"
desc = "A strange device used to create exotic matter." desc = "A strange device used to create exotic matter."
@@ -190,7 +193,7 @@
var/max_prob = 0 var/max_prob = 0
for(var/datum/particle_smasher_recipe/R in recipes) // Only things for the smasher. Don't get things like the chef's cake recipes. for(var/datum/particle_smasher_recipe/R in recipes) // Only things for the smasher. Don't get things like the chef's cake recipes.
if(R.probability) // It's actually a recipe you're supposed to be able to make. if(R.probability) // It's actually a recipe you're supposed to be able to make.
if(istype(target, R.required_material)) if(!(R.required_material) || istype(target, R.required_material))
if(energy >= R.required_energy_min && energy <= R.required_energy_max) // The machine has enough Vaguely Defined 'Energy'. if(energy >= R.required_energy_min && energy <= R.required_energy_max) // The machine has enough Vaguely Defined 'Energy'.
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
var/datum/gas_mixture/environment = T.return_air() var/datum/gas_mixture/environment = T.return_air()
@@ -234,8 +237,11 @@
break break
var/result = recipe.result var/result = recipe.result
var/obj/item/stack/material/M = new result(src) if(recipe.recipe_type == PS_RESULT_STACK)
target = M var/obj/item/stack/material/M = new result(src)
target = M
else if(recipe.recipe_type == PS_RESULT_ITEM)
new result(get_turf(src))
update_icon() update_icon()
/obj/machinery/particle_smasher/verb/eject_contents() /obj/machinery/particle_smasher/verb/eject_contents()
@@ -266,6 +272,7 @@
/datum/particle_smasher_recipe /datum/particle_smasher_recipe
var/list/reagents // example: = list("pacid" = 5) var/list/reagents // example: = list("pacid" = 5)
var/list/items // example: = list(/obj/item/weapon/tool/crowbar, /obj/item/weapon/welder) Place /foo/bar before /foo. Do not include fruit. Maximum of 3 items. var/list/items // example: = list(/obj/item/weapon/tool/crowbar, /obj/item/weapon/welder) Place /foo/bar before /foo. Do not include fruit. Maximum of 3 items.
var/recipe_type = PS_RESULT_STACK // Are we producing a stack or an item?
var/result = /obj/item/stack/material/iron // The sheet this will produce. var/result = /obj/item/stack/material/iron // The sheet this will produce.
var/required_material = /obj/item/stack/material/iron // The required material sheet. var/required_material = /obj/item/stack/material/iron // The required material sheet.
@@ -378,4 +385,35 @@
required_atmos_temp_min = 3000 required_atmos_temp_min = 3000
required_atmos_temp_max = 10000 required_atmos_temp_max = 10000
probability = 1 probability = 1
/datum/particle_smasher_recipe/donkpockets_coal
items = list(/obj/item/weapon/reagent_containers/food/snacks/donkpocket)
recipe_type = PS_RESULT_ITEM
result = /obj/item/weapon/ore/coal
required_material = null
required_energy_min = 1
required_energy_max = 500
required_atmos_temp_min = 400
required_atmos_temp_max = 20000
probability = 90
/datum/particle_smasher_recipe/donkpockets_ascend
items = list(/obj/item/weapon/reagent_containers/food/snacks/donkpocket)
reagents = list("phoron" = 120)
recipe_type = PS_RESULT_ITEM
result = /obj/item/weapon/reagent_containers/food/snacks/donkpocket/ascended
required_material = /obj/item/stack/material/uranium
required_energy_min = 501
required_energy_max = 700
required_atmos_temp_min = 400
required_atmos_temp_max = 20000
probability = 20