Skip to content

feat: build sandwiches on a cutting board, layer by layer - #99

Merged
JustinasLa merged 1 commit into
mainfrom
feat/sandwiches
Oct 29, 2026
Merged

JustinasLa merged 1 commit into
mainfrom
feat/sandwiches

Conversation

@JustinasLa

Copy link
Copy Markdown
Contributor

Summary

Sandwiches, built on a cutting board and tested on Dev:

  1. Right-click an empty board with a slice of bread to start one.
  2. Right-click with fillings (jam, paste, butter, cheese, cut or chopped vegetables) to lay them on it. An empty hand takes the top layer back.
  3. Right-click with another slice to close it.
  4. Right-click the closed sandwich to pick it up. Any item in hand works, so holding slices you can click again to start the next one.
  • Layers: each lies in its own sandwich_N slot of the furniture (InteractibleFurniture), lifted onto the one below by its thickness. Layer models are drawn in the board's coordinates. Layers are stacked again on startup and when their chunk loads.
  • The sandwich:
    • Food is what its layers hold, counting lasting tags such as cooked or burnt bread.
    • Nutrition is the layers' average, weighted by food.
    • Quality, freshness and variety come from all layers (new composition context SANDWICH).
    • Its fillings name it: "Cheese, Tomato and Strawberry Jam Sandwich".
    • A layer's sandwich-origin sets the sandwich's origin, so types.yml overrides can give it its own look (jam sandwiches).
  • Rules:
    • A board with other items on it won't start a sandwich.
    • A slice can't go straight onto a slice.
    • max-fillings (default 6) and the furniture's slot count limit the fillings.
    • A broken board drops a closed sandwich whole and an open one as its layers.
  • Config: new sandwiches.yml, which sets the furniture ids, max-fillings, the output food line, and for each layer its types, name, thickness and models (tag-specific and fallback entries).
    • TLibs returns dirt for an ItemsAdder item that doesn't exist, so dirt counts as a missing model.

The furniture slots, the sandwich food type, its models and the ItemsAdder layer models are server config. They're on Dev only so far, like the juicer and bread slices.

Documentation impact

  • Central Cooking documentation: no change. sandwiches.yml documents its keys, and the README lists the feature.

Contract

  • Affected behavior:
    • Clicking a cutting board with a slice of bread, or a board with a sandwich on it.
    • Breaking a board with a sandwich on it.
    • Nothing changes for boards without a sandwich.
  • Tests run: mvn -o -B clean verify: 1298 tests pass and line coverage is still 100%. New SandwichCoverageTest; CookingLifecycleTest and CommandManagerCoverageTest cover the new config file and composition context.
  • Player wiki (ProvinceSystem /wiki/cooking or related pages): no change.

Notes

  • Config source is src/main/resources. Do not edit target/.
  • cookware.yml is not loaded.

🤖 Generated with Claude Code

A slice of bread on an empty board starts a sandwich, fillings go on top,
another slice closes it and a right-click picks it up. Each layer lies in a
sandwich_N slot of the furniture, lifted onto the one below by its thickness.
The sandwich's food is what its layers hold, its nutrition their food-weighted
average, and its quality, freshness and variety come from all of them
(composition context SANDWICH). Its fillings name it, and a layer can set its
origin so types.yml overrides give it its own look (a jam sandwich).

Layers, models and limits are configured in sandwiches.yml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 29, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 94c02c95-2623-479d-b49c-09279d58e127
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the size:XL 500-999 effective changed lines (tests excluded in mixed PRs). label Oct 29, 2026
@JustinasLa
JustinasLa merged commit feb8b47 into main Oct 29, 2026
3 checks passed
@JustinasLa
JustinasLa deleted the feat/sandwiches branch October 29, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 effective changed lines (tests excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant