Add hammer sharp

This commit is contained in:
Juraj Vajda 2023-12-31 23:07:32 -05:00
parent dbe8411c44
commit a55b61e54e
65 changed files with 326 additions and 92 deletions

View File

@ -1,7 +1,7 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@ -885,6 +885,10 @@ GNU Lesser General Public License v2.1 or later
- everness_mese_tree_sapling.png
- everness_mese_tree_top.png
- everness_mese_wood.png
- everness_hammer_mesh.png
- everness_hammer_sharp_mesh.png
- everness_hammer_sharp_item.png
- everness_hammer_item.png
**CC-BY-SA-4.0, Pixel Perfection by XSSheep**, https://minecraft.curseforge.com/projects/pixel-perfection-freshly-updated
@ -1321,6 +1325,12 @@ https://freesound.org/people/Rudmer_Rotteveel/sounds/590950/
- everness_creaky_door_open.2.ogg
- everness_creaky_door_close.ogg
**CC-BY-SA-3.0, celeron55, Perttu Ahola**
- everness_cool_lava.1.ogg
- everness_cool_lava.2.ogg
- everness_cool_lava.3.ogg
### Models
**CC-BY-SA-4.0, by SaKeL**
@ -1335,6 +1345,7 @@ https://freesound.org/people/Rudmer_Rotteveel/sounds/590950/
- everness_lumecorn.obj
- everness_skull_with_candle.obj
- everness_venus_trap.obj
- everness_hammer_pick.obj
**CC-BY-SA-3.0, by sofar**
@ -1354,6 +1365,7 @@ https://freesound.org/people/Rudmer_Rotteveel/sounds/590950/
- everness_mesh_bush.blend
- everness_skull_with_candle.blend
- everness_venus_trap.blend
- everness_hammer_pick.blend
### Schematics

