diff --git a/code/__DEFINES/preferences.dm b/code/__DEFINES/preferences.dm
index 26c682d487e..207c01db0dc 100644
--- a/code/__DEFINES/preferences.dm
+++ b/code/__DEFINES/preferences.dm
@@ -12,7 +12,6 @@
#define SOUND_PRAYERS 512
#define ANNOUNCE_LOGIN 1024
#define SOUND_ANNOUNCEMENTS 2048
-#define HIDE_RECIPES 4096
#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|MEMBER_PUBLIC|INTENT_STYLE|MIDROUND_ANTAG|SOUND_INSTRUMENTS|SOUND_SHIP_AMBIENCE|SOUND_PRAYERS|SOUND_ANNOUNCEMENTS)
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index 58745f48fd9..7ffb0c72eb0 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -39,7 +39,6 @@ var/list/preferences_datums = list()
var/ghost_hud = 1
var/inquisitive_ghost = 1
var/allow_midround_antag = 1
- var/hide_recipes = 0
var/preferred_map = null
//character preferences
@@ -344,7 +343,6 @@ var/list/preferences_datums = list()
dat += "Ghost pda: [(chat_toggles & CHAT_GHOSTPDA) ? "All Messages" : "Nearest Creatures"]
"
dat += "Pull requests: [(chat_toggles & CHAT_PULLR) ? "Yes" : "No"]
"
dat += "Midround Antagonist: [(toggles & MIDROUND_ANTAG) ? "Yes" : "No"]
"
- dat += "Hide uncraftable recipes: [(toggles & HIDE_RECIPES) ? "Yes" : "No"]
"
if(config.allow_Metadata)
dat += "OOC Notes: Edit
"
@@ -1125,9 +1123,6 @@ var/list/preferences_datums = list()
if("allow_midround_antag")
toggles ^= MIDROUND_ANTAG
- if("hide_recipes")
- toggles ^= HIDE_RECIPES
-
if("save")
save_preferences()
save_character()
diff --git a/code/modules/client/preferences_toggles.dm b/code/modules/client/preferences_toggles.dm
index 118d8c55e47..8e8e856b4ae 100644
--- a/code/modules/client/preferences_toggles.dm
+++ b/code/modules/client/preferences_toggles.dm
@@ -115,15 +115,6 @@
src << "You will [(prefs.toggles & MIDROUND_ANTAG) ? "now" : "no longer"] be considered for midround antagonist positions."
feedback_add_details("admin_verb","TMidroundA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-/client/verb/togglehiderecipes()
- set name = "Toggle Hidden Recipes"
- set category = "Preferences"
- set desc = "Toggles whether or not recipes you have no components for will be hidden from the tablecrafting menu."
- prefs.toggles ^= HIDE_RECIPES
- prefs.save_preferences()
- src << "Recipes will [(prefs.toggles & HIDE_RECIPES) ? "now" : "no longer"] be hidden if you have no matching components."
- feedback_add_details("admin_verb", "HiddenRecipes")
-
/client/verb/toggletitlemusic()
set name = "Hear/Silence LobbyMusic"
set category = "Preferences"
diff --git a/code/modules/crafting/table.dm b/code/modules/crafting/table.dm
index 27771903139..ec813ea7e80 100644
--- a/code/modules/crafting/table.dm
+++ b/code/modules/crafting/table.dm
@@ -15,27 +15,24 @@
/obj/structure/table/proc/check_contents(datum/table_recipe/R)
check_table()
- var/has_components = 0
main_loop:
for(var/A in R.reqs)
- var/stillneed = R.reqs[A]
+ var/needed_amount = R.reqs[A]
for(var/B in table_contents)
if(ispath(B, A))
if(table_contents[B] >= R.reqs[A])
- has_components = 1
continue main_loop
else
- stillneed -= table_contents[B]
- has_components = 1
- if(stillneed <= 0)
+ needed_amount -= table_contents[B]
+ if(needed_amount <= 0)
continue main_loop
- if(has_components)
- return has_components
-
+ else
+ continue
+ return 0
for(var/A in R.chem_catalysts)
if(table_contents[A] < R.chem_catalysts[A])
- return has_components
- return -1
+ return 0
+ return 1
/obj/structure/table/proc/check_table()
table_contents = list()
@@ -74,10 +71,10 @@
/obj/structure/table/proc/construct_item(mob/user, datum/table_recipe/R)
check_table()
var/send_feedback = 1
- if(check_contents(R) < 0)
+ if(check_contents(R))
if(check_tools(user, R))
if(do_after(user, R.time, target = src))
- if(!check_contents(R) < 0)
+ if(!check_contents(R))
return ", missing component."
if(!check_tools(user, R))
return ", missing tool."
@@ -206,10 +203,9 @@
for(var/datum/table_recipe/R in table_recipes)
if(R.category != categories[viewing_category])
continue
- var/matched_contents = check_contents(R) // Really had no reason to be calling this loop 400+ times for an if/else statement.
- if(matched_contents < 0)
+ if(check_contents(R))
can_craft += R
- else if(matched_contents && !(user.client.prefs.toggles & HIDE_RECIPES && !matched_contents))
+ else
cant_craft += R
for(var/datum/table_recipe/R in can_craft)
@@ -267,8 +263,9 @@
var/req_text = ""
var/tool_text = ""
var/catalist_text = ""
- if(check_contents(R) < 0)
+ if(check_contents(R))
name_text ="[R.name]"
+
else
name_text = "[R.name]"
diff --git a/code/modules/food&drinks/recipes/tablecraft/recipes_burger.dm b/code/modules/food&drinks/recipes/tablecraft/recipes_burger.dm
index e147affcf4b..a775bcbad99 100644
--- a/code/modules/food&drinks/recipes/tablecraft/recipes_burger.dm
+++ b/code/modules/food&drinks/recipes/tablecraft/recipes_burger.dm
@@ -180,7 +180,7 @@
/datum/table_recipe/spellburger
name = "Spell burger"
reqs = list(
- /obj/item/clothing/head/wizard/fake = 1,
+ /obj/item/clothing/head/wizard/fake,
)
result = /obj/item/weapon/reagent_containers/food/snacks/burger/spell
category = CAT_FOOD