diff --git a/df_caverns/underworld.lua b/df_caverns/underworld.lua index ecb7452..59e26f8 100644 --- a/df_caverns/underworld.lua +++ b/df_caverns/underworld.lua @@ -287,9 +287,11 @@ minetest.register_on_generated(function(minp, maxp, seed) local wave = nvals_wave[index2d] * wave_mult local floor_height = math.floor(abs_cave * floor_mult + median + floor_displace + wave) - local underside_height = y_min + math.abs(wave) / 5 + local underside_height = math.floor(y_min + math.abs(wave) / 5)+2 -- divide wave by five to smooth out the underside of the slade, we only want the interface to ripple a little down here local ceiling_height = math.floor(abs_cave * ceiling_mult + median + ceiling_displace + wave) - if y < floor_height and y > underside_height then -- divide wave by five to smooth out the underside of the slade, we only want the interface to ripple a little down here + if (y == underside_height or y == underside_height - 1) and (x % 8 == 0 or z % 8 == 0) then + data[vi] = c_air + elseif y < floor_height and y > underside_height then data[vi] = c_slade if pit and pit.location.x - radius_pit_max - radius_pit_variance < maxp.x and diff --git a/df_underworld_items/models/underworld_capstone.obj b/df_underworld_items/models/underworld_capstone.obj new file mode 100644 index 0000000..fd987cc --- /dev/null +++ b/df_underworld_items/models/underworld_capstone.obj @@ -0,0 +1,34 @@ +# Blender v2.81 (sub 16) OBJ File: 'capstone.blend' +# www.blender.org +mtllib underworld_capstone.mtl +o Cube +v 0.000000 0.500000 0.000000 +v 0.500000 -0.500000 -0.500000 +v 0.500000 -0.500000 0.500000 +v -0.500000 -0.500000 -0.500000 +v -0.500000 -0.500000 0.500000 +vt 1.000000 1.000000 +vt 0.000000 0.000000 +vt 0.000000 1.000000 +vt 1.000000 0.000000 +vt 0.500000 1.000000 +vt 1.000000 0.000000 +vt 1.000000 0.000000 +vt 0.000000 0.000000 +vt 0.000000 0.000000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 0.4472 0.8944 +vn -0.8944 0.4472 0.0000 +vn 0.8944 0.4472 0.0000 +vn 0.0000 0.4472 -0.8944 +g Cube_Cube_Material +usemtl Material +s off +f 2/1/1 5/2/1 4/3/1 +f 2/1/1 3/4/1 5/2/1 +g Cube_Cube_side +usemtl side +f 3/4/2 1/5/2 5/2/2 +f 5/2/3 1/5/3 4/6/3 +f 2/7/4 1/5/4 3/8/4 +f 4/9/5 1/5/5 2/7/5 diff --git a/df_underworld_items/puzzle_seal.lua b/df_underworld_items/puzzle_seal.lua index f69c41c..9a09819 100644 --- a/df_underworld_items/puzzle_seal.lua +++ b/df_underworld_items/puzzle_seal.lua @@ -4,6 +4,14 @@ local S, NS = dofile(MP.."/intllib.lua") local invulnerable = df_underworld_items.config.invulnerable_slade and not minetest.settings:get_bool("creative_mode") +local slade_groups = nil +if invulnerable then + slade_groups = {stone=1, level=3, slade=1, pit_plasma_resistant=1, mese_radiation_shield=1, immortal = 1, not_in_creative_inventory=1} +else + slade_groups = {stone=1, level=3, slade=1, pit_plasma_resistant=1, mese_radiation_shield=1, cracky = 3, not_in_creative_inventory=1} +end + + -- Ensures that the node is functioning correctly local ensure_meta = function(pos) local meta = minetest.get_meta(pos) @@ -162,9 +170,9 @@ local puzzle_seal_def = { paramtype = "light", paramtype2 = "facedir", light_source = 8, - groups = {stone=1, level=3, slade=1, pit_plasma_resistant=1, mese_radiation_shield=1, not_in_creative_inventory=1}, + groups = slade_groups, sounds = default.node_sound_stone_defaults({ footstep = { name = "bedrock2_step", gain = 1 } }), - selection_box = { + selection_box = { type = "fixed", fixed = {-0.625, -0.625, -0.625, 0.625, 0.625, 0.625}, }, @@ -206,11 +214,6 @@ local puzzle_seal_def = { end, } -if invulnerable then - puzzle_seal_def.groups.immortal = 1 -else - puzzle_seal_def.groups.cracky = 3 -end minetest.register_node("df_underworld_items:puzzle_seal", puzzle_seal_def) @@ -229,7 +232,7 @@ local digging_seal_def = { light_source = 15, groups = {immortal=1, stone=1, level=3, slade=1, pit_plasma_resistant=1, mese_radiation_shield=1, not_in_creative_inventory=1}, sounds = default.node_sound_stone_defaults({ footstep = { name = "bedrock2_step", gain = 1 } }), - selection_box = { + selection_box = { type = "fixed", fixed = {-0.625, -0.625, -0.625, 0.625, 0.625, 0.625}, }, @@ -321,6 +324,68 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) end end) +------------------------------------------------------------------------------------------------- + +local inscription_block_def = { + description = S("Inscribed Slade Block"), + _doc_items_longdesc = nil, + _doc_items_usagehelp = nil, + tiles = { + "dfcaverns_slade_block.png", + "dfcaverns_slade_block.png", + "dfcaverns_slade_block.png^(dfcaverns_inscription_1.png^[opacity:128)", + "dfcaverns_slade_block.png^(dfcaverns_inscription_2.png^[opacity:128)", + "dfcaverns_slade_block.png^(dfcaverns_inscription_3.png^[opacity:128)", + "dfcaverns_slade_block.png^(dfcaverns_inscription_4.png^[opacity:128)", + }, + paramtype2 = "facedir", + groups = slade_groups, + sounds = default.node_sound_stone_defaults({ footstep = { name = "bedrock2_step", gain = 1 } }), + is_ground_content = false, + on_blast = function() end, + on_rotate = function() return false end, + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + end, +} + +minetest.register_node("df_underworld_items:inscription_block", inscription_block_def) + + +local capstone_def = { + description = S("Slade Capstone"), + _doc_items_longdesc = nil, + _doc_items_usagehelp = nil, + drawtype = "mesh", + mesh = "underworld_capstone.obj", + tiles = { + "dfcaverns_slade_block.png", + "dfcaverns_slade_block.png" + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, + {-0.25, 0, -0.25, 0.25, 0.5, 0.25}, + }, + }, + collision_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, + {-0.25, 0, -0.25, 0.25, 0.5, 0.25}, + }, + }, + paramtype = "light", + paramtype2 = "facedir", + groups = slade_groups, + sounds = default.node_sound_stone_defaults({ footstep = { name = "bedrock2_step", gain = 1 } }), + is_ground_content = false, + on_blast = function() end, + on_rotate = function() return false end, +} + +minetest.register_node("df_underworld_items:slade_capstone", capstone_def) + ----------------------------------------------------------------------------------------- -- Schematics @@ -336,6 +401,12 @@ local n9 = n3 local n10 = n1 local n11 = n3 +local n12 = { name = "df_underworld_items:inscription_block", param2 = 0 } +local n13 = { name = "df_underworld_items:inscription_block", param2 = 1 } +local n14 = { name = "df_underworld_items:inscription_block", param2 = 2 } +local n15 = { name = "df_underworld_items:inscription_block", param2 = 3 } +local n16 = { name = "df_underworld_items:slade_capstone"} + if minetest.get_modpath("stairs") then local stair_groups = {level = 3, mese_radiation_shield=1, pit_plasma_resistant=1, slade=1} if invulnerable then @@ -365,8 +436,8 @@ end df_underworld_items.seal_temple_schem = { size = {y = 6, x = 7, z = 7}, data = { - n1, n2, n3, n3, n3, n4, n1, n1, n3, n3, n3, n3, n3, n1, n1, n3, n3, - n3, n3, n3, n1, n5, n3, n3, n3, n3, n3, n5, n6, n6, n6, n6, n6, n6, + n15, n2, n3, n3, n3, n4, n14, n14, n3, n3, n3, n3, n3, n15, n13, n3, n3, + n3, n3, n3, n13, n16, n3, n3, n3, n3, n3, n16, n6, n6, n6, n6, n6, n6, n6, n6, n6, n6, n6, n6, n6, n6, n7, n3, n3, n3, n3, n3, n7, n3, n3, n3, n3, n3, n3, n3, n3, n3, n3, n3, n3, n3, n3, n3, n3, n3, n3, n3, n3, n3, n6, n3, n3, n3, n3, n3, n6, n6, n6, n6, n6, n6, n6, n6, n3, @@ -379,9 +450,9 @@ df_underworld_items.seal_temple_schem = { n3, n3, n3, n3, n3, n3, n3, n3, n3, n6, n3, n3, n3, n3, n3, n6, n6, n6, n3, n3, n3, n6, n6, n9, n3, n3, n3, n3, n3, n9, n3, n3, n3, n3, n3, n3, n3, n3, n3, n3, n3, n3, n3, n3, n3, n3, n3, n3, n3, n3, n3, - n6, n3, n3, n3, n3, n3, n6, n6, n6, n6, n6, n6, n6, n6, n1, n2, n3, - n3, n3, n4, n1, n1, n3, n3, n3, n3, n3, n1, n1, n3, n3, n3, n3, n3, - n1, n5, n3, n3, n3, n3, n3, n5, n6, n6, n6, n6, n6, n6, n6, n6, n6, + n6, n3, n3, n3, n3, n3, n6, n6, n6, n6, n6, n6, n6, n6, n12, n2, n3, + n3, n3, n4, n12, n14, n3, n3, n3, n3, n3, n15, n13, n3, n3, n3, n3, n3, + n12, n16, n3, n3, n3, n3, n3, n16, n6, n6, n6, n6, n6, n6, n6, n6, n6, n6, n6, n6, n6, n6, } } diff --git a/df_underworld_items/textures/dfcaverns_inscription_1.png b/df_underworld_items/textures/dfcaverns_inscription_1.png new file mode 100644 index 0000000..d538be1 Binary files /dev/null and b/df_underworld_items/textures/dfcaverns_inscription_1.png differ diff --git a/df_underworld_items/textures/dfcaverns_inscription_2.png b/df_underworld_items/textures/dfcaverns_inscription_2.png new file mode 100644 index 0000000..2f2fc54 Binary files /dev/null and b/df_underworld_items/textures/dfcaverns_inscription_2.png differ diff --git a/df_underworld_items/textures/dfcaverns_inscription_3.png b/df_underworld_items/textures/dfcaverns_inscription_3.png new file mode 100644 index 0000000..2565917 Binary files /dev/null and b/df_underworld_items/textures/dfcaverns_inscription_3.png differ diff --git a/df_underworld_items/textures/dfcaverns_inscription_4.png b/df_underworld_items/textures/dfcaverns_inscription_4.png new file mode 100644 index 0000000..600fe7d Binary files /dev/null and b/df_underworld_items/textures/dfcaverns_inscription_4.png differ