From cc16027d1ad55613af082eea0e1b9ac46e831294 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Sat, 18 Apr 2020 19:30:14 +0200 Subject: [PATCH 1/2] Nerfing the bonus reagents from upgraded microwaves. --- code/modules/food_and_drinks/food/snacks.dm | 2 +- .../kitchen_machinery/microwave.dm | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index 0b277e328b..052e786a81 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -285,7 +285,7 @@ All foods are distributed among various categories. Use common sense. reagents.trans_to(S, reagents.total_volume) if(S.bonus_reagents && S.bonus_reagents.len) for(var/r_id in S.bonus_reagents) - var/amount = S.bonus_reagents[r_id] * cooking_efficiency + var/amount = round(S.bonus_reagents[r_id] * cooking_efficiency) if(r_id == /datum/reagent/consumable/nutriment || r_id == /datum/reagent/consumable/nutriment/vitamin) S.reagents.add_reagent(r_id, amount, tastes) else diff --git a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm index a8bb6dc187..c707b9ef64 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm @@ -19,6 +19,7 @@ var/broken = 0 // 0, 1 or 2 // How broken is it??? var/max_n_of_items = 10 var/efficiency = 0 + var/productivity = 0 var/datum/looping_sound/microwave/soundloop var/list/ingredients = list() // may only contain /atom/movables @@ -43,12 +44,14 @@ . = ..() /obj/machinery/microwave/RefreshParts() - efficiency = 0 + efficiency = 0.6 + productivity = 0 + max_n_of_items = 5 for(var/obj/item/stock_parts/micro_laser/M in component_parts) - efficiency += M.rating + efficiency += M.rating * 0.4 + productivity += M.rating for(var/obj/item/stock_parts/matter_bin/M in component_parts) - max_n_of_items = 10 * M.rating - break + max_n_of_items += M.rating * 5 /obj/machinery/microwave/examine(mob/user) . = ..() @@ -83,7 +86,7 @@ if(!(stat & (NOPOWER|BROKEN))) . += "The status display reads:" . += "- Capacity: [max_n_of_items] items." - . += "- Cook time reduced by [(efficiency - 1) * 25]%." + . += "- Cook time reduced by [(productivity - 1) * 25]%." /obj/machinery/microwave/update_icon_state() if(broken) @@ -240,7 +243,7 @@ playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0) return - if(prob(max((5 / efficiency) - 5, dirty * 5))) //a clean unupgraded microwave has no risk of failure + if(prob(dirty * 5 - (5 / efficiency - 5)) //a clean unupgraded microwave has no risk of failure muck() return for(var/obj/O in ingredients) @@ -285,7 +288,7 @@ update_icon() loop(MICROWAVE_MUCK, 4) -/obj/machinery/microwave/proc/loop(type, time, wait = max(12 - 2 * efficiency, 2)) // standard wait is 10 +/obj/machinery/microwave/proc/loop(type, time, wait = max(12 - 2 * productivity, 2)) // standard wait is 10 if(stat & (NOPOWER|BROKEN)) if(type == MICROWAVE_PRE) pre_fail() From 957e92ed8f4e2397be948cd1c8bded86d99f24d8 Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Sat, 18 Apr 2020 19:53:31 +0200 Subject: [PATCH 2/2] Update microwave.dm --- code/modules/food_and_drinks/kitchen_machinery/microwave.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm index c707b9ef64..3e0c9cb4b5 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm @@ -243,7 +243,7 @@ playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0) return - if(prob(dirty * 5 - (5 / efficiency - 5)) //a clean unupgraded microwave has no risk of failure + if(prob(dirty * 5 / (5 * efficiency))) //a clean unupgraded microwave has no risk of failure muck() return for(var/obj/O in ingredients)