Derive soul campfire grade from its vanilla base recipe
This commit is contained in:
parent
ac8ac24584
commit
13a8f23247
3 changed files with 16 additions and 3 deletions
|
|
@ -1485,7 +1485,7 @@
|
|||
"spice_soul_campfire": {
|
||||
"itemClass": "resource",
|
||||
"quality": "uncommon",
|
||||
"equipmentMark": 5,
|
||||
"equipmentMark": 4,
|
||||
"material": "SOUL_CAMPFIRE",
|
||||
"policy": "s1-item-metadata-v1"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -13,6 +13,19 @@ class CraftingGradesTest {
|
|||
var grades=CraftingGrades.resolve(Map.of("cheap",1,"costly",14,"output",1,"final",1),Map.of("cheap",2,"costly",14),List.of(recipe("output","costly"),recipe("output","cheap"),recipe("final","costly")));
|
||||
assertEquals(3,grades.get("output"));assertEquals(14,grades.get("final"));
|
||||
}
|
||||
@Test void infusedCampfiresFollowTheirDistinctVanillaRecipes() throws Exception {
|
||||
var nativeMarks=Map.of("bamboo",1,"log",1,"soul_sand",1,"soul_soil",1);
|
||||
var fixed=Map.of("planks",2,"coal",3,"charcoal",3);
|
||||
var recipes=List.of(recipe("stick","planks"),recipe("stick","bamboo"),
|
||||
new CraftingGrades.Recipe("campfire",List.of(Set.of("stick"),Set.of("log"),Set.of("coal","charcoal"))),
|
||||
new CraftingGrades.Recipe("soul_campfire",List.of(Set.of("stick"),Set.of("log"),Set.of("soul_sand","soul_soil"))));
|
||||
var grades=CraftingGrades.resolve(nativeMarks,fixed,recipes);
|
||||
try(var template=CraftingGradesTest.class.getResourceAsStream("/item-templates.json")){
|
||||
var policy=new ItemMetadataPolicy(template);
|
||||
assertEquals(String.valueOf(grades.get("campfire")+1),policy.template("spice_campfire","CAMPFIRE").mark());
|
||||
assertEquals(String.valueOf(grades.get("soul_campfire")+1),policy.template("spice_soul_campfire","SOUL_CAMPFIRE").mark());
|
||||
}
|
||||
}
|
||||
@Test void unanchoredCyclesCannotManufactureMarks(){
|
||||
assertEquals(Map.of("a",1,"b",1),CraftingGrades.resolve(Map.of("a",1,"b",1),Map.of(),List.of(recipe("a","b"),recipe("b","a"))));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@
|
|||
"id": "spice_soul_campfire",
|
||||
"name": "Spice-Infused Soul Campfire",
|
||||
"material": "SOUL_CAMPFIRE",
|
||||
"baseMark": 4,
|
||||
"mark": 5,
|
||||
"baseMark": 3,
|
||||
"mark": 4,
|
||||
"quality": "uncommon",
|
||||
"ingredients": "4 Iron Ingots · 4 raw Melange Spice · 1 Soul Campfire",
|
||||
"details": "Put the vanilla cooker in the centre, spice on the four sides, and iron in the corners. Cooks twice as fast."
|
||||
|
|
|
|||
Loading…
Reference in a new issue

Staff