From a33058ede033b5bc5250afbe6420c2db5fec1e83 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Tue, 3 Dec 2019 20:31:26 -0700 Subject: [PATCH] fancy up the puzzle seal temples with some custom blocks, add sub-slade grid passages --- df_caverns/underworld.lua | 6 +- .../models/underworld_capstone.obj | 34 ++++++ df_underworld_items/puzzle_seal.lua | 97 +++++++++++++++--- .../textures/dfcaverns_inscription_1.png | Bin 0 -> 475 bytes .../textures/dfcaverns_inscription_2.png | Bin 0 -> 485 bytes .../textures/dfcaverns_inscription_3.png | Bin 0 -> 486 bytes .../textures/dfcaverns_inscription_4.png | Bin 0 -> 481 bytes 7 files changed, 122 insertions(+), 15 deletions(-) create mode 100644 df_underworld_items/models/underworld_capstone.obj create mode 100644 df_underworld_items/textures/dfcaverns_inscription_1.png create mode 100644 df_underworld_items/textures/dfcaverns_inscription_2.png create mode 100644 df_underworld_items/textures/dfcaverns_inscription_3.png create mode 100644 df_underworld_items/textures/dfcaverns_inscription_4.png 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 0000000000000000000000000000000000000000..d538be12e70d5f35384d6f4eab25ed71571390cd GIT binary patch literal 475 zcmV<10VMv3P) zaB^>EX>4U6ba`-PAZ2)IW&i+q+Fejv4#OY}`_CzMgpdG%Rqq9J4F=Pa(xSyh?E9HI}QdD&zb zmPPx5#UMC~ii)1>5b;0+b<8l(avXwU+Gl2Vtys4TShVck52f6OH)9R^crh>$D&fHq zQhOSng%8Ij3bjNJiA2+r4nppi@Q+Nmb)e}&>fD-^q1uU0VeCqHm%8+*Z6s8>?f{__ zN}I_1sSj8%r#AGe&~XN~43N7quhMd;Eff;hroQxTJGG=X1sT{eLg)%J@C_W;IKb(` R1CIaz002ovPDHLkV1k-4%v%5e literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..2f2fc549dfb3c8ab5d134a64b3748aae0382a0a5 GIT binary patch literal 485 zcmV zaB^>EX>4U6ba`-PAZ2)IW&i+q+FefD5yLPD`)7)dfC0b8aUQ+v1|7eOAY3`S$WLuBK)bXTDL7DPlaUHr0nRE6kBN50TduB zhJ!coJblx`Og~XoNgStYPk{gc010qNS#tmY3lRVS3lRZ-WM7d0000McNliru;|v4= zJ1>AY0gM0u0Ln>3K~xwSt-!G>L~#HB;P0RK&9}NTNpD~@T)N3EugnG^r7T#a3^vP| zWHKm&*&xFWSDcdVF&GdWl3w1Ul;!nOE*X6OCg>$7oy(=>Tx%lnZo{|-rJ&};m`Bf8 zks2`R!-B$-J~6hX0EXS_A=1-@Wie`&th$%jGA&oitm%4nYR`d8-IN=jN|yq-@@B$1 z79BhEi^z^|B4hEO#s b7yN@Sfo?xpaO*e|00000NkvXXu0mjfj3&wA literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..2565917e9b1615c5c98ef7eb6dd17bbe093814ac GIT binary patch literal 486 zcmV@P) zaB^>EX>4U6ba`-PAZ2)IW&i+q+Fejv4#OY}`_CzMgplw&4sEHl8|?UVNxF(zBE$yl z2pXUFNv{i`2*p%tZaFg$TWr$NR5sWiIL_*X?`F~IcOZ}yyBf{I?|10wc~GM3+p1I9 z-KV z1{7J69!~%O0Lw{4K~xwSoxm|GL;)NC@LydSu)Y4@;F4Ds>#a5>DKA&bWHR02TU@D| z4JNu$7B?7Pq#ezjoIno6Mnr;bcpmfAt75*ix9y(=5uEP3)_%&ixhUFQM~$JkZ} zm@_3&L- zaB^>EX>4U6ba`-PAZ2)IW&i+q+FefD5yLPD`)7)dAS3)5$4S$>ZqV^dV$xiyI}1xT z0@*(Amppc)s$#je(o2EEx^*1@8YX5)IIA;A zML1w}R%SrHQ3Xj8+L)Qa00009a7bBm000XS000XS0e@s)kpKVy2XskIMF-;y1Of*d zr!fKv0002UNklj7Gh)`70@l!D2AnaDzp@*>G3txxfg$2hpJ;)^!o)x&$SJCvX=ERGNWW_bMb%c^HOggt_RQr0i zurLjongLKwvl X+(tI7!s7^~00000NkvXXu0mjfO>WHM literal 0 HcmV?d00001