Skip to content

Commit

Permalink
Switch to TypeScript.
Browse files Browse the repository at this point in the history
  • Loading branch information
Crowbar764 committed Sep 26, 2023
1 parent 8696d30 commit 14f1e23
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion code/game/machinery/kitchen/microwave.dm
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
var/list/data = list()

data["operating"] = operating
data["broken"] = broken
data["broken"] = (broken > 0)
data["dirty"] = (dirty == 100)

var/list/ingredients = list()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,21 @@ import { useBackend } from '../backend';
import { Button, NoticeBox, Section, Flex, Box } from '../components';
import { Window } from '../layouts';

type Ingredient = {
name: string;
count: number;
measure: string;
};

type BackendContext = {
operating: 0 | 1;
broken: 0 | 1;
dirty: 0 | 1;
ingredients: Ingredient[];
};

export const Microwave = (props, context) => {
const { data, act } = useBackend(context);
const { data, act } = useBackend<BackendContext>(context);
const { operating, broken, dirty, ingredients } = data;

return (
Expand Down

0 comments on commit 14f1e23

Please sign in to comment.