summaryrefslogtreecommitdiff
path: root/block.gd
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2025-01-11 12:31:00 +0100
committerDaniel Weipert <git@mail.dweipert.de>2025-01-11 12:31:00 +0100
commitf448ca4259d7f76fc58bc3b5c12ea8d04ab49a87 (patch)
tree679e0b6186253a9becd8fbe5ade5bbb679ba06a0 /block.gd
parentb1d9bfe7e80b4d95acd26d0ab6a1ce34ad18d91c (diff)
next commit
Diffstat (limited to 'block.gd')
-rw-r--r--block.gd24
1 files changed, 23 insertions, 1 deletions
diff --git a/block.gd b/block.gd
index bfa9928..97f2695 100644
--- a/block.gd
+++ b/block.gd
@@ -85,6 +85,8 @@ enum Type {
DIRT,
LEAVES,
STONE,
+ ICE,
+ SELECTION,
}
const BLOCK_TYPES = {
@@ -128,6 +130,26 @@ const BLOCK_TYPES = {
Vector2(2, 0), # BOTTOM
],
},
+ Type.ICE: {
+ "uv2s": [
+ Vector2(2, 1), # FRONT
+ Vector2(2, 1), # BACK
+ Vector2(2, 1), # LEFT
+ Vector2(2, 1), # RIGHT
+ Vector2(2, 1), # TOP
+ Vector2(2, 1), # BOTTOM
+ ],
+ },
+ Type.SELECTION: {
+ "uv2s": [
+ Vector2(3, 2), # FRONT
+ Vector2(3, 2), # BACK
+ Vector2(3, 2), # LEFT
+ Vector2(3, 2), # RIGHT
+ Vector2(3, 2), # TOP
+ Vector2(3, 2), # BOTTOM
+ ],
+ },
}
var position: Vector3
@@ -146,7 +168,7 @@ func add_face(surface_tool: SurfaceTool, face: Face):
for idx in FACES[face].size():
var triangle = FACES[face][idx]
var triangle_positions = triangle.map(func(item):
- return item + position
+ return (item / 2.0) + position + Vector3(0.5, 0.5, 0.5)
)
var uvs = FACE_UVS[face][idx]