Mitigates (autolathe) recycling exploits by minimizing what can be recycled, adding unit tests and fixing the recipes (#10375)

* Mitigates research recycling exploits by minimizing what can be recycled

* Moves the research design check into a new unit test

* Adds unit test for stack material recipes costs and fixes these costs

* Instead of changing recipes the resulting materials are worth less

* Crap fix
This commit is contained in:
Jiří Barouš
2020-10-30 12:20:59 +01:00
committed by GitHub
parent 821d790332
commit 524bf9c417
32 changed files with 205 additions and 81 deletions
+2 -2
View File
@@ -267,14 +267,14 @@
..()
recipes += new /datum/stack_recipe_list("[display_name] construction",
list(
new /datum/stack_recipe("phoron floor tile", /turf/simulated/floor/phoron, 1, 4, 20)
new /datum/stack_recipe("phoron floor tile", /obj/item/stack/tile/phoron, 1, 4, 20)
))
/material/diamond/generate_recipes()
..()
recipes += new /datum/stack_recipe_list("[display_name] construction",
list(
new /datum/stack_recipe("diamond floor tile", /turf/simulated/floor/diamond, 1, 4, 20)
new /datum/stack_recipe("diamond floor tile", /obj/item/stack/tile/diamond, 1, 4, 20)
))
/material/leather/generate_recipes()
@@ -7,6 +7,7 @@
throw_speed = 3
throw_range = 3
max_amount = 50
recyclable = TRUE // Pretty much all materials should be recyclable
var/default_type = DEFAULT_WALL_MATERIAL
var/material/material
+5 -2
View File
@@ -4,7 +4,10 @@
uses_charge = 1
charge_costs = list(1000)
gender = NEUTER
matter = null // Don't shove it in the autholathe.
// Don't shove it in the autholathe
recyclable = FALSE
matter = null
/obj/item/stack/material/cyborg/New()
if(..())
@@ -39,4 +42,4 @@
As a synthetic, you can gain more reinforced glass by recharging."
icon_state = "sheet-rglass"
default_type = MATERIAL_GLASS_REINFORCED
charge_costs = list(500, 1000)
charge_costs = list(500, 1000)