Skip to content

Commit

Permalink
Better trapdoor side appearance.
Browse files Browse the repository at this point in the history
We're using a normal wooden side texture to draw the sides
of trapdoors. But the side textures have only 2 edges that
have a nice texture for the 2px wide trapdoor. We can
either repaint the textures, or just rotate the texture
properly for the two sides that need it.

Because the side texture for wooden doors was just a default:wood
texture, it clashes with the colors in the trapdoor, and so
we add a wooden trapdoor-matching tile side texture as well.

This also improves the steel trapdoor side, but without a
texture change there since that was already a specially
drawn texture for that node.

We also increase the thickness of the trapdoor to 2px. Right
now the model is 0.4 large, but this causes the side textures
to look odd as there's a mismatch in pixel size. By scaling the
trapdoor side up to exactly 2px, the sides look natural.

Thanks to @kilbith for the suggestion.
  • Loading branch information
sofar authored and paramat committed Jan 20, 2016
1 parent f413141 commit 322967d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions mods/doors/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ following Textures created by BlockMen (WTFPL):
door_obsidian_glass_side.png

following textures created by celeron55 (CC BY-SA 3.0):
door_trapdoor_side.png
door_glass_a.png
door_glass_b.png

following Textures created by PenguinDad (CC BY-SA 4.0):
door_glass.png
door_obsidian_glass.png

Steel trapdoor textures by sofar (CC-BY-SA-3.0)
following textures created by sofar (CC-BY-SA-3.0)
doors_trapdoor_steel.png
doors_trapdoor_steel_side.png
door_trapdoor_side.png

All other textures (created by PilzAdam): WTFPL

Expand Down
15 changes: 9 additions & 6 deletions mods/doors/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -474,25 +474,28 @@ function doors.register_trapdoor(name, def)

def_closed.node_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}
fixed = {-0.5, -0.5, -0.5, 0.5, -6/16, 0.5}
}
def_closed.selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}
fixed = {-0.5, -0.5, -0.5, 0.5, -6/16, 0.5}
}
def_closed.tiles = { def.tile_front, def.tile_front, def.tile_side, def.tile_side,
def.tile_side, def.tile_side }

def_opened.node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0.4, 0.5, 0.5, 0.5}
fixed = {-0.5, -0.5, 6/16, 0.5, 0.5, 0.5}
}
def_opened.selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0.4, 0.5, 0.5, 0.5}
fixed = {-0.5, -0.5, 6/16, 0.5, 0.5, 0.5}
}
def_opened.tiles = { def.tile_side, def.tile_side, def.tile_side, def.tile_side,
def.tile_front, def.tile_front }
def_opened.tiles = { def.tile_side, def.tile_side,
def.tile_side .. '^[transform3',
def.tile_side .. '^[transform1',
def.tile_front, def.tile_front }

def_opened.drop = name_closed
def_opened.groups.not_in_creative_inventory = 1

Expand Down
Binary file modified mods/doors/textures/doors_trapdoor_side.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 322967d

Please sign in to comment.