mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-08-03 11:17:05 -04:00

This checks slots based on texture connectivity. It really is just a gimmick at this point, but it has potential to be more than that with the right modifier restrictions.    The big questions I have for you are: - Is it obvious why some tools don't work while others do or is this too confusing? - @careeoki can you improve the texture to look better for these crooked tools? Many slots do just seem to produce a thin line of diagonally connected pixels, and this really doesn't look good and the algorithm doesn't accept those as valid connections. fixes #1589
98 lines
1.9 KiB
Zig
98 lines
1.9 KiB
Zig
.{
|
|
.blockTags = .{.wood},
|
|
.disabled = .{
|
|
0, 0, 1, 1, 1,
|
|
0, 0, 0, 1, 1,
|
|
0, 0, 0, 0, 1,
|
|
1, 0, 0, 0, 1,
|
|
1, 1, 1, 1, 0,
|
|
},
|
|
.optional = .{
|
|
1, 1, 0, 0, 0,
|
|
1, 1, 1, 0, 0,
|
|
0, 1, 1, 1, 0,
|
|
0, 0, 1, 1, 0,
|
|
0, 0, 0, 0, 0,
|
|
},
|
|
.parameters = .{
|
|
.{
|
|
.source = .density,
|
|
.destination = .swingTime,
|
|
.matrix = .{
|
|
2.5, 2.0, 0x0, 0x0, 0x0,
|
|
2.0, 2.0, 1.5, 0x0, 0x0,
|
|
2.0, 1.5, 1.5, 1.0, 0x0,
|
|
0x0, 1.5, 1.0, 1.0, 0x0,
|
|
0x0, 0x0, 0x0, 0x0, 1.0,
|
|
},
|
|
.factor = 0.25,
|
|
.method = .average,
|
|
},
|
|
.{
|
|
.source = .density,
|
|
.destination = .damage,
|
|
.matrix = .{
|
|
1.5, 2.0, 0x0, 0x0, 0x0,
|
|
2.0, 2.0, 1.5, 0x0, 0x0,
|
|
2.0, 1.5, 1.0, 0.5, 0x0,
|
|
0x0, 1.0, 0.5, 0.0, 0x0,
|
|
0x0, 0x0, 0x0, 0x0, 0.0,
|
|
},
|
|
.factor = 0.4,
|
|
.method = .average,
|
|
},
|
|
.{
|
|
.source = .hardness,
|
|
.destination = .maxDurability,
|
|
.matrix = .{
|
|
0.0, 0.5, 0x0, 0x0, 0x0,
|
|
1.0, 1.5, 0.5, 0x0, 0x0,
|
|
2.0, 2.0, 2.5, 0.5, 0x0,
|
|
0x0, 2.0, 1.5, 1.0, 0x0,
|
|
0x0, 0x0, 0x0, 0x0, 1.0,
|
|
},
|
|
.factor = 120,
|
|
.method = .average,
|
|
},
|
|
.{
|
|
.source = .hardness,
|
|
.destination = .damage,
|
|
.matrix = .{
|
|
0.0, 0.0, 0x0, 0x0, 0x0,
|
|
0.0, 0.0, 0.0, 0x0, 0x0,
|
|
1.0, 0.0, 0.0, 0.0, 0x0,
|
|
0x0, 1.0, 0.0, 0.0, 0x0,
|
|
0x0, 0x0, 0x0, 0x0, 0.0,
|
|
},
|
|
.factor = 0.3,
|
|
.method = .average,
|
|
},
|
|
.{
|
|
.source = .elasticity,
|
|
.destination = .maxDurability,
|
|
.matrix = .{
|
|
0.0, 0.0, 0x0, 0x0, 0x0,
|
|
0.5, 2.0, 0.5, 0x0, 0x0,
|
|
1.0, 1.5, 2.0, 1.0, 0x0,
|
|
0x0, 1.0, 0.5, 2.0, 0x0,
|
|
0x0, 0x0, 0x0, 0x0, 1.5,
|
|
},
|
|
.factor = 120,
|
|
.method = .average,
|
|
},
|
|
.{
|
|
.source = .elasticity,
|
|
.destination = .swingTime,
|
|
.matrix = .{
|
|
0.0, 0.5, 0x0, 0x0, 0x0,
|
|
0.5, 1.0, 0.5, 0x0, 0x0,
|
|
2.0, 2.5, 1.5, 0.5, 0x0,
|
|
0x0, 2.0, 0.5, 0.5, 0x0,
|
|
0x0, 0x0, 0x0, 0x0, 0.5,
|
|
},
|
|
.factor = -1.0,
|
|
.method = .average,
|
|
},
|
|
},
|
|
}
|