flatten folder structure, fix collision boxes and gui/fp/tp transforms
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"total": 14216,
|
||||
"total": 18477,
|
||||
"sessions": [
|
||||
{
|
||||
"begin": "2026-03-17T23:54:43+01:00",
|
||||
@@ -19,12 +19,12 @@
|
||||
{
|
||||
"begin": "2026-03-18T22:54:14+01:00",
|
||||
"end": "2026-03-18T23:14:49+01:00",
|
||||
"duration": 1234
|
||||
"duration": 1235
|
||||
},
|
||||
{
|
||||
"begin": "2026-03-18T23:14:52+01:00",
|
||||
"end": "2026-03-19T00:06:26+01:00",
|
||||
"duration": 3094
|
||||
"end": "2026-03-19T01:17:26+01:00",
|
||||
"duration": 7354
|
||||
}
|
||||
]
|
||||
}
|
||||
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -5,7 +5,7 @@
|
||||
"name": "Vintage Story Client",
|
||||
"type": "dotnet",
|
||||
"request": "launch",
|
||||
"projectPath": "${workspaceFolder}/ButterflyPins/ButterflyPins/ButterflyPins.csproj"
|
||||
"projectPath": "${workspaceFolder}/ButterflyPins/ButterflyPins.csproj"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
2
.vscode/tasks.json
vendored
2
.vscode/tasks.json
vendored
@@ -18,7 +18,7 @@
|
||||
"dependsOrder": "sequence",
|
||||
"args": [
|
||||
"build",
|
||||
"${workspaceFolder}/ButterflyPins/ButterflyPins/ButterflyPins.csproj",
|
||||
"${workspaceFolder}/ButterflyPins/ButterflyPins.csproj",
|
||||
"-c",
|
||||
"${input:buildConfig}",
|
||||
"/property:GenerateFullPaths=true",
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
<BuildType Name="Debug" />
|
||||
<BuildType Name="Release" />
|
||||
</Configurations>
|
||||
<Project Path="ButterflyPins/ButterflyPins/ButterflyPins.csproj" />
|
||||
<Project Path="ButterflyPins/ZZCakeBuild/CakeBuild.csproj" />
|
||||
<Project Path="ButterflyPins/ButterflyPins.csproj" />
|
||||
<Project Path="ZZCakeBuild/CakeBuild.csproj" />
|
||||
</Solution>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using ButterflyPins.BlockEntities;
|
||||
using System;
|
||||
using Vintagestory.API.Common;
|
||||
using Vintagestory.API.MathTools;
|
||||
|
||||
@@ -6,6 +7,8 @@ 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)
|
||||
@@ -35,4 +38,32 @@ 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);
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"ingredientPattern": "PPP\tS_S\tPPP",
|
||||
"ingredients": {
|
||||
"P": { "type": "item", "code": "plank-*" },
|
||||
"S": { "type": "item", "code": "stick" }
|
||||
},
|
||||
"width": 3,
|
||||
"height": 3,
|
||||
"output": { "type": "block", "code": "pinboard2x2-south" }
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"ingredientPattern": "PPP\tPSP\tPPP",
|
||||
"ingredients": {
|
||||
"P": { "type": "item", "code": "plank-*" },
|
||||
"S": { "type": "item", "code": "stick" }
|
||||
},
|
||||
"width": 3,
|
||||
"height": 3,
|
||||
"output": { "type": "block", "code": "pinboard3x3-south" }
|
||||
}
|
||||
@@ -42,7 +42,7 @@
|
||||
"collisionbox": {
|
||||
"x1": 0.0625,
|
||||
"y1": 0.0625,
|
||||
"z1": 0.9375,
|
||||
"z1": 0.90625,
|
||||
"x2": 0.9375,
|
||||
"y2": 0.9375,
|
||||
"z2": 1.0,
|
||||
@@ -56,7 +56,7 @@
|
||||
"selectionbox": {
|
||||
"x1": 0.0625,
|
||||
"y1": 0.0625,
|
||||
"z1": 0.9375,
|
||||
"z1": 0.90625,
|
||||
"x2": 0.9375,
|
||||
"y2": 0.9375,
|
||||
"z2": 1.0,
|
||||
@@ -80,7 +80,7 @@
|
||||
"guiTransform": {
|
||||
"rotation": { "x": -19, "y": 136, "z": 0 },
|
||||
"origin": { "x": 0.5, "y": 0.5, "z": 0.5 },
|
||||
"scale": 1.9
|
||||
"scale": 1.0
|
||||
},
|
||||
"groundTransform": {
|
||||
"translation": { "x": 0, "y": 0, "z": 0 },
|
||||
@@ -90,7 +90,13 @@
|
||||
},
|
||||
"tpHandTransform": {
|
||||
"translation": { "x": -0.45, "y": -0.8, "z": 0.04 },
|
||||
"rotation": { "x": 0, "y": 0, "z": -10 },
|
||||
"rotation": { "x": 0, "y": 180, "z": -10 },
|
||||
"origin": { "x": 0.5, "y": 0.5, "z": 0.5 },
|
||||
"scale": 0.95
|
||||
},
|
||||
"fpHandTransform": {
|
||||
"translation": { "x": -0.45, "y": -0.8, "z": 0.04 },
|
||||
"rotation": { "x": 0, "y": 180, "z": -10 },
|
||||
"origin": { "x": 0.5, "y": 0.5, "z": 0.5 },
|
||||
"scale": 0.95
|
||||
}
|
||||
@@ -42,7 +42,7 @@
|
||||
"collisionbox": {
|
||||
"x1": 0.0625,
|
||||
"y1": 0.0625,
|
||||
"z1": 0.9375,
|
||||
"z1": 0.90625,
|
||||
"x2": 0.9375,
|
||||
"y2": 0.9375,
|
||||
"z2": 1.0,
|
||||
@@ -56,7 +56,7 @@
|
||||
"selectionbox": {
|
||||
"x1": 0.0625,
|
||||
"y1": 0.0625,
|
||||
"z1": 0.9375,
|
||||
"z1": 0.90625,
|
||||
"x2": 0.9375,
|
||||
"y2": 0.9375,
|
||||
"z2": 1.0,
|
||||
@@ -80,7 +80,7 @@
|
||||
"guiTransform": {
|
||||
"rotation": { "x": -19, "y": 136, "z": 0 },
|
||||
"origin": { "x": 0.5, "y": 0.5, "z": 0.5 },
|
||||
"scale": 1.9
|
||||
"scale": 1.0
|
||||
},
|
||||
"groundTransform": {
|
||||
"translation": { "x": 0, "y": 0, "z": 0 },
|
||||
@@ -90,7 +90,13 @@
|
||||
},
|
||||
"tpHandTransform": {
|
||||
"translation": { "x": -0.45, "y": -0.8, "z": 0.04 },
|
||||
"rotation": { "x": 0, "y": 0, "z": -10 },
|
||||
"rotation": { "x": 0, "y": 180, "z": -10 },
|
||||
"origin": { "x": 0.5, "y": 0.5, "z": 0.5 },
|
||||
"scale": 0.95
|
||||
},
|
||||
"fpHandTransform": {
|
||||
"translation": { "x": -0.45, "y": -0.8, "z": 0.04 },
|
||||
"rotation": { "x": 0, "y": 180, "z": -10 },
|
||||
"origin": { "x": 0.5, "y": 0.5, "z": 0.5 },
|
||||
"scale": 0.95
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"ingredientPattern": "_S_\tSBS\t_S_",
|
||||
"ingredients": {
|
||||
"S": { "type": "item", "code": "game:stick" },
|
||||
"B": {
|
||||
"type": "item",
|
||||
"code": "game:*-butterflypin-*"
|
||||
}
|
||||
},
|
||||
"width": 3,
|
||||
"height": 3,
|
||||
"output": { "type": "block", "code": "pinboard2x2-north" }
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"ingredientPattern": "S_S\t_B_\tS_S",
|
||||
"ingredients": {
|
||||
"S": { "type": "item", "code": "game:stick" },
|
||||
"B": {
|
||||
"type": "item",
|
||||
"code": "game:*-butterflypin-*"
|
||||
}
|
||||
},
|
||||
"width": 3,
|
||||
"height": 3,
|
||||
"output": { "type": "block", "code": "pinboard3x3-north" }
|
||||
}
|
||||
0
ButterflyPins/build.sh → build.sh
Normal file → Executable file
0
ButterflyPins/build.sh → build.sh
Normal file → Executable file
Reference in New Issue
Block a user