Skip to content

🛂 Crafting — Authority Abstractions

📦 Folder Overview

This folder defines authority decision seams for the Crafting system.

Crafting is netcode-agnostic. These interfaces allow external systems to decide whether a mutation is permitted.


🧩 What Lives Here

  • ICraftingAuthority — service-level mutation gating
  • ICraftingBenchAuthority — optional, interaction-level gating

These interfaces are implemented by the consuming project or optional modules.


🎯 Purpose

These abstractions provide a consistent way to:

  • gate crafting mutations (create, cancel, pause, resume)
  • integrate with external authority or permission systems
  • keep Crafting independent from networking or ownership models

🧠 Usage Guidance

ICraftingAuthority

Consulted by the Crafting service when deciding whether a crafting mutation should be allowed.

Typical use cases include gating:

  • job creation or cancellation
  • pausing or resuming crafting work
  • other state mutations initiated by the service

Returning false blocks the mutation and provides a failure reason.

If no authority implementation is configured, Crafting behaves permissively and allows mutations by default.

Callers may pass a null owner when gating mutations that are not owner-specific (for example scheduler configuration).

This interface defines a single decision check. It does not enforce when or how often it is called.


ICraftingBenchAuthority

A lightweight authority seam intended for:

  • workbenches
  • trigger-based crafting
  • local interaction gating

This interface is not a networking or authority model.

It allows bench or interaction code to decide whether it should attempt to call the Crafting service.


⚠️ Important Notes

  • Authority behaviour depends on the implementation provided by the project
  • Crafting does not enforce a specific authority model
  • Missing or permissive implementations may allow all mutations

  • Crafting Core (mutation flow and service behaviour)
  • Integrations (authority adapters and examples)