diff --git a/README.md b/README.md index e014952..31361ab 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,7 @@ Arsenal, Armory, Archery and MIAPI turns up no module anywhere that offers a `gem_melee_large` slot - the large gemstone is defined and then has nowhere to go. So there are two here: a medium socket, and a great socket for the large gem. Each is a heavier counterweight than the last, paid for in swing speed. +Either socket takes an Apothic gem case as readily as a gemstone - see below. **Socketed arms and legs** (`packs/armory`) finish a set Armory started. Armory sockets four pieces - helmet, chestplate, backplate and belt - and stops @@ -198,6 +199,23 @@ likes: put a case in an armour piece's `gem_armor_medium` slot instead of a gemstone, and the piece reports an Apotheosis socket. The gem itself goes in at a smithing table, through Apotheosis' own socketing recipe, not at the workbench. +A weapon takes one too, and there is a case per gem size to say so. A slot +accepts what its `allowed` list names: the socketed pommels above ask for +`gem_melee_medium` and `gem_melee_large`, and the baseline sockets - Arsenal's +own socket pommel, and the dual socket guard that carries two of them - ask for +`gem_melee_small`. So the case is allowed in the medium slots, a **great case** +answers for the large, and a **small case** for the small, which is the same +trade in a sword that it is in a pauldron. The small one names the armour size +key as well, because a small slot is a small slot wherever it was cut and a key +nothing asks for costs nothing. + +Nothing else changes. Sockets are counted per case rather than per item, so a +sword with a case in its pommel reports one the same way a chestplate does and +a guard holding two small cases reports two; Apotheosis sockets gems into +weapons already. All three are filed under `packs/apotheosis` rather than with +the pommels, because a case without Apotheosis is an item that grants nothing, +while a case without Arsenal is one that simply never fits anywhere. + One socket a case, and none of it is in the module JSON, because every route through data is closed. MIAPI's `components` property sets a component rather than adding to it, so two cases both writing `1` leave the piece with one socket diff --git a/src/main/java/eu/abdelbaki/cmmodular/ApothicSockets.java b/src/main/java/eu/abdelbaki/cmmodular/ApothicSockets.java index 1893db2..3e7127a 100644 --- a/src/main/java/eu/abdelbaki/cmmodular/ApothicSockets.java +++ b/src/main/java/eu/abdelbaki/cmmodular/ApothicSockets.java @@ -45,9 +45,17 @@ public final class ApothicSockets { private static final String EVENT = "dev.shadowsoffire.apotheosis.event.GetItemSocketsEvent"; private static final String MIAPI_MODULE = "smartin.miapi.modules.ItemModule"; - /** Module ids that are a gem case, generic and one per limb socket. */ + /** + * Module ids that are a gem case: one per gem size, one per limb socket. + * A case is not listed twice for being allowed in a pommel as well as in + * armour - it is one module either way, and this counts modules, so a + * guard holding two small cases is worth two sockets by the same rule + * that makes a chestplate holding one worth one. + */ private static final List CASES = List.of( "cmmodular:gem/apothic_case", + "cmmodular:gem/case_small", + "cmmodular:gem/case_great", "cmmodular:gem/limb/case_arm_left", "cmmodular:gem/limb/case_arm_right", "cmmodular:gem/limb/case_leg_left", diff --git a/src/main/resources/assets/cmmodular/lang/en_us.json b/src/main/resources/assets/cmmodular/lang/en_us.json index 5f5fad3..0b3ad85 100644 --- a/src/main/resources/assets/cmmodular/lang/en_us.json +++ b/src/main/resources/assets/cmmodular/lang/en_us.json @@ -25,6 +25,8 @@ "miapi.module.cmmodular.armor.socket.leg_right.name": "%s Heavy Socket Right Pants", "miapi.module.cmmodular.armor.socket.leg_right.description": "Heavy Pants with a Gemstone set into the Knee", "miapi.module.cmmodular.gem.apothic_case.name": "Apothic Gem Case", + "miapi.module.cmmodular.gem.case_small.name": "Small Apothic Gem Case", + "miapi.module.cmmodular.gem.case_great.name": "Great Apothic Gem Case", "miapi.module.cmmodular.gem.limb.gem_arm_left.name": "%s Left Pauldron Gemstone", "miapi.module.cmmodular.gem.limb.case_arm_left.name": "Left Pauldron Apothic Gem Case", "miapi.module.cmmodular.gem.limb.gem_arm_right.name": "%s Right Pauldron Gemstone", diff --git a/src/main/resources/packs/apotheosis/data/cmmodular/miapi/modules/gem/apothic_case.json b/src/main/resources/packs/apotheosis/data/cmmodular/miapi/modules/gem/apothic_case.json index df4f849..6fea6c3 100644 --- a/src/main/resources/packs/apotheosis/data/cmmodular/miapi/modules/gem/apothic_case.json +++ b/src/main/resources/packs/apotheosis/data/cmmodular/miapi/modules/gem/apothic_case.json @@ -9,13 +9,18 @@ } }, "allowed_in_slots": [ - "gem_armor_medium" + "gem_armor_medium", + "gem_melee_medium" ], "tag": [ "gem_armor", "gem_armor_medium", "gem_armor_generic", - "gem_armor_medium_generic" + "gem_armor_medium_generic", + "gem_melee", + "gem_melee_medium", + "gem_melee_generic", + "gem_melee_medium_generic" ], "material_property": [ "default" diff --git a/src/main/resources/packs/apotheosis/data/cmmodular/miapi/modules/gem/case_great.json b/src/main/resources/packs/apotheosis/data/cmmodular/miapi/modules/gem/case_great.json new file mode 100644 index 0000000..bcd0dff --- /dev/null +++ b/src/main/resources/packs/apotheosis/data/cmmodular/miapi/modules/gem/case_great.json @@ -0,0 +1,37 @@ +{ + "comment": "The great socket takes a large gem and nothing else, so the case that goes in it has to be a large one too - `gem_melee_large` is the key the great pommel asks for, and a medium case does not answer to it.", + "display_name": "miapi.module.cmmodular.gem.case_great.name", + "model": { + "path": "miapi:models/item/armor/gems/large/[material.texture].json", + "transform": { + "rotation": {"x": 0, "y": 0, "z": 0}, + "translation": {"x": 0, "y": 0, "z": 0}, + "scale": {"x": 1, "y": 1, "z": 1} + } + }, + "allowed_in_slots": [ + "gem_melee_large" + ], + "tag": [ + "gem_melee", + "gem_melee_large", + "gem_melee_generic", + "gem_melee_large_generic" + ], + "material_property": [ + "default" + ], + "priority": 0, + "repair_priority": 0, + "rarity": "rare", + "allowed_material": { + "allowedMaterials": [ + "metal", + "crystal", + "glass", + "bone", + "stone" + ], + "cost": 2 + } +} diff --git a/src/main/resources/packs/apotheosis/data/cmmodular/miapi/modules/gem/case_small.json b/src/main/resources/packs/apotheosis/data/cmmodular/miapi/modules/gem/case_small.json new file mode 100644 index 0000000..1324776 --- /dev/null +++ b/src/main/resources/packs/apotheosis/data/cmmodular/miapi/modules/gem/case_small.json @@ -0,0 +1,42 @@ +{ + "comment": "The small case, for the slots a small gemstone goes in - Arsenal's own socket pommel and the dual socket guard, which is two of them. Both size keys are named because a small slot is a small slot whether it was cut into a weapon or into armour, and a key nothing asks for costs nothing.", + "display_name": "miapi.module.cmmodular.gem.case_small.name", + "model": { + "path": "miapi:models/item/armor/gems/small/[material.texture].json", + "transform": { + "rotation": {"x": 0, "y": 0, "z": 0}, + "translation": {"x": 0, "y": 0, "z": 0}, + "scale": {"x": 1, "y": 1, "z": 1} + } + }, + "allowed_in_slots": [ + "gem_melee_small", + "gem_armor_small" + ], + "tag": [ + "gem_melee", + "gem_melee_small", + "gem_melee_generic", + "gem_melee_small_generic", + "gem_armor", + "gem_armor_small", + "gem_armor_generic", + "gem_armor_small_generic" + ], + "material_property": [ + "default" + ], + "priority": 0, + "repair_priority": 0, + "rarity": "rare", + "allowed_material": { + "allowedMaterials": [ + "metal", + "crystal", + "glass", + "bone", + "stone" + ], + "cost": 2 + } +}