Repository navigation
Forging Station checks an alloy's base Smith perk - #55
XxFran10xX wants to merge 1 commit into
Conversation
An alloy put into a Forging Station now needs the same permission as its base ingredient (the metal or wood it was forged on), with the same refusal message ingredients use. Alloys with no recorded base, or whose base is no longer configured, keep working as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
|
@coderabbitai review |
Action performed
|
Status record
mvn -o verify: 192 tests, coverage gate met; the 4 StationDatabaseCoverageTest/EdgeCoverageTest failures are Windows-only and fail the same way on unmodified origin/main)What changed
CraftingStation.addMaterialnow checks an alloy's Smith perk before accepting it. Until now ingredients were checked (canUseIngredient, thepermission:iningredients.yml) but alloys skipped the check, so a player without e.g. Mythril Smith could forge gear from a Mythril-based alloy.recipe.basein the alloy's JSON (the metal or wood it was forged on). Wood bases use their ownpermission:, which on Main is the matching Smith perk (barkwood iron, maplewood steel, elderwood abyssalite, demonwood mythril).recipein the alloy file, or the base ingredient is no longer configured), or the base has no permission, the alloy keeps working as today.ProfessionPermissions.alloyPermission/canUseAlloy.Other places that accept alloys (checked, unchanged)
IngredientManager.convertItem) and the converter: only show stats or turn raw items into ingredient items; nothing is forged there.tryCompleteAdminCraft: staff only.Saved data
None written or changed. Reads the existing
recipe.basefrom alloy JSON files. On Main all 192 alloy files record a base (138 steel, 18 iron, 18 abyssalite, 16 maplewood, 1 barkwood, 1 elderwood; no mythril-based alloy exists yet).How to test on Dev
professions.steel_smith(check with/lp user <name> permission check professions.steel_smith), take a steel-based alloy (any alloy whosedata/alloys/<id>.jsonhas"base": "steel_ingot").professions.steel_smithand right-click again: the alloy is added ("Added ..." title).professions.iron_smith: same refusal as before (unchanged).🤖 Generated with Claude Code