Skip to content

Commit

Permalink
Fixes hacked autolathes and limbgrowers (tgstation#72853)
Browse files Browse the repository at this point in the history
## About The Pull Request

In my old PR I made a change to how hacked designs worked, however I
later changed it so the code would look cleaner, unaware that this
actually broke them.

This fixes both machines, allowing them to once again print things,
hacked or not.

## Why It's Good For The Game

Closes tgstation#72760
Closes tgstation#72806
Closes tgstation#72823

## Changelog

:cl:
fix: Hacked autolathes and Limbgrowers can now properly print things
again.
/:cl:
  • Loading branch information
JohnFulpWillard committed Jan 23, 2023
1 parent 2e8dfb4 commit aa1c945
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion code/game/machinery/autolathe.dm
Expand Up @@ -156,7 +156,7 @@
if(!istext(design_id))
return

if(!stored_research.researched_designs.Find(design_id) && !imported_designs.Find(design_id))
if(!stored_research.researched_designs.Find(design_id) && !stored_research.hacked_designs.Find(design_id) && !imported_designs.Find(design_id))
return

var/datum/design/design = SSresearch.techweb_design_by_id(design_id)
Expand Down
9 changes: 4 additions & 5 deletions code/game/machinery/limbgrower.dm
Expand Up @@ -164,9 +164,10 @@

if("make_limb")
var/design_id = params["design_id"]
if(!stored_research.researched_designs.Find(design_id) && !imported_designs.Find(design_id))
if(!stored_research.researched_designs.Find(design_id) && !stored_research.hacked_designs.Find(design_id) && !imported_designs.Find(design_id))
return
/// All the reagents we're using to make our organ.
being_built = SSresearch.techweb_design_by_id(design_id)
// All the reagents we're using to make our organ.
var/list/consumed_reagents_list = being_built.reagents_list.Copy()
/// The amount of power we're going to use, based on how much reagent we use.
var/power = 0
Expand All @@ -186,9 +187,7 @@
icon_state = "limbgrower_idleon"
selected_category = params["active_tab"]
addtimer(CALLBACK(src, PROC_REF(build_item), consumed_reagents_list), production_speed * production_coefficient)
. = TRUE

return
return TRUE

/*
* The process of beginning to build a limb or organ.
Expand Down

0 comments on commit aa1c945

Please sign in to comment.