diff --git a/.timetracker b/.timetracker index a1b179c..a0774b4 100644 --- a/.timetracker +++ b/.timetracker @@ -1,5 +1,5 @@ { - "total": 20766, + "total": 22680, "sessions": [ { "begin": "2026-03-17T23:54:43+01:00", @@ -40,6 +40,21 @@ "begin": "2026-05-31T01:52:40+02:00", "end": "2026-05-31T02:00:30+02:00", "duration": 470 + }, + { + "begin": "2026-05-31T02:24:20+02:00", + "end": "2026-05-31T02:49:01+02:00", + "duration": 1481 + }, + { + "begin": "2026-05-31T03:09:33+02:00", + "end": "2026-05-31T03:10:03+02:00", + "duration": 29 + }, + { + "begin": "2026-05-31T03:10:07+02:00", + "end": "2026-05-31T03:16:52+02:00", + "duration": 404 } ] } \ No newline at end of file diff --git a/ButterflyPins/Blocks/BlockButterflyPinBoard.cs b/ButterflyPins/Blocks/BlockButterflyPinBoard.cs index 51e8a8d..dbc1bee 100644 --- a/ButterflyPins/Blocks/BlockButterflyPinBoard.cs +++ b/ButterflyPins/Blocks/BlockButterflyPinBoard.cs @@ -1,5 +1,4 @@ using ButterflyPins.BlockEntities; -using System; using Vintagestory.API.Common; using Vintagestory.API.MathTools; @@ -7,8 +6,6 @@ namespace ButterflyPins.Blocks; public class BlockButterflyPinBoard : Block { - private const string ButterflyPinPrefix = "clothes-butterflypin-"; - public override bool OnBlockInteractStart(IWorldAccessor world, IPlayer byPlayer, BlockSelection blockSel) { if (blockSel == null) @@ -38,32 +35,4 @@ public class BlockButterflyPinBoard : Block base.OnBlockBroken(world, pos, byPlayer, dropQuantityMultiplier); } - - public override bool ConsumeCraftingIngredients(ItemSlot[] slots, ItemSlot outputSlot, GridRecipe matchingRecipe) - { - bool preservedPin = false; - - foreach (ItemSlot slot in slots) - { - if (slot.Empty) - continue; - - if (!preservedPin && IsButterflyPin(slot.Itemstack)) - { - preservedPin = true; - continue; - } - - slot.TakeOut(1); - slot.MarkDirty(); - } - - return true; - } - - private static bool IsButterflyPin(ItemStack stack) - { - AssetLocation? code = stack.Collectible?.Code; - return code != null && code.Path.StartsWith(ButterflyPinPrefix, StringComparison.Ordinal); - } } \ No newline at end of file diff --git a/ButterflyPins/assets/dusiulkaspinboard/recipes/grid/pinboard2x2.json b/ButterflyPins/assets/dusiulkaspinboard/recipes/grid/pinboard2x2.json index b111412..3adbeb1 100644 --- a/ButterflyPins/assets/dusiulkaspinboard/recipes/grid/pinboard2x2.json +++ b/ButterflyPins/assets/dusiulkaspinboard/recipes/grid/pinboard2x2.json @@ -4,7 +4,9 @@ "S": { "type": "item", "code": "game:plank-*", "name": "wood", "skipVariants": ["aged"] }, "B": { "type": "item", - "code": "game:*-butterflypin-*" + "code": "game:clothes-butterflypin-*", + "isTool": true, + "toolDurabilityCost": 0 } }, "width": 3, diff --git a/ButterflyPins/assets/dusiulkaspinboard/recipes/grid/pinboard3x3.json b/ButterflyPins/assets/dusiulkaspinboard/recipes/grid/pinboard3x3.json index 4f7c405..18a8148 100644 --- a/ButterflyPins/assets/dusiulkaspinboard/recipes/grid/pinboard3x3.json +++ b/ButterflyPins/assets/dusiulkaspinboard/recipes/grid/pinboard3x3.json @@ -4,7 +4,9 @@ "S": { "type": "item", "code": "game:plank-*", "name": "wood", "skipVariants": ["aged"] }, "B": { "type": "item", - "code": "game:*-butterflypin-*" + "code": "game:clothes-butterflypin-*", + "isTool": true, + "toolDurabilityCost": 0 } }, "width": 3, diff --git a/ButterflyPins/modinfo.json b/ButterflyPins/modinfo.json index f0fa9b1..91a9752 100644 --- a/ButterflyPins/modinfo.json +++ b/ButterflyPins/modinfo.json @@ -7,7 +7,7 @@ "OrekiWoof" ], "description": "ButterflyPins mod.", - "version": "1.0.0", + "version": "1.0.1", "dependencies": { "game": "1.21.0" },