added special shape for fence (with snow top)
This commit is contained in:
parent
7dd1406f24
commit
44a349775f
1
init.lua
1
init.lua
@ -33,6 +33,7 @@ moresnow.c_ignore = minetest.get_content_id( 'ignore' );
|
||||
moresnow.c_air = minetest.get_content_id( 'default:snow' );
|
||||
moresnow.c_snow = minetest.get_content_id( 'default:snow' );
|
||||
moresnow.c_snow_top = minetest.get_content_id( 'moresnow:snow_top' );
|
||||
moresnow.c_snow_fence = minetest.get_content_id( 'moresnow:snow_fence_top' );
|
||||
moresnow.c_snow_stair = minetest.get_content_id( 'moresnow:snow_stair_top' );
|
||||
moresnow.c_snow_slab = minetest.get_content_id( 'moresnow:snow_slab_top' );
|
||||
moresnow.c_snow_panel = minetest.get_content_id( 'moresnow:snow_panel_top' );
|
||||
|
||||
@ -59,6 +59,11 @@ moresnow.identify_stairs_and_slabs = function()
|
||||
|
||||
-- do nothing; the node has been dealt with
|
||||
|
||||
elseif( v.drawtype and v.drawtype == 'fencelike' ) then
|
||||
|
||||
moresnow.snow_cover[ id ] = moresnow.c_snow_fence;
|
||||
|
||||
|
||||
elseif( n and minetest.registered_nodes[ n ]
|
||||
and minetest.registered_nodes[ n ].drop
|
||||
and minetest.registered_nodes[ n ].drop == 'default:snow' ) then
|
||||
|
||||
@ -150,6 +150,9 @@ minetest.registered_nodes[ 'default:snow' ].on_construct = function( pos )
|
||||
-- thus, nodebox-like nodes covered by snow may look less strange
|
||||
moresnow.register_snow_top( "top", {{-0.5, -1.5, -0.5, 0.5, -1.5+2/16, 0.5}},
|
||||
{{-0.5, -1.5, -0.5, 0.5, -1.5+2/16, 0.5}} ); -- same for wool
|
||||
moresnow.register_snow_top( "fence_top", {{-0.5, -1.5, -0.5, 0.5, -1.5+2/16, 0.5},
|
||||
{-0.12, -0.5, -0.12, 0.12, -0.5+2/16, 0.12}}, -- on top of the fence post
|
||||
{{-0.5, -1.5, -0.5, 0.5, -1.5+2/16, 0.5}} ); -- same for wool
|
||||
moresnow.register_snow_top( "stair_top", {
|
||||
{-0.5, -1.0, -0.5, 0.5, -1.0+2/16, 0},
|
||||
{-0.5, -0.5, 0, 0.5, -0.5+2/16, 0.5},
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
moresnow.translation_table = {}
|
||||
|
||||
moresnow.build_translation_table = function()
|
||||
local shapes = {'top', 'stair_top', 'slab_top',
|
||||
local shapes = {'top', 'fence_top', 'stair_top', 'slab_top',
|
||||
'panel_top', 'micro_top', 'outer_stair_top', 'inner_stair_top',
|
||||
'ramp_top', 'ramp_outer_top', 'ramp_inner_top' };
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user