mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-13 11:12:14 +00:00
* Completely deprecates reagents in protolathe/circuit imprinter/techfab designs (#78939) ## About The Pull Request A long time ago, it was common for designs to cost reagents in addition to normal materials. Every circuit board used to require sulfuric acid, for example. However, these designs have slowly been whittled away, and only two remain: the death syphon PKA modkit, which costs blood, and paint remover in the service lathe, which costs acetone. Although these two designs still use the old system, it is very outdated, and it shows. TGUI doesn't take reagent costs into account at all. Reagent costs aren't displayed on mouse over like material costs, and the design won't be greyed out if there necessary reagents aren't present. If you try and fail to print one of the two designs, the protolathe will tell you that reagents are missing, but it won't say what reagents. In fact, there is not way to find out what reagents are required without code diving. ## Why It's Good For The Game In light of how outdated and unsupported this system is, I think it makes sense to deprecate it almost entirely.* Now, protolathes, circuit imprinters and techfabs will no longer take reagent costs into account at all, even if a design does define reagent costs. The machines also no longer need beakers to be built, and reagents can't be transferred into them. The two remaining designs that did use reagent costs now don't, and I've updated the designs unit test to fail if any non-limbgrower design does set any reagent costs. *Limb growers are the exception, as they're fully functional and work fine. ## Changelog 🆑 del: Protolathe/circuit imprinter/techfab designs costing reagents is now totally deprecated. /🆑 * Completely deprecates reagents in protolathe/circuit imprinter/techfab designs * medigun reagent removal --------- Co-authored-by: GPeckman <21979502+GPeckman@users.noreply.github.com> Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
35 lines
2.7 KiB
Plaintext
35 lines
2.7 KiB
Plaintext
/datum/unit_test/designs
|
|
|
|
/datum/unit_test/designs/Run()
|
|
//Can't use allocate because of bug with certain datums
|
|
var/datum/design/default_design = new /datum/design()
|
|
var/datum/design/surgery/default_design_surgery = new /datum/design/surgery()
|
|
|
|
for(var/path in subtypesof(/datum/design))
|
|
if (ispath(path, /datum/design/surgery)) //We are checking surgery design separatly later since they work differently
|
|
continue
|
|
var/datum/design/current_design = new path //Create an instance of each design
|
|
if (current_design.id == DESIGN_ID_IGNORE) //Don't check designs with ignore ID
|
|
continue
|
|
if (isnull(current_design.name) || current_design.name == default_design.name) //Designs with ID must have non default/null Name
|
|
TEST_FAIL("Design [current_design.type] has default or null name var but has an ID")
|
|
if ((!isnull(current_design.materials) && LAZYLEN(current_design.materials)) || (!isnull(current_design.reagents_list) && LAZYLEN(current_design.reagents_list))) //Design requires materials
|
|
if ((isnull(current_design.build_path) || current_design.build_path == default_design.build_path) && (isnull(current_design.make_reagent) || current_design.make_reagent == default_design.make_reagent)) //Check if design gives any output
|
|
TEST_FAIL("Design [current_design.type] requires materials but does not have have any build_path or make_reagent set")
|
|
else if (!isnull(current_design.build_path) || !isnull(current_design.build_path)) // //Design requires no materials but creates stuff
|
|
TEST_FAIL("Design [current_design.type] requires NO materials but has build_path or make_reagent set")
|
|
if (length(current_design.reagents_list) && !(current_design.build_type & LIMBGROWER))
|
|
TEST_FAIL("Design [current_design.type] requires reagents but isn't a limb grower design. Reagent costs are only supported by limb grower designs")
|
|
|
|
for(var/path in subtypesof(/datum/design/surgery))
|
|
var/datum/design/surgery/current_design = new path //Create an instance of each design
|
|
if (isnull(current_design.id) || current_design.id == default_design_surgery.id) //Check if ID was not set
|
|
TEST_FAIL("Surgery Design [current_design.type] has no ID set")
|
|
if (isnull(current_design.id) || current_design.name == default_design_surgery.name) //Check if name was not set
|
|
TEST_FAIL("Surgery Design [current_design.type] has default or null name var")
|
|
if (isnull(current_design.desc) || current_design.desc == default_design_surgery.desc) //Check if desc was not set
|
|
TEST_FAIL("Surgery Design [current_design.type] has default or null desc var")
|
|
if (isnull(current_design.surgery) || current_design.surgery == default_design_surgery.surgery) //Check if surgery was not set
|
|
TEST_FAIL("Surgery Design [current_design.type] has default or null surgery var")
|
|
|