155
api.lua
View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -1105,6 +1105,42 @@ local function destroy(drops, npos, cid, c_air, can_dig, owner)
end
end
-- Draw wear bar texture overlay
function Everness.draw_wear_bar(itemstack, wear)
local itemstack_meta = itemstack:get_meta()
local px_width = 14
local px_one = 65535 / px_width
local px_color = px_width - math.floor(wear / px_one)
local inventory_overlay = '[combine:16x16'
for i = 1, px_width do
if i > px_color then
inventory_overlay = inventory_overlay .. ':' .. i .. ',14=[combine\\:1x1\\^[noalpha\\^[colorize\\:#000000\\:255'
else
local color
if px_color < px_width / 4 then
-- below 25%
color = '#FF0000'
elseif px_color < (px_width / 4) * 2 then
-- below 50%
color = '#FFA500'
elseif px_color < (px_width / 4) * 3 then
-- below 75%
color = '#FFFF00'
else
-- above 75%
color = '#00FF00'
end
inventory_overlay = inventory_overlay .. ':' .. i .. ',14=[combine\\:1x1\\^[noalpha\\^[colorize\\:' .. color .. '\\:255'
end
end
itemstack_meta:set_string('inventory_overlay', inventory_overlay)
end
function Everness.hammer_after_dig_node(pos, node, metadata, digger, can_dig)
if not digger then
return
@ -1112,7 +1148,7 @@ function Everness.hammer_after_dig_node(pos, node, metadata, digger, can_dig)
local wielditem = digger:get_wielded_item()
if wielditem:get_name() ~= 'everness:hammer' then
if not (wielditem:get_name() == 'everness:hammer' or wielditem:get_name() == 'everness:hammer_sharp') then
return
end
@ -1145,37 +1181,7 @@ function Everness.hammer_after_dig_node(pos, node, metadata, digger, can_dig)
wielditem_meta:set_int('everness_wear', new_wear)
-- Draw wear bar texture overlay
local px_width = 14
local px_one = 65535 / px_width
local px_color = px_width - math.floor(new_wear / px_one)
local inventory_overlay = '[combine:16x16'
for i = 1, px_width do
if i > px_color then
inventory_overlay = inventory_overlay .. ':' .. i .. ',14=[combine\\:1x1\\^[noalpha\\^[colorize\\:#000000\\:255'
else
local color
if px_color < px_width / 4 then
-- below 25%
color = '#FF0000'
elseif px_color < (px_width / 4) * 2 then
-- below 50%
color = '#FFA500'
elseif px_color < (px_width / 4) * 3 then
-- below 75%
color = '#FFFF00'
else
-- above 75%
color = '#00FF00'
end
inventory_overlay = inventory_overlay .. ':' .. i .. ',14=[combine\\:1x1\\^[noalpha\\^[colorize\\:' .. color .. '\\:255'
end
end
wielditem_meta:set_string('inventory_overlay', inventory_overlay)
Everness.draw_wear_bar(wielditem, new_wear)
if wielditem_wear > 65535 then
-- Break tool
@ -1185,7 +1191,9 @@ function Everness.hammer_after_dig_node(pos, node, metadata, digger, can_dig)
}, true)
digger:set_wielded_item(ItemStack(''))
elseif wielditem:get_name() == 'everness:hammer' then
elseif wielditem:get_name() == 'everness:hammer'
or wielditem:get_name() == 'everness:hammer_sharp'
then
-- Save wear
digger:set_wielded_item(wielditem)
end
@ -1199,7 +1207,16 @@ function Everness.hammer_after_dig_node(pos, node, metadata, digger, can_dig)
for x = -radius, radius do
local r = vector.length(vector.new(x, y, z))
if (radius * radius) / (r * r) >= (pr:next(30, 60) / 100) then
if wielditem:get_name() == 'everness:hammer' then
if (radius * radius) / (r * r) >= (pr:next(30, 60) / 100) then
local cid = data[vi]
local p = vector.new(pos.x + x, pos.y + y, pos.z + z)
if cid ~= c_air and cid ~= c_ignore then
data[vi] = destroy(drops, p, cid, c_air, can_dig, p_name)
end
end
else
local cid = data[vi]
local p = vector.new(pos.x + x, pos.y + y, pos.z + z)
@ -1288,3 +1305,71 @@ function Everness.hammer_after_dig_node(pos, node, metadata, digger, can_dig)
})
end
end
-- Function triggered for each qualifying node.
-- `dtime_s` is the in-game time (in seconds) elapsed since the block
-- was last active
function Everness.cool_lava(pos, node, dtime_s, prev_cool_lava_action)
if node.name == 'default:lava_source' or node.name == 'mcl_core:lava_source' then
if math.random(1, 5) == 1 then
local obi_nodes = {
{ name = 'everness:blue_crying_obsidian', color = '#2978A6'},
{ name = 'everness:blue_weeping_obsidian', color = '#25B8FF'},
{ name = 'everness:weeping_obsidian', color = '#C90FFF'},
}
local rand_node = obi_nodes[math.random(1, #obi_nodes)]
minetest.set_node(pos, {
name = rand_node.name
})
minetest.sound_play('everness_cool_lava',
{
pos = pos,
max_hear_distance = 16,
gain = 0.2
},
true
)
if minetest.has_feature({ dynamic_add_media_table = true, particlespawner_tweenable = true }) then
-- new syntax, after v5.6.0
minetest.add_particlespawner({
amount = 80,
time = 1,
size = {
min = 0.5,
max = 1,
},
exptime = 1,
pos = pos,
glow = 7,
attract = {
kind = 'point',
strength = 0.5,
origin = pos,
die_on_contact = true
},
radius = 3,
texture = {
name = 'everness_particle.png^[colorize:' .. rand_node.color .. ':255',
alpha_tween = {
0, 1,
style = 'fwd',
reps = 1
},
scale_tween = {
0.25, 1,
style = 'fwd',
reps = 1
}
}
})
end
else
prev_cool_lava_action(pos, node, dtime_s)
end
else
prev_cool_lava_action(pos, node, dtime_s)
end
end

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -712,6 +712,15 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = 'everness:hammer_sharp',
recipe = {
{ 'everness:pyriteblock_forged', 'everness:pyriteblock_forged', 'everness:pyriteblock_forged' },
{ 'everness:pyriteblock_forged', 'everness:hammer', 'everness:pyriteblock_forged' },
{ '', 'everness:hammer', '' }
}
})
--
-- Fuels
--

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -794,3 +794,72 @@ minetest.register_abm({
minetest.add_particlespawner(particlespawner_def)
end
})
-- Override lava cooling to include some variations of obsidian
minetest.register_on_mods_loaded(function()
for _, abm in pairs(minetest.registered_abms) do
if abm.label == 'Lava cooling' and abm.action ~= nil then
local prev_cool_lava_action = abm.action
abm.action = function(pos, node, dtime_s)
Everness.cool_lava(pos, node, dtime_s, prev_cool_lava_action)
end
end
end
end)
-- Calculates `everness:hammer_sharp` wear when crafting
minetest.register_craft_predict(function(itemstack, player, old_craft_grid, craft_inv)
if itemstack and itemstack:get_name() == 'everness:hammer_sharp' then
local stack_meta = itemstack:get_meta()
local hammers = 0
local wear_total = 0
for k, stack in pairs(old_craft_grid) do
if stack:get_name() == 'everness:hammer' then
local meta = stack:get_meta()
wear_total = wear_total + meta:get_int('everness_wear')
hammers = hammers + 1
end
end
local average_wear = wear_total / hammers
stack_meta:set_int('everness_wear', math.ceil(average_wear))
-- Draw wear bar texture overlay
if average_wear > 0 then
Everness.draw_wear_bar(itemstack, average_wear)
end
return itemstack
end
end)
-- Calculates `everness:hammer_sharp` wear when crafting
minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv)
if itemstack and itemstack:get_name() == 'everness:hammer_sharp' then
local stack_meta = itemstack:get_meta()
local hammers = 0
local wear_total = 0
for k, stack in pairs(old_craft_grid) do
if stack:get_name() == 'everness:hammer' then
local meta = stack:get_meta()
wear_total = wear_total + meta:get_int('everness_wear')
hammers = hammers + 1
end
end
local average_wear = wear_total / hammers
stack_meta:set_int('everness_wear', math.ceil(average_wear))
-- Draw wear bar texture overlay
if average_wear > 0 then
Everness.draw_wear_bar(itemstack, average_wear)
end
return itemstack
end
end)

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/**
* Deploy code to CDB
* Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
* Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

Binary file not shown.

Before

Width:  |  Height:  |  Size: 432 B

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 740 B

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -218,6 +218,7 @@ minetest.register_tool('everness:shell_of_underwater_breathing', {
--
minetest.register_on_mods_loaded(function()
-- Hammer functionality and populating `cid_data` for lated VoxelManipulation
for name, def in pairs(minetest.registered_nodes) do
if def.walkable and def.pointable and def.diggable then
local prev_after_dig = def.after_dig_node
@ -302,3 +303,61 @@ minetest.register_node('everness:hammer', {
end
end
})
minetest.register_node('everness:hammer_sharp', {
description = S('Sharp') .. ' ' .. S('Hammer'),
mod_origin = 'evermess',
inventory_image = 'everness_hammer_sharp_item.png',
use_texture_alpha = 'clip',
drawtype = 'mesh',
mesh = 'everness_hammer_pick.obj',
tiles = { 'everness_hammer_sharp_mesh.png' },
wield_scale = { x = 2, y = 2, z = 2 },
node_placement_prediction = '',
range = 4.0,
tool_capabilities = {
full_punch_interval = 1.0,
max_drop_level = 3,
groupcaps = {
cracky = { times = { [1] = 2.0, [2] = 1.0, [3] = 0.50 }, uses = 30, maxlevel = 3 },
},
damage_groups = { fleshy = 5 },
-- MCL
punch_attack_uses = 781,
},
stack_max = 1,
sound = { breaks = 'everness_tool_breaks' },
-- MCL
_mcl_toollike_wield = true,
groups = {
-- MCL
tool = 1,
dig_speed_class = 5
},
-- MCL
_mcl_diggroups = {
pickaxey = { speed = 8, level = 5, uses = 1562 }
},
on_place = function(itemstack, placer, pointed_thing)
-- disable placing (returns `nil`)
if pointed_thing.type == 'node' then
local pos = minetest.get_pointed_thing_position(pointed_thing)
if not pos or not placer then
return
end
local pointed_node = minetest.get_node(pos)
local pointed_node_def = minetest.registered_nodes[pointed_node.name]
if not pointed_node then
return
end
-- check if we have to use default on_place first
if pointed_node_def.on_rightclick then
return pointed_node_def.on_rightclick(pos, pointed_node, placer, itemstack, pointed_thing)
end
end
end
})

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
--[[
Everness. Never ending discovery in Everness mapgen.
Copyright (C) 2023 SaKeL <juraj.vajda@gmail.com>
Copyright (C) 2024 SaKeL <juraj.vajda@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public