From a0d92e59b663ee0ea1349aaf81a9879312eaa463 Mon Sep 17 00:00:00 2001 From: Casper Date: Thu, 28 Sep 2023 12:43:00 +0100 Subject: [PATCH] Tweaks --- code/game/machinery/kitchen/microwave.dm | 6 +++--- tgui/packages/tgui/interfaces/Microwave.tsx | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/code/game/machinery/kitchen/microwave.dm b/code/game/machinery/kitchen/microwave.dm index ef36e94e8617..220772e98b17 100644 --- a/code/game/machinery/kitchen/microwave.dm +++ b/code/game/machinery/kitchen/microwave.dm @@ -174,7 +174,7 @@ var/list/items_measures = list() var/list/items_measures_p = list() - for (var/obj/contents_item in contents) + for (var/obj/contents_item as anything in contents) var/display_name = contents_item.name if (istype(contents_item, /obj/item/reagent_container/food/snacks/tofu)) @@ -192,7 +192,7 @@ items_measures_p[display_name] = "fillets of meat" items_counts[display_name]++ - for (var/contents_item as anything in items_counts) + for (var/contents_item in items_counts) var/list/item = list() item["name"] = capitalize(contents_item) @@ -207,7 +207,7 @@ ingredients += list(item) - for (var/datum/reagent/contents_reagent in reagents.reagent_list) + for (var/datum/reagent/contents_reagent as anything in reagents.reagent_list) var/list/reagent = list() reagent["count"] = contents_reagent.volume diff --git a/tgui/packages/tgui/interfaces/Microwave.tsx b/tgui/packages/tgui/interfaces/Microwave.tsx index 5c72945ed9ef..da16a9f44b49 100644 --- a/tgui/packages/tgui/interfaces/Microwave.tsx +++ b/tgui/packages/tgui/interfaces/Microwave.tsx @@ -1,5 +1,6 @@ import { useBackend } from '../backend'; import { Button, NoticeBox, Section, Flex, Box } from '../components'; +import { BooleanLike } from 'common/react'; import { Window } from '../layouts'; type Ingredient = { @@ -9,9 +10,9 @@ type Ingredient = { }; type BackendContext = { - operating: 0 | 1; - broken: 0 | 1; - dirty: 0 | 1; + operating: BooleanLike; + broken: BooleanLike; + dirty: BooleanLike; ingredients: Ingredient[]; }; @@ -24,7 +25,7 @@ export const Microwave = (props, context) => {