diff options
Diffstat (limited to 'test-client/tiles.ts')
-rw-r--r-- | test-client/tiles.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test-client/tiles.ts b/test-client/tiles.ts index 150bfdd2..dfdeff9a 100644 --- a/test-client/tiles.ts +++ b/test-client/tiles.ts @@ -109,7 +109,7 @@ const door: Component = c => { c.fillRect(-0.5, -0.1, 1, 0.2) } -const iref = (name: ItemName, ...content: string[]): Component => ITEMS[name] ? ITEMS[name](content) : () => { } +const iref = (name: ItemName): Component => c => draw_item_sprite(c, name) const tref = (name: TileName): Component => c => TILES[name].forEach(f => f(c)) export type ItemName = string @@ -138,9 +138,11 @@ const ITEMS: { [key in ItemName]: (c: string[]) => Component } = { "strawberry": () => circle(0.3, "rgb(228, 79, 111)"), "tomato-juice": () => circle(0.3, "#b80000"), "tomato-soup": () => circle(0.3, "#ff2600"), - "tomato": () => circle(0.3, "#d63838"), "water": () => circle(0.3, "rgb(86, 92, 206)"), + "tomato": () => circle(0.3, "#d63838"), "sliced-tomato": () => circle(0.3, "#d16363", "#d63838", 0.08), + "lettuce": () => circle(0.3, "#64a30b"), + "sliced-lettuce": () => circle(0.3, "#a0da4f", "#64a30b", 0.08), "pot": i => c => (circle(0.35, "rgb(29, 29, 29)", "rgb(39, 39, 39)", 0.04)(c), arrange_items(...i)(c)), "foodprocessor": i => c => (circle(0.35, "rgb(86, 168, 189)", "rgb(88, 222, 255)", 0.04)(c), arrange_items(...i)(c)), |